Skip to content

Commit 17988a4

Browse files
committed
Resolve comment
1 parent 58a38c3 commit 17988a4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ Status ApplyIm2ColMatMulProgram(ComputeContext& context,
102102
const auto* bias = has_bias ? context.Input<Tensor>(2) : nullptr;
103103

104104
// Transpose OIHW Weight to OHWI
105+
// TODO: Move to `Transpose`
106+
// TODO: Use prepack
105107
TensorShape weight_shape = weight->Shape();
106108
const uint32_t channel_output = onnxruntime::narrow<uint32_t>(weight_shape[0]);
107109
const uint32_t channel_input = onnxruntime::narrow<uint32_t>(weight_shape[1]);
@@ -147,9 +149,10 @@ Status ApplyIm2ColMatMulProgram(ComputeContext& context,
147149

148150
// Check the device's subgroup size before shader compilation to avoid potential performance penalties
149151
// associated with conditional checks in the shader runtime.
152+
//
150153
// Ensure the subgroup size must be greater than or equal to `tile_m` to safely enable `use_subgroup`.
151-
// If this condition is not met, the feature must be disabled.
152-
const bool use_subgroup = true;
154+
// If the status of this condition is uncertain, the feature must be disabled.
155+
const bool use_subgroup = false;
153156
Im2ColMatMulProgram im2col_mm_program{has_bias, tile_m, tile_n, use_subgroup};
154157
im2col_mm_program.SetWorkgroupSize(workgroup_size);
155158

0 commit comments

Comments
 (0)