File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,10 +10,23 @@ function(cub_build_compiler_targets)
1010
1111 thrust_create_target (cub.thrust HOST CPP DEVICE CUDA )
1212
13+ set (ptxas_compile_options "--warn-on-spills" "--warn-on-local-memory-usage" )
1314 set (cuda_compile_options)
1415 set (cxx_compile_options)
1516 set (cxx_compile_definitions)
1617
18+ # append ptxas compile options to cuda_compile_options with compiler specific prefix
19+ foreach (ptxas_compile_option ${ptxas_compile_options} )
20+ if (
21+ "${CMAKE_CUDA_COMPILER_ID} " STREQUAL "NVIDIA"
22+ OR "${CMAKE_CUDA_COMPILER_ID} " STREQUAL "NVHPC"
23+ )
24+ list (APPEND cuda_compile_options "-Xptxas=${ptxas_compile_option} " )
25+ elseif ("${CMAKE_CUDA_COMPILER_ID} " STREQUAL "CLANG" )
26+ list (APPEND cuda_compile_options "-Xcuda-ptxas ${ptxas_compile_option} " )
27+ endif ()
28+ endforeach ()
29+
1730 cccl_build_compiler_interface (
1831 cub.compiler_flags
1932 "${cuda_compile_options} "
You can’t perform that action at this time.
0 commit comments