[ExecuTorch][WebGPU] 2D compute dispatch tests — prefill golden + fold unit test#20584
Open
JulianCloudNTH wants to merge 1 commit into
Open
[ExecuTorch][WebGPU] 2D compute dispatch tests — prefill golden + fold unit test#20584JulianCloudNTH wants to merge 1 commit into
JulianCloudNTH wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20584
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 1f4f899 with merge base 55a71e6 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Jun 28, 2026
This PR needs a
|
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.
Stack from ghstack (oldest at bottom):
Test coverage for the 2D dispatch fold, stacked above the cap-lift op.
Problem: The 2D fold is load-bearing index math — a wrong
{x, y}means out-of-bounds writes or dropped threads — and the prefill shapes that exercise it previously threw at the 1D cap, so they were untested.Solution: A device-free unit test for the fold arithmetic, plus two single-shot prefill SDPA golden configs that fold each kernel family.
llama1b_prefill_512/_2048shapes threw at the capfold_workgroup_count_2dunit-tested at the cap boundaries, and the two prefill shapes run as goldensImplementation:
test/native/test_dispatch_2d.cpp— device-free unit test forutils::fold_workgroup_count_2d: the 1D fast path, the 2D fold, the real Llama-1B QK counts at S=512 ({65535, 3}) and S=2048 ({65535, 33}), and the needs-3rd-dimension throw; asserts each{x, y}covers[0, count)llama1b_prefill_512+llama1b_prefill_2048configs appended to the byte-mirroredCONFIGS(test_sdpa.py) andkSdpaConfigs(test_webgpu_native.cpp)webgpu_dispatch_2d_testin CMake + the native CI scriptConstraints:
addshares the element-form path with QK, so it is covered structurally; a dedicated >16M-elementaddfold case is omitted as disproportionateCo-authored-with: Claude Code.
Differential Revision: D109517683