Skip to content

Commit 70f14d7

Browse files
authored
[CUDA] Suppress MSVC build warnings for sm=90 (#25020)
### Description Suppress some build warnings in Windows for sm=90. ### Motivation and Context I saw some build warnings during building Windows for sm=90 with cuda 12.8. Those are caused by cutlass. It is safe to suppress them.
1 parent 2ea4ea4 commit 70f14d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ if (onnxruntime_USE_ROCM)
372372
if (HIPIFY_PERL_PATH-NOTFOUND)
373373
MESSAGE(FATAL_ERROR "hipify-perl not found")
374374
endif()
375-
MESSAGE("HIPIFY PATH:"${HIPIFY_PERL_PATH}/hipify-perl)
375+
MESSAGE("HIPIFY PATH: ${HIPIFY_PERL_PATH}/hipify-perl")
376376
set(onnxruntime_HIPIFY_PERL ${HIPIFY_PERL_PATH}/hipify-perl)
377377
endif()
378378

cmake/onnxruntime_providers_cuda.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@
264264
if("90" IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG)
265265
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xptxas=-w>)
266266
target_compile_definitions(${target} PRIVATE COMPILE_HOPPER_TMA_GEMMS)
267+
if (MSVC)
268+
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /bigobj>")
269+
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--diag-suppress=177>")
270+
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4172>")
271+
endif()
267272
endif()
268273

269274
if (onnxruntime_ENABLE_CUDA_PROFILING) # configure cupti for cuda profiling

0 commit comments

Comments
 (0)