Skip to content

Commit c94e7e6

Browse files
committed
Remove CUDA_STATIC_RUNTIME option, always use static linking
- Remove CUDA_STATIC_RUNTIME option from cpp/CMakeLists.txt - Always use static CUDA runtime in rapids_cuda_init_runtime - Update get_cutlass.cmake and get_faiss.cmake to always use static - Remove CUDA_STATIC_RUNTIME from python/libcuvs/CMakeLists.txt - Remove CUDA_STATIC_RUNTIME from docs - Remove cuda-cudart from run requirements in conda recipes
1 parent c4c1daf commit c94e7e6

7 files changed

Lines changed: 3 additions & 23 deletions

File tree

conda/recipes/cuvs/recipe.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ requirements:
7272
- if: cuda_major == "12"
7373
then: cuda-python >=12.9.2,<13.0
7474
else: cuda-python >=13.0.1,<14.0
75-
- cuda-cudart
7675
ignore_run_exports:
7776
by_name:
7877
- cuda-version
79-
- cuda-cudart
8078

8179
tests:
8280
- python:

conda/recipes/libcuvs/recipe.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,12 @@ outputs:
111111
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
112112
- libraft-headers =${{ minor_version }}
113113
- nccl
114-
- cuda-cudart
115114
- libcublas
116115
- libcurand
117116
- libcusolver
118117
- libcusparse
119118
ignore_run_exports:
120119
by_name:
121-
- cuda-cudart
122120
- cuda-version
123121
- libaio
124122
- libboost
@@ -166,14 +164,12 @@ outputs:
166164
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
167165
- libraft-headers =${{ minor_version }}
168166
- nccl
169-
- cuda-cudart
170167
- libcublas
171168
- libcurand
172169
- libcusolver
173170
- libcusparse
174171
ignore_run_exports:
175172
by_name:
176-
- cuda-cudart
177173
- cuda-version
178174
- libaio
179175
- libboost
@@ -252,14 +248,12 @@ outputs:
252248
- ${{ pin_subpackage("libcuvs", exact=True) }}
253249
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
254250
- nccl
255-
- cuda-cudart
256251
- libcublas
257252
- libcurand
258253
- libcusolver
259254
- libcusparse
260255
ignore_run_exports:
261256
by_name:
262-
- cuda-cudart
263257
- cuda-version
264258
- libaio
265259
- libboost
@@ -319,7 +313,6 @@ outputs:
319313
run:
320314
- ${{ pin_subpackage("libcuvs", exact=True) }}
321315
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
322-
- cuda-cudart
323316
- libcublas
324317
- libcurand
325318
- libcusolver
@@ -330,7 +323,6 @@ outputs:
330323
then: mkl =2023
331324
ignore_run_exports:
332325
by_name:
333-
- cuda-cudart
334326
- cuda-version
335327
- libcublas
336328
- libcurand

cpp/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ option(CUDA_ENABLE_KERNELINFO "Enable kernel resource usage info" OFF)
5454
option(CUDA_ENABLE_LINEINFO
5555
"Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler)" OFF
5656
)
57-
option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF)
5857
option(CUDA_STATIC_MATH_LIBRARIES "Statically link the CUDA math libraries" OFF)
5958
option(CUVS_STATIC_RAPIDS_LIBRARIES "Build and statically link RAPIDS libraries" OFF)
6059
option(CUDA_LOG_COMPILE_TIME "Write a log of compilation times to nvcc_compile_log.csv" OFF)
@@ -112,7 +111,6 @@ message(VERBOSE "cuVS: Disable OpenMP: ${DISABLE_OPENMP}")
112111
message(VERBOSE "cuVS: Enable kernel resource usage info: ${CUDA_ENABLE_KERNELINFO}")
113112
message(VERBOSE "cuVS: Enable lineinfo in nvcc: ${CUDA_ENABLE_LINEINFO}")
114113
message(VERBOSE "cuVS: Enable nvtx markers: ${CUVS_NVTX}")
115-
message(VERBOSE "cuVS: Statically link the CUDA runtime: ${CUDA_STATIC_RUNTIME}")
116114
message(VERBOSE "cuVS: Statically link the CUDA math libraries: ${CUDA_STATIC_MATH_LIBRARIES}")
117115
message(VERBOSE "cuVS: Build and statically link RAPIDS libraries: ${CUVS_STATIC_RAPIDS_LIBRARIES}")
118116

@@ -149,7 +147,7 @@ endif()
149147

150148
if(NOT BUILD_CPU_ONLY)
151149
# CUDA runtime
152-
rapids_cuda_init_runtime(USE_STATIC ${CUDA_STATIC_RUNTIME})
150+
rapids_cuda_init_runtime(USE_STATIC ON)
153151
# * find CUDAToolkit package
154152
# * determine GPU architectures
155153
# * enable the CMake CUDA language

cpp/cmake/thirdparty/get_cutlass.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ function(find_and_configure_cutlass)
2424
CACHE BOOL "Disable CUTLASS to build with cuBLAS library."
2525
)
2626

27-
if (CUDA_STATIC_RUNTIME)
28-
set(CUDART_LIBRARY "${CUDA_cudart_static_LIBRARY}" CACHE FILEPATH "fixing cutlass cmake code" FORCE)
29-
endif()
27+
set(CUDART_LIBRARY "${CUDA_cudart_static_LIBRARY}" CACHE FILEPATH "fixing cutlass cmake code" FORCE)
3028

3129
include("${rapids-cmake-dir}/cpm/package_override.cmake")
3230
rapids_cpm_package_override("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../patches/cutlass_override.json")

cpp/cmake/thirdparty/get_faiss.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function(find_and_configure_faiss)
4747
"FAISS_ENABLE_CUVS ${PKG_ENABLE_GPU}"
4848
"FAISS_ENABLE_PYTHON OFF"
4949
"FAISS_OPT_LEVEL ${CUVS_FAISS_OPT_LEVEL}"
50-
"FAISS_USE_CUDA_TOOLKIT_STATIC ${CUDA_STATIC_RUNTIME}"
50+
"FAISS_USE_CUDA_TOOLKIT_STATIC ON"
5151
"BUILD_TESTING OFF"
5252
"CMAKE_MESSAGE_LOG_LEVEL VERBOSE"
5353
)

docs/source/build.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,6 @@ cuVS has the following configurable cmake flags available:
227227
- OFF
228228
- Enable the `-lineinfo` option for nvcc
229229

230-
* - CUDA_STATIC_RUNTIME
231-
- ON, OFF
232-
- OFF
233-
- Statically link the CUDA runtime
234-
235230
* - CUDA_STATIC_MATH_LIBRARIES
236231
- ON, OFF
237232
- OFF

python/libcuvs/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ endif()
3131
unset(cuvs_FOUND)
3232

3333
# --- CUDA --- #
34-
set(CUDA_STATIC_RUNTIME ON)
3534
set(CUDA_STATIC_MATH_LIBRARIES OFF)
3635

3736
# --- RAFT ---#

0 commit comments

Comments
 (0)