Skip to content

Commit 889a1a9

Browse files
committed
clean up
1 parent 49cbad3 commit 889a1a9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ typename std::enable_if<
141141
(boost::mp11::mp_contains<TypeList<BFloat16, MLFloat16, float>, T1>::value && std::is_same<T2, float>::value) ||
142142
(std::is_integral<T1>::value && std::is_same<T2, int>::value),
143143
std::vector<T1>>::type
144-
ToType(const std::vector<T2>& vec, const std::vector<int64_t>& /*shape*/) {
144+
ToType(const std::vector<T2>& vec) {
145145
std::vector<T1> result;
146146
for (auto v : vec) {
147147
result.push_back(static_cast<T1>(v));
@@ -152,7 +152,7 @@ ToType(const std::vector<T2>& vec, const std::vector<int64_t>& /*shape*/) {
152152

153153
template <typename T>
154154
typename std::enable_if<boost::mp11::mp_contains<TypeList<UInt4x2, Int4x2>, T>::value, std::vector<T>>::type
155-
ToType(const std::vector<int>& vec, std::vector<int64_t>& shape) {
155+
ToType(const std::vector<int>& vec) {
156156
// UInt4x2 and Int4x2 uses global packing instead of per-row packing.
157157
size_t i = 0;
158158
constexpr int offset = std::is_same<T, Int4x2>::value ? 0 : 8;
@@ -199,19 +199,19 @@ void RunUnpackedData(
199199
auto expect_result = expect_success ? OpTester::ExpectResult::kExpectSuccess : OpTester::ExpectResult::kExpectFailure;
200200
if (zero_points.empty()) {
201201
// If no zero points are provided, we can skip packing them.
202-
RunGatherBlockQuantized(ToType<T1>(packed_data, packed_data_shape),
202+
RunGatherBlockQuantized(ToType<T1>(packed_data),
203203
packed_data_shape,
204-
ToType<Tind>(indices, indices_shape),
204+
ToType<Tind>(indices),
205205
indices_shape,
206-
ToType<T2>(scales, scales_shape),
206+
ToType<T2>(scales),
207207
scales_shape,
208208
{},
209209
{},
210210
gather_axis,
211211
quantize_axis,
212212
block_size,
213213
bits,
214-
ToType<T2>(output, output_shape),
214+
ToType<T2>(output),
215215
output_shape,
216216
expect_result);
217217
return;
@@ -222,19 +222,19 @@ void RunUnpackedData(
222222
std::vector<int64_t> packed_zero_point_shape = scales_shape;
223223
PackDataForUint8TypeIfNecessary<T1>(packed_zero_point, packed_zero_point_shape, bits);
224224

225-
RunGatherBlockQuantized(ToType<T1>(packed_data, packed_data_shape),
225+
RunGatherBlockQuantized(ToType<T1>(packed_data),
226226
packed_data_shape,
227-
ToType<Tind>(indices, indices_shape),
227+
ToType<Tind>(indices),
228228
indices_shape,
229-
ToType<T2>(scales, scales_shape),
229+
ToType<T2>(scales),
230230
scales_shape,
231-
ToType<T1>(packed_zero_point, packed_zero_point_shape),
231+
ToType<T1>(packed_zero_point),
232232
packed_zero_point_shape,
233233
gather_axis,
234234
quantize_axis,
235235
block_size,
236236
bits,
237-
ToType<T2>(output, output_shape),
237+
ToType<T2>(output),
238238
output_shape,
239239
expect_result);
240240
}

0 commit comments

Comments
 (0)