Skip to content

[ExecuTorch][WebGPU] test: q4gsw shmem-GEMM prefill golden configs#20606

Open
JulianCloudNTH wants to merge 2 commits into
gh/JulianCloudNTH/80/basefrom
gh/JulianCloudNTH/80/head
Open

[ExecuTorch][WebGPU] test: q4gsw shmem-GEMM prefill golden configs#20606
JulianCloudNTH wants to merge 2 commits into
gh/JulianCloudNTH/80/basefrom
gh/JulianCloudNTH/80/head

Conversation

@JulianCloudNTH

@JulianCloudNTH JulianCloudNTH commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Add native fp64-golden configs that exercise the shared-memory tiled GEMM prefill route.

The existing linear_q4gsw prefill configs (q_proj_4k/kv_proj_4k, K=2048, N<=2048) all route to the register-tiled GEMM, so the new shmem GEMM route (K >= 4096 || N >= 4096) had no coverage. This adds three configs — kept in lockstep between test_quantized_linear.py CONFIGS and the C++ kQ4gswConfigs table — that exercise it (the op lands in the stacked diff below):

  • gate_proj_pf (M128 K2048 N8192) — shmem via large N (gate/up prefill).
  • down_proj_pf (M128 K8192 N2048) — shmem via large K (down prefill), looser big-K tol.
  • shmem_edge (M130 K4096 N2056) — partial 32-tile bounds (M and N not multiples of 32).

Co-authored-with: Claude Code.
@exported-using-ghexport

Differential Revision: D110095129

Differential Revision: D110095129

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit 1164e70 with merge base b3e11d3 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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 29, 2026
@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.

[ghstack-poisoned]
JulianCloudNTH added a commit that referenced this pull request Jun 30, 2026
Pull Request resolved: #20606

**Add native fp64-golden configs that exercise the shared-memory tiled GEMM prefill route.**

The existing `linear_q4gsw` prefill configs (`q_proj_4k`/`kv_proj_4k`, `K=2048`, `N<=2048`) all route to the register-tiled GEMM, so the new shmem GEMM route (`K >= 4096 || N >= 4096`) had no coverage. This adds three configs — kept in lockstep between `test_quantized_linear.py` `CONFIGS` and the C++ `kQ4gswConfigs` table — that exercise it (the op lands in the stacked diff below):

- `gate_proj_pf` (`M128 K2048 N8192`) — shmem via large `N` (gate/up prefill).
- `down_proj_pf` (`M128 K8192 N2048`) — shmem via large `K` (down prefill), looser big-K tol.
- `shmem_edge` (`M130 K4096 N2056`) — partial 32-tile bounds (`M` and `N` not multiples of 32).

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

Differential Revision: [D110095129](https://our.internmc.facebook.com/intern/diff/D110095129/)
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant