Skip to content

[ExecuTorch][WebGPU] Test: rms_norm workgroup size is runtime-configurable#21008

Merged
JCNTH merged 1 commit into
gh/JCNTH/87/origfrom
gh/JCNTH/88/orig
Jul 17, 2026
Merged

[ExecuTorch][WebGPU] Test: rms_norm workgroup size is runtime-configurable#21008
JCNTH merged 1 commit into
gh/JCNTH/87/origfrom
gh/JCNTH/88/orig

Conversation

@pytorchbot

Copy link
Copy Markdown
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #20956 by @JCNTH
^ 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/JCNTH/88/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/JCNTH/88/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/JCNTH/87/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/JCNTH/88/orig

@diff-train-skip-merge

…rable

Pull Request resolved: #20956

Add a native gtest that locks the wg-size configurability guarantee: the same rms_norm WGSL, run at override `wg_size` 64 and 128, must produce the same output. `Module::forward` always uses the handler-clamped size (64), so the test builds the compute pipeline directly and sets `wg_size` via a `WGPUConstantEntry`, mirroring the runtime pipeline setup + `WebGPUGraph::copy_outputs` readback.

Key changes:
- `test/test_webgpu_native.cpp` — `run_rms_norm_at_wg()` standalone-pipeline helper + `RmsNormWorkgroupSizeConfigurable` test (element-wise agree within abs 1e-4 / rel 1e-3, plus a non-zero sanity guard).

Self-contained (no `.pte`/export), so it runs inside `webgpu_native_test` under `test_webgpu_native_ci.sh` with no new wiring. Absolute rms_norm correctness stays covered by the model-driven golden tests; this adds the "128 matches 64" guarantee.

Co-authored-with: Claude Code.
ghstack-source-id: 403097259
@exported-using-ghexport

Differential Revision: [D112060302](https://our.internmc.facebook.com/intern/diff/D112060302/)
@pytorch-bot

pytorch-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 143 Pending

As of commit 62db074 with merge base e500fee (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 Jul 17, 2026
@JCNTH
JCNTH merged commit b418824 into gh/JCNTH/87/orig Jul 17, 2026
175 of 183 checks passed
@JCNTH
JCNTH deleted the gh/JCNTH/88/orig branch July 17, 2026 04:54
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