Restore mux scaling for SCF bandwidth and latency calculations#562
Open
charles-typ wants to merge 1 commit intofacebookresearch:v2-betafrom
Open
Restore mux scaling for SCF bandwidth and latency calculations#562charles-typ wants to merge 1 commit intofacebookresearch:v2-betafrom
charles-typ wants to merge 1 commit intofacebookresearch:v2-betafrom
Conversation
Summary: D92222329 removed the mux (percentage-running) scaling from the SCF memory bandwidth and latency calculations in `generate_arm_perf_report.py`, with the reasoning that perf stat auto-scales counter values. While perf stat does auto-scale `counter_value`, `counter_runtime` still reflects only the actual time the PMU was active (not the full measurement interval). When SCF events are multiplexed (e.g., 33% mux on Grace), this causes: - `scf_cycles / counter_runtime` to be 3x the actual SCF frequency - Bandwidth to be reported 3x too high - Latency to be reported 3x too low (unrealistically fast) Raw perf data from Grace benchmark runs confirms SCF events run at 33% mux: ``` 5.004597489,163520049,,nvidia_scf_pmu_0/cmem_rd_access/,1670782496,33.00,, ``` This restores the mux correction originally added in D71513380: scale `counter_runtime` by `100 / mux` to recover the full interval duration before computing derived metrics. Affects: `nvidia_scf_mem_read_bw_MBps`, `nvidia_scf_mem_write_bw_MBps`, `nvidia_scf_mem_latency_ns`. Differential Revision: D99517233
|
@charles-typ has exported this pull request. If you are a Meta employee, you can view the originating Diff in D99517233. |
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
Summary: Pull Request resolved: #562 D92222329 removed the mux (percentage-running) scaling from the SCF memory bandwidth and latency calculations in `generate_arm_perf_report.py`, with the reasoning that perf stat auto-scales counter values. While perf stat does auto-scale `counter_value`, `counter_runtime` still reflects only the actual time the PMU was active (not the full measurement interval). When SCF events are multiplexed (e.g., 33% mux on Grace), this causes: - `scf_cycles / counter_runtime` to be 3x the actual SCF frequency - Bandwidth to be reported 3x too high - Latency to be reported 3x too low (unrealistically fast) Raw perf data from Grace benchmark runs confirms SCF events run at 33% mux: ``` 5.004597489,163520049,,nvidia_scf_pmu_0/cmem_rd_access/,1670782496,33.00,, ``` This restores the mux correction originally added in D71513380: scale `counter_runtime` by `100 / mux` to recover the full interval duration before computing derived metrics. Affects: `nvidia_scf_mem_read_bw_MBps`, `nvidia_scf_mem_write_bw_MBps`, `nvidia_scf_mem_latency_ns`. Reviewed By: b3nj1 Differential Revision: D99517233 fbshipit-source-id: 6fbd9469770ad240313b0b98ad65ab2d3ef2ed40
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:
D92222329 removed the mux (percentage-running) scaling from the SCF memory
bandwidth and latency calculations in
generate_arm_perf_report.py, withthe reasoning that perf stat auto-scales counter values.
While perf stat does auto-scale
counter_value,counter_runtimestillreflects only the actual time the PMU was active (not the full measurement
interval). When SCF events are multiplexed (e.g., 33% mux on Grace), this
causes:
scf_cycles / counter_runtimeto be 3x the actual SCF frequencyRaw perf data from Grace benchmark runs confirms SCF events run at 33% mux:
This restores the mux correction originally added in D71513380: scale
counter_runtimeby100 / muxto recover the full interval durationbefore computing derived metrics.
Affects:
nvidia_scf_mem_read_bw_MBps,nvidia_scf_mem_write_bw_MBps,nvidia_scf_mem_latency_ns.Differential Revision: D99517233