Skip to content

[ExecuTorch][WebGPU] Restore SDPA per-dispatch kernel_name labels#20551

Merged
JulianCloudNTH merged 1 commit into
pytorch:mainfrom
JulianCloudNTH:webgpu-restore-sdpa-kernel-namee
Jun 26, 2026
Merged

[ExecuTorch][WebGPU] Restore SDPA per-dispatch kernel_name labels#20551
JulianCloudNTH merged 1 commit into
pytorch:mainfrom
JulianCloudNTH:webgpu-restore-sdpa-kernel-namee

Conversation

@JulianCloudNTH

@JulianCloudNTH JulianCloudNTH commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

[ExecuTorch][WebGPU] Restore SDPA per-dispatch kernel_name labels

@diff-train-skip-merge

The register-tile change (pytorch#20507) rewrote the `update_cache`, QK (`sdpa_compute_attn_weights`), `sdpa_softmax`, and AV (`sdpa_compute_out`) `build_dispatch` call sites and dropped the per-dispatch `kernel_name` labels originally added in pytorch#20167. With the labels gone, `WEBGPU_TIMESTAMP_QUERY` profiling can no longer attribute on-GPU time to the attention stage that produced it (every dispatch reports as the default "dispatch").

This re-threads `kernel_name` through `build_dispatch` (defaulted to `""`, so all other callers are unaffected) into the existing `WebGPUDispatch::kernel_name` field that `WebGPUQueryPool` already reads, and re-applies the four SDPA stage labels. No behavior change when profiling is off; the production `execute()` path is byte-identical.
@pytorch-bot

pytorch-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 32 Pending

As of commit ad00635 with merge base b919db7 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 26, 2026
@JulianCloudNTH JulianCloudNTH requested a review from psiddh June 26, 2026 19:04
@github-actions

Copy link
Copy Markdown

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.

@psiddh psiddh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this to unbloc the diff train

@JulianCloudNTH JulianCloudNTH merged commit 636967c into pytorch:main Jun 26, 2026
184 of 186 checks passed
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants