[ExecuTorch][WebGPU] Op-tests for linear_q8ta_q8csw#21214
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21214
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 46 New Failures, 3 Unrelated FailuresAs of commit a20c99d with merge base 266e0dc ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
psiddh
left a comment
There was a problem hiding this comment.
Approving full WebGPU stack
Stack from ghstack (oldest at bottom):
Problem: The new
et_vk.linear_q8ta_q8cswop needs golden coverage, and the recipe to REACH it (a quantized linear whose output stays fp32) is non-obvious.Solution:
make_linear_q8ta_q8csw_moduleruns a plainnn.Linearthrough XNNPACK static PT2E with the activation config'soutput_activationnulled (dataclasses.replace(get_symmetric_quantization_config(is_per_channel=True, is_dynamic=False), output_activation=None)): the linear's INPUT is statically per-tensor quantized but its OUTPUT is left fp32, so the Vulkan fusion routes tolinear_q8ta_q8csw(fp32 out) instead ofq8ta_linear(int8 out). The op-testmodule_factoryreturns the CONVERTED module, so the WebGPU output is goldened against the converted eager (fp32 fake-quant reference); the served subgraph isquantize_per_tensor(landed) ->linear_q8ta_q8csw. Cases usebias=True(a bias-less terminal linear mis-fuses to an int8 output the op fail-louds on) and N a multiple of 4 (the AOT pads the quantized weight's N).Implementation:
cases.pyregisterslinear_q8ta_q8cswwithbasic(4x32x16),gemv(M=1),k48(2x48x8),n32(3x32x32);test_linear_q8ta_q8csw.pyholds the module + a delegation smoke test assertinget_vk.linear_q8ta_q8cswis absorbed into the VulkanBackend delegate.Differential Revision: D112257659