diff --git a/cmake/external/emsdk b/cmake/external/emsdk index 4e2496141eda1..a896e3d066448 160000 --- a/cmake/external/emsdk +++ b/cmake/external/emsdk @@ -1 +1 @@ -Subproject commit 4e2496141eda15040c44e9bbf237a1326368e34c +Subproject commit a896e3d066448b3530dbcaa48869fafefd738f57 diff --git a/onnxruntime/test/cuda_host/blkq4_fp16_quant_sm80.h b/onnxruntime/test/cuda_host/blkq4_fp16_quant_sm80.h index d49484a072be1..ab59cc2c59b75 100644 --- a/onnxruntime/test/cuda_host/blkq4_fp16_quant_sm80.h +++ b/onnxruntime/test/cuda_host/blkq4_fp16_quant_sm80.h @@ -140,7 +140,7 @@ inline void sm80_expand_prepack_quant_offsets_ref( ORT_ENFORCE(tensor_offset_prepacked.shape() == meta_shape, "Unexpected tensor_offset_prepacked shape (", tensor_offset_prepacked.shape()[0], ",", tensor_offset_prepacked.shape()[1], - ")! Expected: (", meta_shape[0], ", ", meta_shape[1], ")"); + ")! Expected: (", meta_shape[0], ", ", meta_shape[1], ")"); ORT_ENFORCE(tensor_offset.shape() == zp_shape, "Unexpected tensor_offset shape (", tensor_offset.shape()[0], ",", tensor_offset.shape()[1], @@ -201,8 +201,7 @@ inline void sm80_expand_prepack_quant_offsets_ref( } template -inline -void sm80_prepack_quant_offsets_ref( +inline void sm80_prepack_quant_offsets_ref( int rows, int columns, MatrixRef tensor_offset, diff --git a/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80.h b/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80.h index 4cfb074e7df7d..bbe370675fc48 100644 --- a/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80.h +++ b/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80.h @@ -46,8 +46,7 @@ Status sm80_supported(); * @param[out] q_zp The zero points, column major layout. */ template -inline -void blkq4_weights_gen( +inline void blkq4_weights_gen( int rows, int columns, std::vector& dequants, std::vector& q_weights, @@ -130,7 +129,7 @@ void blkq4_weights_gen( q_scales, meta_shape); MatrixRef tensor_offset; - if constexpr(has_offsets) { + if constexpr (has_offsets) { q_zp.resize(zp_shape.product()); tensor_offset = MatrixRef( q_zp, zp_shape); @@ -155,7 +154,7 @@ void blkq4_weights_gen( auto weight_cord = make_Position(row / 2, col); auto scale_cord = make_Position(row / QuantBlocking::kRow, col / QuantBlocking::kColumn); uint8_t offset = 8; - if constexpr(has_offsets) { + if constexpr (has_offsets) { if (scale_cord[0] % 2 == 0) { offset = tensor_offset.at(scale_cord[0] / 2, scale_cord[1]) & 0x0f; } else { @@ -175,7 +174,6 @@ void blkq4_weights_gen( // fprintf(stderr, "(%2d,%2d)= %2d, %2d, %f, %f\n", row, col, w, offset, scale, dequant); } } - } template < diff --git a/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_test.cc b/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_test.cc index 148055bd046e2..897cf3fc774d3 100644 --- a/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_test.cc +++ b/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_test.cc @@ -56,7 +56,7 @@ void testPrepack(int rows, int columns) { MatrixRef tensor_scale( q_scales, meta_shape); MatrixRef tensor_offset; - if constexpr(has_offset) { + if constexpr (has_offset) { tensor_offset = MatrixRef(q_zp, zp_shape); } @@ -167,7 +167,7 @@ void testPrepack(int rows, int columns) { std::vector packed_scales_ref(meta_shape.product()); MatrixRef tensor_packed_s_ref = make_MatrixRef(packed_scales_ref, meta_shape); - if constexpr(Base::ShouldRearrangeMeta) { + if constexpr (Base::ShouldRearrangeMeta) { onnxruntime::test::sm80_prepack_quant_scales_ref( rows, columns, tensor_scale.const_ref(), tensor_packed_s_ref); } else { @@ -197,7 +197,7 @@ void testPrepack(int rows, int columns) { std::vector packed_zp_ref(meta_shape.product()); MatrixRef tensor_packed_zp_ref = make_MatrixRef(packed_zp_ref, meta_shape); - if constexpr(Base::ShouldRearrangeMeta) { + if constexpr (Base::ShouldRearrangeMeta) { onnxruntime::test::sm80_expand_prepack_quant_offsets_ref( rows, columns, tensor_offset.const_ref(), tensor_packed_zp_ref); } else {