From b45e27bc8ddfcf9f637de7d422497f3ccd23f45e Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 5 Apr 2021 11:04:28 -0400 Subject: [PATCH] Reduce the size of the cuml libraries (#3702) By explicitly telling nvcc's fatbin pass to always compress device code we can ensure that our binaries are the smallest possible size. See https://github.com/rapidsai/cudf/pull/7583 for additional context. Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: https://github.com/rapidsai/cuml/pull/3702 --- cpp/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 63fe3ded7a..29af068f06 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -325,6 +325,9 @@ set(FAISS_GPU_ARCHS "${FAISS_GPU_ARCHS} ${ptx}") set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcudafe --diag_suppress=unrecognized_gcc_pragma") +# make sure we produce smallest binary size +string(APPEND CMAKE_CUDA_FLAGS " -Xfatbin=-compress-all") + ############################################################################## # - dependencies -------------------------------------------------------------