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

Use dynamic cudart for nvcomp in java build [skip-ci] #7896

Merged
merged 3 commits into from
Apr 7, 2021
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
3 changes: 3 additions & 0 deletions java/ci/build-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ fi
cd $WORKSPACE/java
mvn -B clean package $BUILD_ARG

###### Sanity test: fail if static cudart found ######
find . -name '*.so' | xargs -I{} readelf -Ws {} | grep cuInit && echo "Found statically linked CUDA runtime, this is currently not tested" && exit 1

###### Stash Jar files ######
rm -rf $OUT_PATH
mkdir -p $OUT_PATH
Expand Down
8 changes: 7 additions & 1 deletion java/src/main/native/cmake/Modules/ConfigureNvcomp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@

set(NVCOMP_ROOT "${CMAKE_BINARY_DIR}/nvcomp")

set(NVCOMP_CMAKE_ARGS "-DUSE_RMM=ON -DCUB_DIR=${CUB_INCLUDE}")
if(CUDA_STATIC_RUNTIME)
set(NVCOMP_CUDA_RUNTIME_LIBRARY Static)
else()
set(NVCOMP_CUDA_RUNTIME_LIBRARY Shared)
endif()

set(NVCOMP_CMAKE_ARGS "-DCMAKE_CUDA_RUNTIME_LIBRARY=${NVCOMP_CUDA_RUNTIME_LIBRARY} -DUSE_RMM=ON -DCUB_DIR=${CUB_INCLUDE}")

configure_file("${CMAKE_SOURCE_DIR}/cmake/Templates/Nvcomp.CMakeLists.txt.cmake"
"${NVCOMP_ROOT}/CMakeLists.txt")
Expand Down