Skip to content

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

Open
SS-JIA wants to merge 3 commits intogh/SS-JIA/398/basefrom
gh/SS-JIA/398/head
Open

[ET-VK][testing] Add per-shader timing breakdown to benchmark output#17105
SS-JIA wants to merge 3 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, 1 Unrelated Failure

As of commit 370f2d9 with merge base 477867a (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job 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]
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.

1 participant