From 760a31c8481922cbc12fa6e0b2d13f67c175aaa9 Mon Sep 17 00:00:00 2001 From: Tianlei Wu Date: Tue, 16 Jul 2024 15:58:11 -0700 Subject: [PATCH] Exclude blkq4_fp16_gemm_sm80_test in cuda 12.5 build (#21373) There is build errors when build with CUDA 12.5 and `--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS=ON`. Temporally exclude blkq4_fp16_gemm_sm80_test to unblock cuda 12.5 build. --- .../test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80.h | 3 ++- .../providers/cuda/test_cases/blkq4_fp16_gemm_sm80_test.cc | 3 ++- .../providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) 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 fa1c739c04e3a..f96c8ce9ce729 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 @@ -13,7 +13,7 @@ */ #pragma once - +#if defined(CUDA_VERSION) && CUDA_VERSION <= 12030 #include "test/cuda_host/blkq4_fp16_quant_sm80.h" #include @@ -197,3 +197,4 @@ void run_blkq4_small_gemm(int m, int n, int k); } // namespace test } // namespace cuda } // namespace onnxruntime +#endif 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 b95e093e41eab..3fcb9045ee7e6 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 @@ -10,7 +10,7 @@ * This part requires gtest header files, which do not play * well with CUTLASS headers. */ - +#if defined(CUDA_VERSION) && CUDA_VERSION <= 12030 #include "blkq4_fp16_gemm_sm80.h" #include "gtest/gtest.h" @@ -341,3 +341,4 @@ TEST(BlkQ4_GEMM, Sm80SmallTileKernelTest) { } // namespace test } // namespace onnxruntime +#endif diff --git a/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu b/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu index f5600ca9885a3..8b27c3d8c3aed 100644 --- a/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu +++ b/onnxruntime/test/providers/cuda/test_cases/blkq4_fp16_gemm_sm80_testcu.cu @@ -11,6 +11,9 @@ * well with gtest headers. */ +// This test has build error with cuda 12.5 +#if defined(CUDA_VERSION) && CUDA_VERSION <= 12030 + #include "blkq4_fp16_gemm_sm80.h" #include @@ -532,3 +535,5 @@ template void run_blkq4_small_gemm<128, false, false>(int m, int n, int k); } // namespace test } // namespace cuda } // namespace onnxruntime + +#endif