Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion backends/webgpu/test/op_tests/cases.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
Expand Down Expand Up @@ -418,7 +418,11 @@
@register_op_test("conv2d")
def _conv2d_suite() -> WebGPUTestSuite:
# DaViT patch-embed / downsample convs + conv_transpose2d (same registration,
# folded by the `transposed` arg). NCHW fp32.
# folded by the `transposed` arg). NCHW fp32. Routing coverage (all vs the
# same fp64 golden): patch_embed/conv3x3_pad1/strided/gemm_batched are
# groups==1 → im2col tiled GEMM (gemm_batched pins the B>1 output write);
# grouped_vec4 (groups=2, icpg=4) → direct vec4 kernel; depthwise (groups=8,
# icpg=1) → direct scalar; transpose2x → conv_transpose2d.
return WebGPUTestSuite(
module_factory=make_conv,
cases=[
Expand Down Expand Up @@ -454,6 +458,22 @@
},
inputs=(InputSpec(shape=(1, 8, 8, 8), gen=_chw_ramp),),
),
Case(
name="grouped_vec4",
construct={
"in_ch": 8,
"out_ch": 8,
"kernel": 3,
"padding": 1,
"groups": 2,
},
inputs=(InputSpec(shape=(1, 8, 8, 8), gen=_chw_ramp),),
),
Case(
name="gemm_batched",
construct={"in_ch": 8, "out_ch": 16, "kernel": 3, "padding": 1},
inputs=(InputSpec(shape=(2, 8, 16, 16), gen=_chw_ramp),),
),
Case(
name="transpose2x",
construct={
Expand Down
Loading