Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CUDA_STATIC_MATH_LIBRARIES #216

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ option(CUDA_ENABLE_KERNELINFO "Enable kernel resource usage info" OFF)
option(CUDA_ENABLE_LINEINFO
"Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler)" OFF
)
option(CUDA_STATIC_RUNTIME "Statically link the CUDA toolkit runtime and libraries" OFF)
option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF)
option(CUDA_STATIC_MATH_LIBRARIES "Statically link the CUDA math libraries" OFF)
option(CUVS_USE_RAFT_STATIC "Build and statically link the RAFT libraries" OFF)
option(CUDA_LOG_COMPILE_TIME "Write a log of compilation times to nvcc_compile_log.csv" OFF)
option(DETECT_CONDA_ENV "Enable detection of conda environment for dependencies" ON)
Expand Down Expand Up @@ -101,7 +102,10 @@ message(VERBOSE "cuVS: Enable kernel resource usage info: ${CUDA_ENABLE_KERNELIN
message(VERBOSE "cuVS: Enable lineinfo in nvcc: ${CUDA_ENABLE_LINEINFO}")
message(VERBOSE "cuVS: Enable nvtx markers: ${CUVS_NVTX}")
message(VERBOSE
"cuVS: Statically link the CUDA toolkit runtime and libraries: ${CUDA_STATIC_RUNTIME}"
"cuVS: Statically link the CUDA runtime: ${CUDA_STATIC_RUNTIME}"
)
message(VERBOSE
"cuVS: Statically link the CUDA math libraries: ${CUDA_STATIC_MATH_LIBRARIES}"
)
message(VERBOSE "cuVS: Build and statically link RAFT libraries: ${CUVS_USE_RAFT_STATIC}")

Expand Down Expand Up @@ -132,7 +136,7 @@ endif()
# * compiler options ----------------------------------------------------------

set(_ctk_static_suffix "")
if(CUDA_STATIC_RUNTIME)
if(CUDA_STATIC_MATH_LIBRARIES)
set(_ctk_static_suffix "_static")
endif()

Expand Down
5 changes: 5 additions & 0 deletions docs/source/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ cuVS has the following configurable cmake flags available:
- OFF
- Statically link the CUDA runtime

* - CUDA_STATIC_MATH_LIBRARIES
- ON, OFF
- OFF
- Statically link the CUDA math libraries

* - DETECT_CONDA_ENV
- ON, OFF
- ON
Expand Down
1 change: 1 addition & 0 deletions python/cuvs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ if(NOT cuvs_FOUND)

# Statically link dependencies if building wheels
set(CUDA_STATIC_RUNTIME ON)
set(CUDA_STATIC_MATH_LIBRARIES ON)
set(CUVS_USE_RAFT_STATIC ON)

add_subdirectory(../../cpp cuvs-cpp EXCLUDE_FROM_ALL)
Expand Down
Loading