[ExecuTorch][WebGPU] Op-tests for linear_qcs4w#21212
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21212
Note: Links to docs will display an error until the docs builds have been completed. ⏳ 13 Pending, 2 Unrelated FailuresAs of commit 866e358 with merge base 4a26c64 ( 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. |
psiddh
left a comment
There was a problem hiding this comment.
Approving full WebGPU stack
This PR needs a
|
Stack from ghstack (oldest at bottom):
Problem: The new
et_vk.linear_qcs4wop needs golden coverage — and, being a quantized op reachable only through a specific quantizer, a test that actually produces the op and validates the fake-quant numerics.Solution:
make_qcs4w_linear_moduleruns a plainnn.Linearthrough theVulkanQuantizerweight-only 4-bit path (get_symmetric_quantization_config(is_dynamic=False, weight_bits=4)-> prepare_pt2e -> calibrate -> convert_pt2e), and the op-testmodule_factoryreturns the CONVERTED module, so the WebGPU output is goldened against the converted eager (fp32 per-channel fake-quant reference). This exercises the int4 unpack + per-channel dequant end-to-end.bias=Falsekeeps the golden focused on qcs4w (a Linear bias lowers to a separateaten.add).Implementation:
cases.pyregisterslinear_qcs4wwithbasic(4x32x16),gemv(M=1 decode shape),k64(2x64x8),n32(3x32x32) — all with K even (2 nibbles/byte) andN*ceil(K/2) % 4 == 0(u32-packed weight);test_linear_qcs4w.pyholds the module + a delegation smoke test assertinget_vk.linear_qcs4wis absorbed into the VulkanBackend delegate.@exported-using-ghexport
Differential Revision: D112257668
Differential Revision: D112257668