From b8dfca0e8ac7ebbf073cad08791a2dcdfde5023a Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 1 Apr 2024 10:14:03 -0400 Subject: [PATCH] When using CUDA 12.4+ use zstd compression --- cpp/cmake/modules/ConfigureCUDA.cmake | 4 ++++ 1 file changed, 4 insertions(+) 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