Apache DataFusion SQL Query Engine
ARROW-4696: Better CUDA detection in release verification script
François Saint-Jacques57291dee8ad9
diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.shindex 3ba4ab541e..e96cd28a0a 100755--- a/dev/release/verify-release-candidate.sh+++ b/dev/release/verify-release-candidate.sh@@ -51,12 +51,19 @@ HERE=$(cd `dirname "${BASH_SOURCE[0]:-$0}"` && pwd)ARROW_DIST_URL='https://dist.apache.org/repos/dist/dev/arrow'-: ${ARROW_HAVE_CUDA:=}-if [ -z "$ARROW_HAVE_CUDA" ]; then- if nvidia-smi --list-gpus 2>&1 > /dev/null; then- ARROW_HAVE_CUDA=yes+detect_cuda() {+ if ! (which nvcc && which nvidia-smi) > /dev/null; then+ return 1fi++ local n_gpus=$(nvidia-smi --list-gpus | wc -l)+ return $((${n_gpus} < 1))+}++if [ -z "${ARROW_CUDA:-}" ] && detect_cuda; then+ ARROW_CUDA=ONfi+: ${ARROW_CUDA:=OFF}download_dist_file() {curl \@@ -202,10 +209,8 @@ ${ARROW_CMAKE_OPTIONS}-DARROW_BOOST_USE_SHARED=ON-DCMAKE_BUILD_TYPE=release-DARROW_BUILD_TESTS=ON+-DARROW_CUDA=${ARROW_CUDA}"- if [ "$ARROW_HAVE_CUDA" = "yes" ]; then- ARROW_CMAKE_OPTIONS="$ARROW_CMAKE_OPTIONS -DARROW_CUDA=ON"- ficmake $ARROW_CMAKE_OPTIONS ..make -j$NPROC@@ -273,7 +278,7 @@ test_ruby() {pushd rubylocal modules="red-arrow red-plasma red-gandiva red-parquet"- if [ "${ARROW_HAVE_CUDA}" = "yes" ]; then+ if [ "${ARROW_CUDA}" = "ON" ]; thenmodules="${modules} red-arrow-cuda"fi