diff --git a/onnxruntime/test/contrib_ops/quant_gemm_test.cc b/onnxruntime/test/contrib_ops/quant_gemm_test.cc index c8dbea216ec2a..3afcd6651aadd 100644 --- a/onnxruntime/test/contrib_ops/quant_gemm_test.cc +++ b/onnxruntime/test/contrib_ops/quant_gemm_test.cc @@ -35,7 +35,7 @@ void RunQuantGemmU8X8Test(const int M, constexpr int overflow_adjust = std::is_signed_v ? 2 : 1; constexpr int random_B_min = std::numeric_limits::min() / overflow_adjust; - constexpr int random_B_max = std::numeric_limits::min() / overflow_adjust; + constexpr int random_B_max = std::numeric_limits::max() / overflow_adjust; static std::uniform_int_distribution random_B(random_B_min, random_B_max); static std::uniform_real_distribution n_apha(1.0f, 2.0f);