Remove the conv2d op-test case that can never be delegated, so the WebGPU op tests can run - #21697
Open
shoumikhin wants to merge 1 commit into
Open
Remove the conv2d op-test case that can never be delegated, so the WebGPU op tests can run#21697shoumikhin wants to merge 1 commit into
shoumikhin wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21697
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 969df9d with merge base fb5eedc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
…bGPU op tests can run
shoumikhin
force-pushed
the
shoumikhin/webgpu-drop-undelegatable-conv2d-case
branch
from
August 10, 2026 05:51
1df8615 to
969df9d
Compare
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.
What is broken
test-webgpu-nativefails before it runs a single op test:Why it happens
The op-test generator exports every case in
backends/webgpu/test/op_tests/cases.pyand then checks that the exportedprogram really contains a WebGPU (Vulkan) delegate. If it does not, the case
would run on CPU and prove nothing, so the generator refuses to write it.
The
gemm_batchedcase gives conv2d an input of shape(2, 8, 16, 16), so abatch of 2.
check_conv_nodeinbackends/vulkan/op_registry.pyreturns Falsefor any 4-D convolution whose batch is not 1:
So this case can never be delegated. It has been in
cases.pysince the suitewas added and has never worked.
Why it only turns the job red now
Until recently the CI script wrapped the generator in an
if:The generator was failing on this case every time, so the whole op-test
framework took the
elsebranch and was quietly skipped. #21646 replaced thatwith a plain call, and the script runs under
set -e, so the same old failureis now fatal.
Making it fatal is the right call. The op tests are meant to run. This change
removes the one case that stops them.
The fix
Delete the
gemm_batchedcase, and say in the suite comment why there is nobatched case, so it is clear what to add back once the partitioner accepts
batch > 1.
Why not mark the case
required=Falseinsteadrequired=Falsemakes the generator print a warning instead of raising, but itstill writes the
.pteand still adds the case to the manifest. The C++ driverwould then load a CPU-only program, compare it to the torch golden, and pass.
That is a green tick for a test that never touches the GPU, which is worse than
having no case at all.
Teaching the generator to also drop the manifest entry in that situation would
be a reasonable follow-up, but it is a separate change.
Test plan
test-webgpu-nativeis the only job that runs the op tests, and on its own thisbranch cannot reach them: the job still stops earlier on the missing RoPE fixture
that #21690 fixes. So the two changes were tested together, on a branch holding
both, and that run passes:
So the generator now gets all the way through, the op-test binary runs for the
first time, and all 391 generated tests pass,
conv2dincluded with itsremaining 6 cases.
Tested on this branch alone as well, to confirm this change does not break
anything earlier: the job reaches the native tests and 28 of them pass, with the
single failure being the RoPE fixture that #21690 fixes.
One thing worth knowing: generating the 390 cases takes about 35 minutes, and the
whole job now takes about 78 minutes against a 120 minute limit. It fits, but the
margin is not large, and it was invisible until now because the stage never ran.