Skip to content

Commit

Permalink
Make rpath usage configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Sep 30, 2024
1 parent 606a0ac commit 128c2a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions ci/build_wheel_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cd "${package_dir}"
echo "libkvikio-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${CPP_WHEELHOUSE}/libkvikio_*.whl)" > ./constraints.txt

PIP_CONSTRAINT="${PWD}/constraints.txt" \
SKBUILD_CMAKE_ARGS="-DUSE_CUDA_NVCOMP_WHEEL=ON" \
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check

mkdir -p final_dist
Expand Down
2 changes: 2 additions & 0 deletions python/kvikio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ project(
LANGUAGES CXX CUDA
)

option(USE_CUDA_NVCOMP_WHEEL "Use the CUDA nvcomp wheel instead of the system library" OFF)

# TODO: Should we symlink FindcuFile.cmake into python/cmake? find cuFile
include(../../cpp/cmake/Modules/FindcuFile.cmake)

Expand Down
18 changes: 10 additions & 8 deletions python/kvikio/kvikio/_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ rapids_cython_create_modules(
SOURCE_FILES "${cython_modules}"
LINKED_LIBRARIES kvikio::kvikio nvcomp::nvcomp
)
set(rpaths "$ORIGIN/../../nvidia/nvcomp")
foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
set_property(
TARGET ${tgt}
PROPERTY INSTALL_RPATH ${rpaths}
APPEND
)
endforeach()
if(USE_CUDA_NVCOMP_WHEEL)
set(rpaths "$ORIGIN/../../nvidia/nvcomp")
foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
set_property(
TARGET ${tgt}
PROPERTY INSTALL_RPATH ${rpaths}
APPEND
)
endforeach()
endif()

0 comments on commit 128c2a5

Please sign in to comment.