mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
Merge
This commit is contained in:
commit
15cea1bbf1
1 changed files with 4 additions and 2 deletions
|
|
@ -159,13 +159,15 @@
|
|||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--threads \"${onnxruntime_NVCC_THREADS}\">")
|
||||
endif()
|
||||
|
||||
# relocatable-device-code=true
|
||||
# Since CUDA 12.8, compiling diagnostics become stricter
|
||||
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8)
|
||||
set_target_properties(${target} PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--relocatable-device-code=true>")
|
||||
set_target_properties(${target} PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
if (MSVC)
|
||||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4505>")
|
||||
endif()
|
||||
# skip diagnosis error caused by cuda header files
|
||||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--diag-suppress=221>")
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
|
|
|
|||
Loading…
Reference in a new issue