Skip to content

Commit

Permalink
Check cuda dependencies after build
Browse files Browse the repository at this point in the history
Signed-off-by: Peixin Li <[email protected]>
  • Loading branch information
pxLi committed Jun 26, 2024
1 parent 30cf3a7 commit 346b0d5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ci/check-cuda-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# common script to help check if libcudf.so has dynamical link to cuda libs

set -exo pipefail

jar_path=$1
tmp_path=/tmp/"jni-$(date "+%Y%m%d%H%M%S")"
unzip -j "${jar_path}" "*64/Linux/libcudf.so" -d "${tmp_path}"

if objdump -p "${tmp_path}/libcudf.so" | grep NEEDED | grep -q cuda; then
echo "dynamical link to CUDA lib found in libcudf.so..."
ldd "${tmp_path}/libcudf.so"
exit 1
else
echo "no dynamical link to CUDA lib found in libcudf.so"
fi
5 changes: 5 additions & 0 deletions ci/nightly-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ USE_GDS=${USE_GDS:-ON}
USE_SANITIZER=${USE_SANITIZER:-ON}
BUILD_FAULTINJ=${BUILD_FAULTINJ:-ON}
ARM64=${ARM64:-false}
artifact_suffix="${CUDA_VER}"

profiles="source-javadoc"
if [ "${ARM64}" == "true" ]; then
profiles="${profiles},arm64"
USE_GDS="OFF"
USE_SANITIZER="ON"
BUILD_FAULTINJ="OFF"
artifact_suffix="${artifact_suffix}-arm64"
fi

${MVN} clean package ${MVN_MIRROR} \
Expand All @@ -45,3 +47,6 @@ ${MVN} clean package ${MVN_MIRROR} \
-DUSE_GDS=${USE_GDS} -Dtest=*,!CuFileTest,!CudaFatalTest,!ColumnViewNonEmptyNullsTest \
-DBUILD_TESTS=ON -DBUILD_FAULTINJ=${BUILD_FAULTINJ} -Dcuda.version=$CUDA_VER \
-DUSE_SANITIZER=${USE_SANITIZER}

build_name=$($MVN help:evaluate -Dexpression=project.build.finalName -q -DforceStdout)
. ci/check-cuda-dependencies.sh "target/${build_name}-${artifact_suffix}.jar"
3 changes: 3 additions & 0 deletions ci/premerge-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ ${MVN} verify ${MVN_MIRROR} \
-Dlibcudf.build.configure=true \
-DUSE_GDS=ON -Dtest=*,!CuFileTest,!CudaFatalTest,!ColumnViewNonEmptyNullsTest \
-DBUILD_TESTS=ON

build_name=$($MVN help:evaluate -Dexpression=project.build.finalName -q -DforceStdout)
. ci/check-cuda-dependencies.sh "target/${build_name}-cuda11.jar"
3 changes: 3 additions & 0 deletions ci/submodule-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ else
echo "Test failed, will update the result"
fi

build_name=$($MVN help:evaluate -Dexpression=project.build.finalName -q -DforceStdout)
. ci/check-cuda-dependencies.sh "target/${build_name}-cuda11.jar"

LIBCUDF_BUILD_PATH=$(${MVN} help:evaluate -Dexpression=libcudf.build.path -q -DforceStdout)
# Extract the rapids-cmake sha1 that we need to pin too
rapids_cmake_sha=$(git -C ${LIBCUDF_BUILD_PATH}/_deps/rapids-cmake-src/ rev-parse HEAD)
Expand Down

0 comments on commit 346b0d5

Please sign in to comment.