diff --git a/cpp/cmake/modules/ConfigureCUDA.cmake b/cpp/cmake/modules/ConfigureCUDA.cmake index ea8a077b0..14c0179f4 100644 --- a/cpp/cmake/modules/ConfigureCUDA.cmake +++ b/cpp/cmake/modules/ConfigureCUDA.cmake @@ -38,6 +38,10 @@ list(APPEND RAFT_CXX_FLAGS "-DCUDA_API_PER_THREAD_DEFAULT_STREAM") list(APPEND RAFT_CUDA_FLAGS "-DCUDA_API_PER_THREAD_DEFAULT_STREAM") # make sure we produce smallest binary size list(APPEND RAFT_CUDA_FLAGS -Xfatbin=-compress-all) +if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND + CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.4.0) + list(APPEND RAFT_CUDA_FLAGS -Xfatbin=-compress-algo=5) +endif() # Option to enable line info in CUDA device compilation to allow introspection when profiling / # memchecking