Skip to content

Commit 087b407

Browse files
Fix unused variable error.
1 parent a82ee44 commit 087b407

File tree

1 file changed

+2
-4
lines changed
  • onnxruntime/core/providers/webgpu/math

1 file changed

+2
-4
lines changed

onnxruntime/core/providers/webgpu/math/matmul.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ Status MatMul::ComputeInternal(ComputeContext& context) const {
129129

130130
const int64_t a_rows = a->Shape().NumDimensions() > 1 ? a->Shape()[a->Shape().NumDimensions() - 2] : 1;
131131
TensorShape output_shape_shader({batch_size, a_rows, helper.N() / components});
132-
Activation activation;
133-
MatMulNaiveProgram program{activation, output_rank, output_number, has_bias};
132+
MatMulNaiveProgram program{activation_, output_rank, output_number, has_bias};
134133

135134
program
136135
.CacheHint(std::to_string(components), std::to_string(a_components), std::to_string(output_number))
@@ -208,8 +207,7 @@ Status MatMul::ComputeInternal(ComputeContext& context) const {
208207
const TensorShape a_shape_temp = CreateMatMulIntermediateShape(outer_dims_a, dim_a_outer, dim_inner, components);
209208
const TensorShape b_shape_temp = CreateMatMulIntermediateShape(outer_dims_b, dim_inner, dim_b_outer, components);
210209
const TensorShape output_shape_temp = TensorShape({batch_size, dim_a_outer, dim_b_outer / components});
211-
Activation activation;
212-
MatMulProgram program{activation, has_bias, is_vec4, elements_per_thread};
210+
MatMulProgram program{activation_, has_bias, is_vec4, elements_per_thread};
213211
program
214212
.CacheHint(absl::StrJoin(elements_per_thread, "-"), std::to_string(is_vec4))
215213
.AddInputs({{a, ProgramTensorMetadataDependency::TypeAndRank, a_shape_temp, components},

0 commit comments

Comments
 (0)