diff --git a/conda/recipes/libnvforest/recipe.yaml b/conda/recipes/libnvforest/recipe.yaml index 5777e5a..1994538 100644 --- a/conda/recipes/libnvforest/recipe.yaml +++ b/conda/recipes/libnvforest/recipe.yaml @@ -104,7 +104,6 @@ outputs: - cuda-cudart-dev run: - ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }} - - cuda-cudart - librmm =${{ minor_version }} - rapids-logger =0.2 - treelite ${{ treelite_version }} @@ -139,7 +138,6 @@ outputs: run: - ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }} - ${{ pin_subpackage("libnvforest", exact=True) }} - - cuda-cudart ignore_run_exports: by_name: - cuda-cudart diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 72913df..d369273 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -58,7 +58,6 @@ option(DISABLE_DEPRECATION_WARNINGS "Disable deprecation warnings " ON) option(DISABLE_OPENMP "Disable OpenMP" OFF) option(NVTX "Enable nvtx markers" OFF) option(USE_CCACHE "Cache build artifacts with ccache" OFF) -option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF) option(NVFOREST_USE_RAFT_STATIC "Build and statically link the RAFT library" OFF) option(NVFOREST_USE_TREELITE_STATIC "Build and statically link the treelite library" OFF) option(NVFOREST_EXPORT_TREELITE_LINKAGE "Whether to publicly or privately link treelite to libnvforest++" OFF) @@ -79,7 +78,6 @@ message(VERBOSE "NVFOREST_CPP: Enabling kernelinfo in nvcc: ${CUDA_ENABLE_KERNEL message(VERBOSE "NVFOREST_CPP: Enabling lineinfo in nvcc: ${CUDA_ENABLE_LINE_INFO}") message(VERBOSE "NVFOREST_CPP: Enabling nvtx markers: ${NVTX}") message(VERBOSE "NVFOREST_CPP: Cache build artifacts with ccache: ${USE_CCACHE}") -message(VERBOSE "NVFOREST_CPP: Statically link the CUDA runtime: ${CUDA_STATIC_RUNTIME}") message(VERBOSE "NVFOREST_CPP: Build and statically link RAFT library: ${NVFOREST_USE_RAFT_STATIC}") message(VERBOSE "NVFOREST_CPP: Build and statically link Treelite library: ${NVFOREST_USE_TREELITE_STATIC}") @@ -150,7 +148,7 @@ if(NOT DISABLE_OPENMP) endif() # CUDA runtime -rapids_cuda_init_runtime(USE_STATIC ${CUDA_STATIC_RUNTIME}) +rapids_cuda_init_runtime(USE_STATIC ON) # * find CUDAToolkit package # * determine GPU architectures @@ -296,16 +294,9 @@ endif() # These are always private: list(APPEND _nvforest_cpp_private_libs ${TREELITE_LIBS} ${OpenMP_CXX_LIB_NAMES}) -set(_nvforest_cpp_libs_var_name "_nvforest_cpp_public_libs") -if(CUDA_STATIC_RUNTIME) - set(_nvforest_cpp_libs_var_name "_nvforest_cpp_private_libs") - # Add CTK include paths because we're going to make our CTK library links private below - target_include_directories(${NVFOREST_CPP_TARGET} SYSTEM PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) -endif() - target_link_libraries( ${NVFOREST_CPP_TARGET} - PUBLIC rapids_logger::rapids_logger rmm::rmm raft::raft ${_nvforest_cpp_public_libs} + PUBLIC rapids_logger::rapids_logger rmm::rmm raft::raft CUDA::cudart_static ${_nvforest_cpp_public_libs} PRIVATE ${_nvforest_cpp_private_libs}) # Ensure CUDA symbols aren't relocated to the middle of the debug build binaries diff --git a/docs/source/build.rst b/docs/source/build.rst index c6f4800..4e4f084 100644 --- a/docs/source/build.rst +++ b/docs/source/build.rst @@ -292,10 +292,6 @@ nvForest's cmake has the following configurable flags available: - [ON, OFF] - OFF - Whether to cache build artifacts with ccache. - * - CUDA_STATIC_RUNTIME - - [ON, OFF] - - OFF - - Whether to statically link the CUDA runtime. * - NVFOREST_USE_RAFT_STATIC - [ON, OFF] - OFF diff --git a/python/libnvforest/CMakeLists.txt b/python/libnvforest/CMakeLists.txt index c076293..5024ddd 100644 --- a/python/libnvforest/CMakeLists.txt +++ b/python/libnvforest/CMakeLists.txt @@ -42,9 +42,6 @@ set(NVFOREST_PYTHON_TREELITE_TARGET treelite::treelite_static) set(NVFOREST_USE_TREELITE_STATIC ON) set(NVFOREST_EXCLUDE_TREELITE_FROM_ALL ON) -# --- CUDA --- # -set(CUDA_STATIC_RUNTIME ON) - add_subdirectory(../../cpp nvforest-cpp) set_property(