Skip to content

Commit 5fb5e39

Browse files
committed
copilot feedback
1 parent b7c7148 commit 5fb5e39

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

onnxruntime/contrib_ops/webgpu/quantization/gather_block_quantized.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ Status GatherBlockQuantized::ComputeInternal(ComputeContext& context) const {
132132
const auto* scales = context.Input(2);
133133
const auto* zero_points = context.Input(3);
134134

135-
// auto x_shape = x->Shape();
136-
int64_t x_size = x->Shape().Size();
137135
int x_rank = static_cast<int>(x->Shape().NumDimensions());
138136
int64_t x_dtype = x->GetElementType();
139137
bool is_signed = x_dtype == ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8 || x_dtype == ONNX_TENSOR_ELEMENT_DATA_TYPE_INT4;
@@ -201,7 +199,7 @@ Status GatherBlockQuantized::ComputeInternal(ComputeContext& context) const {
201199
.AddInputs({{scales, ProgramTensorMetadataDependency::TypeAndRank}})
202200
.AddOutput({output_tensor, ProgramTensorMetadataDependency::None})
203201
.SetDispatchGroupSize((output_size + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE)
204-
.AddUniformVariables({{static_cast<uint32_t>(x_size)}})
202+
.AddUniformVariables({{static_cast<uint32_t>(output_size)}})
205203
.AddUniformVariables({{static_cast<uint32_t>(quantize_axis)}})
206204
.AddUniformVariables({{static_cast<uint32_t>(gather_axis)}})
207205
.AddUniformVariables({{static_cast<uint32_t>(block_size_)}})

0 commit comments

Comments
 (0)