-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow choosing specific regions to measure via instrumentation API #2983
Conversation
- We have Caliper based instrumentation which allows to measure different phases like state updates, solver, current update, spike exchange etc. We also record the calls to each MOD file, e.g. `state-hh`, `cur-hh`. - If we have large number of MOD files and very few channel instances then such measurement could add significant measurement overhead. - E.g. In case of LIKWID, we see: ```console ./x86_64/special -python test.py NEURON RUN with 1 threads took 0.649262 likwid-perfctr -C 0 -m -g FLOPS_DP x86_64/special -python test.py NEURON RUN with 1 threads took 10.734261 ``` - In such case, we want to selectively instrument a specific region. For example, the main `psolve` region or a specific mod file block like `state-hh`. This is now possible with a environmental variable `NRN_PROFILE_REGIONS`: ```console export NRN_PROFILE_REGIONS=psolve,state-hh likwid-perfctr -C 0 -m -g FLOPS_DP x86_64/special -python test.py .... NEURON RUN with 1 threads took 0.836292 ... Region psolve, Group 1: FLOPS_DP +-------------------+------------+ | Region Info | HWThread 0 | +-------------------+------------+ | RDTSC Runtime [s] | 0.835792 | | call count | 1 | +-------------------+------------+ +------------------------------------------+---------+------------+ | Event | Counter | HWThread 0 | +------------------------------------------+---------+------------+ | INSTR_RETIRED_ANY | FIXC0 | 5336280000 | | CPU_CLK_UNHALTED_CORE | FIXC1 | 1987773000 | | CPU_CLK_UNHALTED_REF | FIXC2 | 1523973000 | | FP_ARITH_INST_RETIRED_128B_PACKED_DOUBLE | PMC0 | 489202 | | FP_ARITH_INST_RETIRED_SCALAR_DOUBLE | PMC1 | 729407200 | | FP_ARITH_INST_RETIRED_256B_PACKED_DOUBLE | PMC2 | 0 | | FP_ARITH_INST_RETIRED_512B_PACKED_DOUBLE | PMC3 | - | +------------------------------------------+---------+------------+ ... Region state-Nav1_6, Group 1: FLOPS_DP +-------------------+------------+ | Region Info | HWThread 0 | +-------------------+------------+ | RDTSC Runtime [s] | 0.167490 | | call count | 400 | +-------------------+------------+ +------------------------------------------+---------+------------+ | Event | Counter | HWThread 0 | +------------------------------------------+---------+------------+ | INSTR_RETIRED_ANY | FIXC0 | 1341566000 | | CPU_CLK_UNHALTED_CORE | FIXC1 | 505899600 | | CPU_CLK_UNHALTED_REF | FIXC2 | 387861900 | | FP_ARITH_INST_RETIRED_128B_PACKED_DOUBLE | PMC0 | 0 | | FP_ARITH_INST_RETIRED_SCALAR_DOUBLE | PMC1 | 224568600 | | FP_ARITH_INST_RETIRED_256B_PACKED_DOUBLE | PMC2 | 0 | | FP_ARITH_INST_RETIRED_512B_PACKED_DOUBLE | PMC3 | - | +------------------------------------------+---------+------------+ ``` i.e. only specified regions are enabled and with less overhead.
b6c1ac8
to
cf1411d
Compare
cf1411d
to
2478ba8
Compare
✔️ 2478ba8 -> Azure artifacts URL |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2983 +/- ##
==========================================
- Coverage 67.29% 67.28% -0.01%
==========================================
Files 572 572
Lines 104951 104967 +16
==========================================
+ Hits 70626 70631 +5
- Misses 34325 34336 +11 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
- Added insructions about how to build NEURON with LIKWID and how to use it with low overhead (see #2983) - Added some info about performance regression in master
|
✔️ 6578ba1 -> Azure artifacts URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given you've just made extensive use of this, it should be good to merge.
Added instructions about how to build NEURON with LIKWID and how to use it with low overhead (see #2983) Co-authored-by: Luc Grosheintz <[email protected]>
state-hh
,cur-hh
.psolve
region or a specific mod file block likestate-hh
. This is now possible with a environmental variableNRN_PROFILE_REGIONS
:i.e. only specified regions are enabled and with less overhead.
NOTE
: I will document this in the developer docs in a separate PR including LIKWID