Use cpu_cycles for core and nvidia_scf_pmu_0/cycles for SCF (#752)#752
Closed
charles-typ wants to merge 1 commit into
Closed
Use cpu_cycles for core and nvidia_scf_pmu_0/cycles for SCF (#752)#752charles-typ wants to merge 1 commit into
charles-typ wants to merge 1 commit into
Conversation
|
@charles-typ has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111288659. |
…research#752) Summary: Switch the NVIDIA Grace (Neoverse V2) perf-counter collection from the generic `cycles` event to the core-only `cpu_cycles` alias. On ARM Grace in system-wide mode (`perf stat -a`), requesting the generic `cycles` event auto-expands to open a cycles counter on **every** PMU, including the uncore SCF PMU (`nvidia_scf_pmu_0/cycles/`). This wastes a scarce SCF counter slot and produces a duplicate row. Requesting `cpu_cycles` targets only the core PMU, while the SCF group keeps its explicit `nvidia_scf_pmu_0/cycles/` event. Changes: - `collect_nvda_neoversev2_perf_counters.sh`: `INSTRUCTIONS_RATE` now uses `cpu_cycles` instead of `cycles`. - `generate_arm_perf_report.py`: all core-cycles group lookups (`get_group("cycles")`) updated to `get_group("cpu_cycles")` to match the renamed event. The SCF cycles lookup (`nvidia_scf_pmu_0/cycles/`) is unchanged. The two literals must change together, otherwise `skip_if_missing` would silently drop IPC/TopDown/timestamp metrics on a `KeyError`. Ref: D99517233 reviewer feedback. [Session trajectory link](https://www.internalfb.com/intern/devai/devmate/inspector/?id=1e5a7bee-9130-4920-83cd-fe4560ed1d0c) Differential Revision: D111288659
charles-typ
force-pushed
the
export-D111288659-to-v2-beta
branch
from
July 9, 2026 21:21
ff960cf to
324ea2b
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Jul 11, 2026
Summary: Pull Request resolved: #752 Switch the NVIDIA Grace (Neoverse V2) perf-counter collection from the generic `cycles` event to the core-only `cpu_cycles` alias. On ARM Grace in system-wide mode (`perf stat -a`), requesting the generic `cycles` event auto-expands to open a cycles counter on **every** PMU, including the uncore SCF PMU (`nvidia_scf_pmu_0/cycles/`). This wastes a scarce SCF counter slot and produces a duplicate row. Requesting `cpu_cycles` targets only the core PMU, while the SCF group keeps its explicit `nvidia_scf_pmu_0/cycles/` event. Changes: - `collect_nvda_neoversev2_perf_counters.sh`: `INSTRUCTIONS_RATE` now uses `cpu_cycles` instead of `cycles`. - `generate_arm_perf_report.py`: all core-cycles group lookups (`get_group("cycles")`) updated to `get_group("cpu_cycles")` to match the renamed event. The SCF cycles lookup (`nvidia_scf_pmu_0/cycles/`) is unchanged. The two literals must change together, otherwise `skip_if_missing` would silently drop IPC/TopDown/timestamp metrics on a `KeyError`. Ref: D99517233 reviewer feedback. Reviewed By: YifanYuan3 Differential Revision: D111288659 fbshipit-source-id: f1059cf48ee773a81709dd2033ac6d74fdaf043e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Switch the NVIDIA Grace (Neoverse V2) perf-counter collection from the generic
cyclesevent to the core-onlycpu_cyclesalias.On ARM Grace in system-wide mode (
perf stat -a), requesting the genericcyclesevent auto-expands to open a cycles counter on every PMU, including the uncore SCF PMU (nvidia_scf_pmu_0/cycles/). This wastes a scarce SCF counter slot and produces a duplicate row. Requestingcpu_cyclestargets only the core PMU, while the SCF group keeps its explicitnvidia_scf_pmu_0/cycles/event.Changes:
collect_nvda_neoversev2_perf_counters.sh:INSTRUCTIONS_RATEnow usescpu_cyclesinstead ofcycles.generate_arm_perf_report.py: all core-cycles group lookups (get_group("cycles")) updated toget_group("cpu_cycles")to match the renamed event. The SCF cycles lookup (nvidia_scf_pmu_0/cycles/) is unchanged.The two literals must change together, otherwise
skip_if_missingwould silently drop IPC/TopDown/timestamp metrics on aKeyError.Ref: D99517233 reviewer feedback.
Session trajectory link
Differential Revision: D111288659