Skip to content

[ET-VK][testing] Add per-shader timing breakdown to benchmark output#17105

Merged
meta-codesync[bot] merged 5 commits intogh/SS-JIA/398/basefrom
gh/SS-JIA/398/head
Feb 5, 2026
Merged

[ET-VK][testing] Add per-shader timing breakdown to benchmark output#17105
meta-codesync[bot] merged 5 commits intogh/SS-JIA/398/basefrom
gh/SS-JIA/398/head

Conversation

@SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Feb 2, 2026

Stack from ghstack (oldest at bottom):

Previously, benchmark results only showed aggregate GPU timing for each
test case, making it difficult to identify which specific shaders were
executing and how they contributed to the overall runtime. This change
adds per-shader timing instrumentation to enable quick identification
of performance bottlenecks.

Key changes:

  • Add ShaderTiming struct to track individual shader execution times
    across iterations
  • Add collect_per_shader_timing_us() helper that extracts timing data
    from the querypool on a per-shader basis (vs the previous aggregate)
  • Update BenchmarkResult::print_row() to display shader names and
    their individual timings. When multiple shaders participate, each
    shader's average time is shown on its own line before the summary row
  • Add string utility helpers (layout_abbrev, storage_type_abbrev,
    repr_str, shape_string) for generating concise test case names
  • Adjust column widths for better terminal fit

Differential Revision: D91945038

Previously, benchmark results only showed aggregate GPU timing for each
test case, making it difficult to identify which specific shaders were
executing and how they contributed to the overall runtime. This change
adds per-shader timing instrumentation to enable quick identification
of performance bottlenecks.

Key changes:
- Add `ShaderTiming` struct to track individual shader execution times
  across iterations
- Add `collect_per_shader_timing_us()` helper that extracts timing data
  from the querypool on a per-shader basis (vs the previous aggregate)
- Update `BenchmarkResult::print_row()` to display shader names and
  their individual timings. When multiple shaders participate, each
  shader's average time is shown on its own line before the summary row
- Add string utility helpers (`layout_abbrev`, `storage_type_abbrev`,
  `repr_str`, `shape_string`) for generating concise test case names
- Adjust column widths for better terminal fit

Differential Revision: [D91945038](https://our.internmc.facebook.com/intern/diff/D91945038/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 2, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17105

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 1 Pending, 3 Unrelated Failures

As of commit 82e283c with merge base 1cffd23 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

…ark output"

Previously, benchmark results only showed aggregate GPU timing for each
test case, making it difficult to identify which specific shaders were
executing and how they contributed to the overall runtime. This change
adds per-shader timing instrumentation to enable quick identification
of performance bottlenecks.

Key changes:
- Add `ShaderTiming` struct to track individual shader execution times
  across iterations
- Add `collect_per_shader_timing_us()` helper that extracts timing data
  from the querypool on a per-shader basis (vs the previous aggregate)
- Update `BenchmarkResult::print_row()` to display shader names and
  their individual timings. When multiple shaders participate, each
  shader's average time is shown on its own line before the summary row
- Add string utility helpers (`layout_abbrev`, `storage_type_abbrev`,
  `repr_str`, `shape_string`) for generating concise test case names
- Adjust column widths for better terminal fit

Differential Revision: [D91945038](https://our.internmc.facebook.com/intern/diff/D91945038/)

[ghstack-poisoned]
…ark output"

Previously, benchmark results only showed aggregate GPU timing for each
test case, making it difficult to identify which specific shaders were
executing and how they contributed to the overall runtime. This change
adds per-shader timing instrumentation to enable quick identification
of performance bottlenecks.

Key changes:
- Add `ShaderTiming` struct to track individual shader execution times
  across iterations
- Add `collect_per_shader_timing_us()` helper that extracts timing data
  from the querypool on a per-shader basis (vs the previous aggregate)
- Update `BenchmarkResult::print_row()` to display shader names and
  their individual timings. When multiple shaders participate, each
  shader's average time is shown on its own line before the summary row
- Add string utility helpers (`layout_abbrev`, `storage_type_abbrev`,
  `repr_str`, `shape_string`) for generating concise test case names
- Adjust column widths for better terminal fit

Differential Revision: [D91945038](https://our.internmc.facebook.com/intern/diff/D91945038/)

[ghstack-poisoned]
…ark output"

Previously, benchmark results only showed aggregate GPU timing for each
test case, making it difficult to identify which specific shaders were
executing and how they contributed to the overall runtime. This change
adds per-shader timing instrumentation to enable quick identification
of performance bottlenecks.

Key changes:
- Add `ShaderTiming` struct to track individual shader execution times
  across iterations
- Add `collect_per_shader_timing_us()` helper that extracts timing data
  from the querypool on a per-shader basis (vs the previous aggregate)
- Update `BenchmarkResult::print_row()` to display shader names and
  their individual timings. When multiple shaders participate, each
  shader's average time is shown on its own line before the summary row
- Add string utility helpers (`layout_abbrev`, `storage_type_abbrev`,
  `repr_str`, `shape_string`) for generating concise test case names
- Adjust column widths for better terminal fit

Differential Revision: [D91945038](https://our.internmc.facebook.com/intern/diff/D91945038/)

[ghstack-poisoned]
…ark output"

Previously, benchmark results only showed aggregate GPU timing for each
test case, making it difficult to identify which specific shaders were
executing and how they contributed to the overall runtime. This change
adds per-shader timing instrumentation to enable quick identification
of performance bottlenecks.

Key changes:
- Add `ShaderTiming` struct to track individual shader execution times
  across iterations
- Add `collect_per_shader_timing_us()` helper that extracts timing data
  from the querypool on a per-shader basis (vs the previous aggregate)
- Update `BenchmarkResult::print_row()` to display shader names and
  their individual timings. When multiple shaders participate, each
  shader's average time is shown on its own line before the summary row
- Add string utility helpers (`layout_abbrev`, `storage_type_abbrev`,
  `repr_str`, `shape_string`) for generating concise test case names
- Adjust column widths for better terminal fit

Differential Revision: [D91945038](https://our.internmc.facebook.com/intern/diff/D91945038/)

[ghstack-poisoned]
@meta-codesync meta-codesync bot merged commit 72d2910 into gh/SS-JIA/398/base Feb 5, 2026
177 of 184 checks passed
@meta-codesync meta-codesync bot deleted the gh/SS-JIA/398/head branch February 5, 2026 23:28
lucylq pushed a commit that referenced this pull request Feb 5, 2026
…17259)

This PR was created by the merge bot to help merge the original PR into
the main branch.
ghstack PR number: #17105 by
@SS-JIA
^ Please use this as the source of truth for the PR details, comments,
and reviews
ghstack PR base:
https://github.com/pytorch/executorch/tree/gh/SS-JIA/398/base
ghstack PR head:
https://github.com/pytorch/executorch/tree/gh/SS-JIA/398/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head:
https://github.com/pytorch/executorch/tree/gh/SS-JIA/398/orig
Differential Revision:
[D91945038](https://our.internmc.facebook.com/intern/diff/D91945038/)
@diff-train-skip-merge

Co-authored-by: ssjia <ssjia@devvm26340.ftw0.facebook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants