Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable more tests
  • Loading branch information
Xiaoyan Hu committed Aug 1, 2025
commit 0f67c22ef3f5ecaf010770b31e20131f9c8eab5d
10 changes: 10 additions & 0 deletions onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ void Test_Fail_WithZeroPoints(int64_t gather_axis,
gather_axis, quantize_axis, block_size, bits, output, output_shape, false);
}

#ifndef USE_CUDA
TEST(GatherBlockQuantizedOpTest, UnsupportedTypes) {
Test_Fail_WithZeroPoints<int8_t, float, int32_t>(0, 2, 16);
Test_Fail_WithZeroPoints<int16_t, float, int32_t>(0, 2, 16);
Expand All @@ -294,6 +295,7 @@ TEST(GatherBlockQuantizedOpTest, UnsupportedTypes) {
Test_Fail_WithZeroPoints<Int4x2, BFloat16, int32_t>(0, 2, 16);
Test_Fail_WithZeroPoints<uint8_t, float, int16_t>(0, 2, 16);
}
#endif

template <typename T1, typename T2, typename Tind>
void Test_Fail_WithoutZeroPoints(int64_t gather_axis,
Expand Down Expand Up @@ -322,6 +324,7 @@ void Test_Fail_WithoutZeroPoints(int64_t gather_axis,
gather_axis, quantize_axis, block_size, bits, output, output_shape, false);
}

#ifndef USE_CUDA
TEST(GatherBlockQuantizedOpTest, UnsupportedUInt8DataType) {
// Gather on axis other than 0 is not supported with uint8_t
Test_Fail_WithoutZeroPoints<uint8_t, float, int32_t>(1, 2, 16);
Expand Down Expand Up @@ -354,6 +357,7 @@ TEST(GatherBlockQuantizedOpTest, NotSupportedBits) {
Test_Fail_WithZeroPoints<UInt4x2, float, int32_t>(0, 2, 16, 6);
Test_Fail_WithZeroPoints<UInt4x2, float, int32_t>(0, 2, 16, 7);
}
#endif

template <typename T1, typename T2, typename Tind>
void Test_ShapeMismatch_WithZeroPoints() {
Expand Down Expand Up @@ -382,11 +386,13 @@ void Test_ShapeMismatch_WithZeroPoints() {
gather_axis, quantize_axis, block_size, bits, output, output_shape, false);
}

#ifndef USE_CUDA
TEST(GatherBlockQuantizedOpTest, ShapeMismatch) {
Test_ShapeMismatch_WithZeroPoints<UInt4x2, float, int32_t>();
Test_ShapeMismatch_WithZeroPoints<Int4x2, float, int32_t>();
Test_ShapeMismatch_WithZeroPoints<uint8_t, float, int32_t>();
}
#endif

template <typename T1, typename T2, typename Tind>
void Test_InvalidIndices_WithZeroPoints() {
Expand Down Expand Up @@ -415,11 +421,13 @@ void Test_InvalidIndices_WithZeroPoints() {
gather_axis, quantize_axis, block_size, bits, output, output_shape, false, true);
}

#ifndef USE_CUDA
TEST(GatherBlockQuantizedOpTest, InvalidIndices) {
Test_InvalidIndices_WithZeroPoints<UInt4x2, float, int32_t>();
Test_InvalidIndices_WithZeroPoints<Int4x2, float, int32_t>();
Test_InvalidIndices_WithZeroPoints<uint8_t, float, int32_t>();
}
#endif

template <typename T1, typename T2, typename Tind>
void Test_GatherAxis0_WithZeroPoints(int bits = 4) {
Expand Down Expand Up @@ -452,6 +460,7 @@ void Test_GatherAxis0_WithZeroPoints(int bits = 4) {
-3, -1, block_size, bits, output, output_shape, true);
}

#ifndef USE_CUDA
TEST(GatherBlockQuantizedOpTest, GatherAxis0WithZeroPoints) {
Test_GatherAxis0_WithZeroPoints<UInt4x2, float, int32_t>();
Test_GatherAxis0_WithZeroPoints<Int4x2, float, int32_t>();
Expand All @@ -462,6 +471,7 @@ TEST(GatherBlockQuantizedOpTest, GatherAxis0WithZeroPoints) {
Test_GatherAxis0_WithZeroPoints<UInt4x2, MLFloat16, int64_t>();
Test_GatherAxis0_WithZeroPoints<Int4x2, MLFloat16, int64_t>();
}
#endif

template <typename T1, typename T2, typename Tind>
void Test_GatherAxis0_WithZeroPoints_Uint8(int bits = 4) {
Expand Down