Skip to content

Scale cross-commit benchmark stats analysis to full sweeps - #6059

Open
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D113330675
Open

Scale cross-commit benchmark stats analysis to full sweeps#6059
q10 wants to merge 1 commit into
pytorch:mainfrom
q10:export-D113330675

Conversation

@q10

@q10 q10 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary:
Make the benchmark analysis pipeline handle full-matrix cross-commit sweeps
that produce tens of thousands of per-kernel trace rows.

  • aggregate_config_stats.py: add opt-in --group-by-pattern. Emits one row per
    real (config, dispatched --kernel-pattern group) measurement plus the
    per-config (total), instead of the config x distinct-kernel_name
    cross-product that was ~98% count=0 padding. Default behavior unchanged.
  • compute_stats.py: replace the O(keys x rows) nested key-match scan with an
    O(rows) first-occurrence key index (byte-identical output). Cuts full-sweep
    runtime from hours (timeout) to seconds.
  • run_benchmark.sh / extract_kernel_stats.py: pass --group-by-pattern so the
    canonical and OSS pipelines emit compact per-measurement CSVs.

Reviewed By: henrylhtsang

Differential Revision: D113330675

Summary:
Make the benchmark analysis pipeline handle full-matrix cross-commit sweeps
that produce tens of thousands of per-kernel trace rows.

- aggregate_config_stats.py: add opt-in --group-by-pattern. Emits one row per
  real (config, dispatched --kernel-pattern group) measurement plus the
  per-config (total), instead of the config x distinct-kernel_name
  cross-product that was ~98% count=0 padding. Default behavior unchanged.
- compute_stats.py: replace the O(keys x rows) nested key-match scan with an
  O(rows) first-occurrence key index (byte-identical output). Cuts full-sweep
  runtime from hours (timeout) to seconds.
- run_benchmark.sh / extract_kernel_stats.py: pass --group-by-pattern so the
  canonical and OSS pipelines emit compact per-measurement CSVs.

Reviewed By: henrylhtsang

Differential Revision: D113330675
@meta-cla meta-cla Bot added the cla signed label Jul 24, 2026
@meta-codesync

meta-codesync Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113330675.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant