Skip to content

Commit 1e118d6

Browse files
authored
webgpu: fix conv error when using MatMulNaiveProgram (microsoft#24496)
### Description <!-- Describe your changes. --> ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
1 parent e9bb150 commit 1e118d6

File tree

1 file changed

+1
-1
lines changed
  • onnxruntime/core/providers/webgpu/nn

1 file changed

+1
-1
lines changed

onnxruntime/core/providers/webgpu/nn/conv.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Status Conv<is_channels_last, is_fused>::ComputeInternal(ComputeContext& context
198198
.AddInputs({{matmul_inputs[0], ProgramTensorMetadataDependency::TypeAndRank, ReduceShapeByComponents(matmul_input_reshapes[0], a_components), int(a_components)},
199199
{matmul_inputs[1], ProgramTensorMetadataDependency::TypeAndRank, ReduceShapeByComponents(matmul_input_reshapes[1], components), int(components)}});
200200
if (has_bias) {
201-
program.AddInput({bias, ProgramTensorMetadataDependency::Rank, bias->Shape(), components});
201+
program.AddInput({bias, ProgramTensorMetadataDependency::Rank, ReduceShapeByComponents(bias->Shape(), components), components});
202202
}
203203
program
204204
.AddOutputs({{output, ProgramTensorMetadataDependency::None, ReduceShapeByComponents(matmul_output_shape, components), int(components)}})

0 commit comments

Comments
 (0)