From b12e76c03628fa3e307ef6bdb544b7f0abcb1dba Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 23 Oct 2024 13:51:40 +0200 Subject: [PATCH 1/9] add nvrtc to install scripts --- scripts/setup-centos9.sh | 3 ++- scripts/setup-ubuntu.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/setup-centos9.sh b/scripts/setup-centos9.sh index d8de1b50cc33..6d233eb192c8 100755 --- a/scripts/setup-centos9.sh +++ b/scripts/setup-centos9.sh @@ -220,7 +220,8 @@ function install_arrow { function install_cuda { # See https://developer.nvidia.com/cuda-downloads dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo - dnf install -y cuda-nvcc-$(echo $1 | tr '.' '-') cuda-cudart-devel-$(echo $1 | tr '.' '-') + local dashed="$(echo $1 | tr '.' '-')" + dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed } function install_velox_deps { diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 2676bd59ae1d..b5aa27202fbd 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -244,7 +244,8 @@ function install_cuda { rm cuda-keyring_1.1-1_all.deb $SUDO apt update fi - $SUDO apt install -y cuda-nvcc-$(echo $1 | tr '.' '-') cuda-cudart-dev-$(echo $1 | tr '.' '-') + local dashed="$(echo $1 | tr '.' '-')" + $SUDO apt install -y cuda-nvcc-$dashed cuda-cudart-dev-$dashed cuda-nvrtc-dev-$dashed } function install_velox_deps { From 92ba55a39b41ef124397e18e37f8b229c8f3ab0c Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 23 Oct 2024 13:51:48 +0200 Subject: [PATCH 2/9] turn on gpu build --- .github/workflows/linux-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index b897a345f562..a3b2f7b92e73 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -114,7 +114,7 @@ jobs: "-DVELOX_ENABLE_GCS=ON" "-DVELOX_ENABLE_ABFS=ON" "-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON" - "-DVELOX_ENABLE_GPU=OFF" + "-DVELOX_ENABLE_GPU=ON" "-DVELOX_MONO_LIBRARY=ON" ) make release EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS[*]}" From e5e37384a48ffaf006d87deba71d2739ab04a8a8 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 23 Oct 2024 19:45:18 +0200 Subject: [PATCH 3/9] install cuda-driver-devel --- scripts/setup-centos9.sh | 2 +- scripts/setup-ubuntu.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setup-centos9.sh b/scripts/setup-centos9.sh index 6d233eb192c8..f381bf5d1b64 100755 --- a/scripts/setup-centos9.sh +++ b/scripts/setup-centos9.sh @@ -221,7 +221,7 @@ function install_cuda { # See https://developer.nvidia.com/cuda-downloads dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo local dashed="$(echo $1 | tr '.' '-')" - dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed + dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed cuda-driver-devel-$dashedcuda-driver-devel-$dashed cuda-driver-devel-$dashed } function install_velox_deps { diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index b5aa27202fbd..fbaf63afc442 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -245,7 +245,7 @@ function install_cuda { $SUDO apt update fi local dashed="$(echo $1 | tr '.' '-')" - $SUDO apt install -y cuda-nvcc-$dashed cuda-cudart-dev-$dashed cuda-nvrtc-dev-$dashed + $SUDO apt install -y cuda-nvcc-$dashed cuda-cudart-dev-$dashed cuda-nvrtc-dev-$dashed cuda-driver-devel-$dashed } function install_velox_deps { From 5c00e24806b2b12d94ee425875a4b2db7b9673ff Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 23 Oct 2024 19:45:45 +0200 Subject: [PATCH 4/9] add missing links --- velox/experimental/wave/common/CMakeLists.txt | 2 ++ .../wave/common/tests/CMakeLists.txt | 8 +---- .../wave/dwio/decode/tests/CMakeLists.txt | 6 +--- .../wave/exec/tests/CMakeLists.txt | 34 +++++-------------- 4 files changed, 12 insertions(+), 38 deletions(-) diff --git a/velox/experimental/wave/common/CMakeLists.txt b/velox/experimental/wave/common/CMakeLists.txt index d7c621fbe1e5..443625ebd883 100644 --- a/velox/experimental/wave/common/CMakeLists.txt +++ b/velox/experimental/wave/common/CMakeLists.txt @@ -28,6 +28,8 @@ velox_link_libraries( velox_exception velox_common_base velox_type + CUDA::cuda_driver + CUDA::cudart CUDA::nvrtc) if(${VELOX_BUILD_TESTING}) diff --git a/velox/experimental/wave/common/tests/CMakeLists.txt b/velox/experimental/wave/common/tests/CMakeLists.txt index 4fffaf40ada0..0ad6951f665f 100644 --- a/velox/experimental/wave/common/tests/CMakeLists.txt +++ b/velox/experimental/wave/common/tests/CMakeLists.txt @@ -28,12 +28,6 @@ add_test(velox_wave_common_test velox_wave_common_test) target_link_libraries( velox_wave_common_test velox_wave_common - velox_memory - velox_time - velox_exception GTest::gtest GTest::gtest_main - gflags::gflags - glog::glog - Folly::folly - CUDA::nvrtc) + CUDA::cudart) diff --git a/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt b/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt index bba31ba3174d..79b0201c584f 100644 --- a/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt +++ b/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt @@ -21,11 +21,7 @@ target_link_libraries( velox_wave_decode velox_wave_common velox_memory - velox_time - velox_exception GTest::gtest GTest::gtest_main - gflags::gflags - glog::glog Folly::folly - CUDA::nvrtc) + fmt::fmt) diff --git a/velox/experimental/wave/exec/tests/CMakeLists.txt b/velox/experimental/wave/exec/tests/CMakeLists.txt index 92382cc2a1e0..a9f4f4a2ee09 100644 --- a/velox/experimental/wave/exec/tests/CMakeLists.txt +++ b/velox/experimental/wave/exec/tests/CMakeLists.txt @@ -40,23 +40,14 @@ target_link_libraries( velox_type velox_vector velox_vector_fuzzer - Boost::atomic - Boost::context - Boost::date_time - Boost::filesystem - Boost::program_options - Boost::regex - Boost::thread - Boost::system - gtest - gtest_main - gmock + GTest::gtest + GTest::gtest_main + GTest::gmock Folly::folly gflags::gflags glog::glog fmt::fmt - ${FILESYSTEM} - CUDA::nvrtc) + CUDA::cudart) add_test(velox_wave_exec_test velox_wave_exec_test) @@ -87,22 +78,13 @@ if(${VELOX_ENABLE_BENCHMARKS}) velox_type velox_vector velox_vector_fuzzer - Boost::atomic - Boost::context - Boost::date_time - Boost::filesystem - Boost::program_options - Boost::regex - Boost::thread - Boost::system - gtest - gtest_main - gmock + GTest::gtest + GTest::gtest_main + GTest::gmock ${FOLLY_BENCHMARK} Folly::folly gflags::gflags glog::glog fmt::fmt - ${FILESYSTEM} - CUDA::nvrtc) + CUDA::cudart) endif() From 802483306e53382885e636b0c8639f53f8b48e15 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 23 Oct 2024 19:55:45 +0200 Subject: [PATCH 5/9] label and exclude test using cuda driver --- .github/workflows/linux-build.yml | 2 +- velox/experimental/wave/common/tests/CMakeLists.txt | 1 + velox/experimental/wave/dwio/decode/tests/CMakeLists.txt | 1 + velox/experimental/wave/vector/tests/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index a3b2f7b92e73..2d86a6815a00 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -135,7 +135,7 @@ jobs: working-directory: _build/release run: | export CLASSPATH=`/usr/local/hadoop/bin/hdfs classpath --glob` - ctest -j 8 --output-on-failure --no-tests=error + ctest -j 8 --label-exclude cuda_driver --output-on-failure --no-tests=error ubuntu-debug: runs-on: 8-core-ubuntu diff --git a/velox/experimental/wave/common/tests/CMakeLists.txt b/velox/experimental/wave/common/tests/CMakeLists.txt index 0ad6951f665f..22507b09db9f 100644 --- a/velox/experimental/wave/common/tests/CMakeLists.txt +++ b/velox/experimental/wave/common/tests/CMakeLists.txt @@ -24,6 +24,7 @@ add_executable( HashTestUtil.cpp) add_test(velox_wave_common_test velox_wave_common_test) +set_tests_properties(velox_wave_common_test PROPERTIES LABELS cuda_driver) target_link_libraries( velox_wave_common_test diff --git a/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt b/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt index 79b0201c584f..66d35ec05a69 100644 --- a/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt +++ b/velox/experimental/wave/dwio/decode/tests/CMakeLists.txt @@ -15,6 +15,7 @@ add_executable(velox_wave_decode_test GpuDecoderTest.cu) add_test(velox_wave_decode_test velox_wave_decode_test) +set_tests_properties(velox_wave_decode_test PROPERTIES LABELS cuda_driver) target_link_libraries( velox_wave_decode_test diff --git a/velox/experimental/wave/vector/tests/CMakeLists.txt b/velox/experimental/wave/vector/tests/CMakeLists.txt index 1b12f8ad56ba..c6d94713a930 100644 --- a/velox/experimental/wave/vector/tests/CMakeLists.txt +++ b/velox/experimental/wave/vector/tests/CMakeLists.txt @@ -14,7 +14,7 @@ add_executable(velox_wave_vector_test VectorTest.cpp) -add_test(veloxwave__vector_test velox_wave_vector_test) +add_test(veloxwave_vector_test velox_wave_vector_test) target_link_libraries( velox_wave_vector_test From 85592f193fca86b1110d14dfe9ddc6fccec1d61a Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 23 Oct 2024 20:01:57 +0200 Subject: [PATCH 6/9] fix typo in install script --- scripts/setup-centos9.sh | 2 +- scripts/setup-ubuntu.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setup-centos9.sh b/scripts/setup-centos9.sh index f381bf5d1b64..04224adc90d1 100755 --- a/scripts/setup-centos9.sh +++ b/scripts/setup-centos9.sh @@ -221,7 +221,7 @@ function install_cuda { # See https://developer.nvidia.com/cuda-downloads dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo local dashed="$(echo $1 | tr '.' '-')" - dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed cuda-driver-devel-$dashedcuda-driver-devel-$dashed cuda-driver-devel-$dashed + dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed cuda-driver-devel-$dashed } function install_velox_deps { diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index fbaf63afc442..5874e98e9651 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -245,7 +245,7 @@ function install_cuda { $SUDO apt update fi local dashed="$(echo $1 | tr '.' '-')" - $SUDO apt install -y cuda-nvcc-$dashed cuda-cudart-dev-$dashed cuda-nvrtc-dev-$dashed cuda-driver-devel-$dashed + $SUDO apt install -y cuda-nvcc-$dashed cuda-cudart-dev-$dashed cuda-nvrtc-dev-$dashed cuda-driver-dev-$dashed } function install_velox_deps { From 045d349c609739b7c12ba6600192bd3cb878ce0f Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 24 Oct 2024 01:18:37 +0200 Subject: [PATCH 7/9] turn all wave libraries that link against wave_common into standalone libraries --- velox/experimental/wave/common/CMakeLists.txt | 4 ++-- velox/experimental/wave/dwio/decode/CMakeLists.txt | 4 ++-- velox/experimental/wave/exec/CMakeLists.txt | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/velox/experimental/wave/common/CMakeLists.txt b/velox/experimental/wave/common/CMakeLists.txt index 443625ebd883..8cea9f79c1a5 100644 --- a/velox/experimental/wave/common/CMakeLists.txt +++ b/velox/experimental/wave/common/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -velox_add_library( +add_library( velox_wave_common GpuArena.cpp Buffer.cpp @@ -23,7 +23,7 @@ velox_add_library( Type.cpp ResultStaging.cpp) -velox_link_libraries( +target_link_libraries( velox_wave_common velox_exception velox_common_base diff --git a/velox/experimental/wave/dwio/decode/CMakeLists.txt b/velox/experimental/wave/dwio/decode/CMakeLists.txt index 790995c47a3c..412ba83c8bd3 100644 --- a/velox/experimental/wave/dwio/decode/CMakeLists.txt +++ b/velox/experimental/wave/dwio/decode/CMakeLists.txt @@ -14,6 +14,6 @@ add_subdirectory(tests) -velox_add_library(velox_wave_decode GpuDecoder.cu) +add_library(velox_wave_decode GpuDecoder.cu) -velox_link_libraries(velox_wave_decode velox_wave_common) +target_link_libraries(velox_wave_decode velox_wave_common) diff --git a/velox/experimental/wave/exec/CMakeLists.txt b/velox/experimental/wave/exec/CMakeLists.txt index 024efe9f8f97..98548c2b44b1 100644 --- a/velox/experimental/wave/exec/CMakeLists.txt +++ b/velox/experimental/wave/exec/CMakeLists.txt @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -velox_add_library(velox_wave_stream OperandSet.cpp Wave.cpp) +add_library(velox_wave_stream OperandSet.cpp Wave.cpp) -velox_link_libraries(velox_wave_stream Folly::folly fmt::fmt xsimd) +target_link_libraries(velox_wave_stream Folly::folly fmt::fmt xsimd) -velox_add_library( +add_library( velox_wave_exec Aggregation.cpp AggregationInstructions.cu @@ -34,7 +34,7 @@ velox_add_library( WaveHiveDataSource.cpp WaveSplitReader.cpp) -velox_link_libraries( +target_link_libraries( velox_wave_exec velox_wave_vector velox_wave_common From 4c2a83711fc839e28e4aaedb0d481e7d28162013 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 24 Oct 2024 17:50:40 +0200 Subject: [PATCH 8/9] add missing label --- velox/experimental/wave/exec/tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/velox/experimental/wave/exec/tests/CMakeLists.txt b/velox/experimental/wave/exec/tests/CMakeLists.txt index a9f4f4a2ee09..49e6da748f3b 100644 --- a/velox/experimental/wave/exec/tests/CMakeLists.txt +++ b/velox/experimental/wave/exec/tests/CMakeLists.txt @@ -50,6 +50,7 @@ target_link_libraries( CUDA::cudart) add_test(velox_wave_exec_test velox_wave_exec_test) +set_tests_properties(velox_wave_exec_test PROPERTIES LABELS cuda_driver) if(${VELOX_ENABLE_BENCHMARKS}) add_executable(velox_wave_benchmark WaveBenchmark.cpp) From 742492300ce12ceb8b8578a985475435a4588831 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 25 Oct 2024 02:21:45 +0200 Subject: [PATCH 9/9] format --- velox/experimental/wave/dwio/decode/CMakeLists.txt | 3 ++- velox/experimental/wave/exec/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/velox/experimental/wave/dwio/decode/CMakeLists.txt b/velox/experimental/wave/dwio/decode/CMakeLists.txt index 412ba83c8bd3..6e7e9c780e41 100644 --- a/velox/experimental/wave/dwio/decode/CMakeLists.txt +++ b/velox/experimental/wave/dwio/decode/CMakeLists.txt @@ -16,4 +16,5 @@ add_subdirectory(tests) add_library(velox_wave_decode GpuDecoder.cu) -target_link_libraries(velox_wave_decode velox_wave_common) +target_link_libraries( + velox_wave_decode velox_wave_common) diff --git a/velox/experimental/wave/exec/CMakeLists.txt b/velox/experimental/wave/exec/CMakeLists.txt index 98548c2b44b1..4b4d7ef2619b 100644 --- a/velox/experimental/wave/exec/CMakeLists.txt +++ b/velox/experimental/wave/exec/CMakeLists.txt @@ -14,7 +14,8 @@ add_library(velox_wave_stream OperandSet.cpp Wave.cpp) -target_link_libraries(velox_wave_stream Folly::folly fmt::fmt xsimd) +target_link_libraries( + velox_wave_stream Folly::folly fmt::fmt xsimd) add_library( velox_wave_exec