Skip to content

Commit b57b204

Browse files
authored
Merge pull request #1 from karthikeyann/integrate_custom_cudf_hash_join
Integrate custom cudf hash join
2 parents 1dfa273 + e0eb590 commit b57b204

27 files changed

+9371
-18
lines changed

.github/workflows/linux-build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ on:
2020
- "velox-cudf"
2121
- "pull-request/[0-9]+"
2222

23-
# concurrency:
24-
# group: ${{ github.workflow }}-${{ github.ref }}
25-
# cancel-in-progress: true
26-
2723
permissions:
2824
contents: read
2925

@@ -113,7 +109,7 @@ jobs:
113109
LIBHDFS3_CONF: "${{ github.workspace }}/scripts/hdfs-client.xml"
114110
working-directory: _build/release
115111
run: |
116-
ctest -j 8 --output-on-failure --no-tests=error -E "velox_exec_test|velox_hdfs_file_test|velox_s3"
112+
ctest -j 8 --output-on-failure --no-tests=error -E "velox_exec_test|velox_hdfs_file_test|velox_s3|cudf"
117113
118114
ubuntu-debug:
119115
runs-on: linux-amd64-cpu8
@@ -169,4 +165,4 @@ jobs:
169165

170166
- name: Run Tests
171167
run: |
172-
cd _build/debug && ctest -j 8 --output-on-failure --no-tests=error -E velox_exec_test
168+
cd _build/debug && ctest -j 8 --output-on-failure --no-tests=error -E "velox_exec_test|cudf"

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ m4/lt~obsolete.m4
7979
#m4/
8080
build/
8181
_build/
82+
.cache/
8283
.ccache/
8384
#*.m4
8485
*.o
@@ -88,7 +89,7 @@ _build/
8889
*.pdf
8990
*.swp
9091
a.out
91-
CMake/resolve_dependency_module/boost/FindBoost.cmake
92+
CMake/resolve_dependency_modules/boost/FindBoost.cmake
9293
__cmake_systeminformation/
9394

9495
#==============================================================================#
@@ -322,3 +323,6 @@ src/amalgamation/
322323
velox/docs/sphinx/source/README_generated_*
323324
velox/docs/bindings/python/_generate/*
324325
scripts/bm-report/report.html
326+
327+
aws-sdk-cpp
328+
xsimd

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ if("${ENABLE_ALL_WARNINGS}")
337337
-Wno-unused-parameter \
338338
-Wno-sign-compare \
339339
-Wno-ignored-qualifiers \
340-
-Wnon-virtual-dtor \
340+
-Wno-missing-field-initializers \
341+
-Wno-deprecated-copy \
341342
${KNOWN_COMPILER_SPECIFIC_WARNINGS}")
342343

343344
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ${KNOWN_WARNINGS}")
@@ -543,9 +544,7 @@ include_directories(SYSTEM velox/external)
543544
if(NOT VELOX_DISABLE_GOOGLETEST)
544545
set(gtest_SOURCE AUTO)
545546
resolve_dependency(gtest)
546-
set(VELOX_GTEST_INCUDE_DIR
547-
"${gtest_SOURCE_DIR}/googletest/include"
548-
PARENT_SCOPE)
547+
set(VELOX_GTEST_INCLUDE_DIR "${gtest_SOURCE_DIR}/googletest/include")
549548
endif()
550549

551550
set_source(xsimd)

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ cmake: #: Use CMake to create a Makefile build system
9797
${EXTRA_CMAKE_FLAGS}
9898

9999
cmake-gpu:
100-
$(MAKE) EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_GPU=ON" cmake
100+
$(MAKE) EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_GPU=ON -DVELOX_ENABLE_CUDF=ON" cmake
101101

102102
build: #: Build the software based in BUILD_DIR and BUILD_TYPE variables
103103
cmake --build $(BUILD_BASE_DIR)/$(BUILD_DIR) -j $(NUM_THREADS)
@@ -121,11 +121,11 @@ minimal: #: Minimal build
121121
$(MAKE) build BUILD_DIR=release
122122

123123
gpu: #: Build with GPU support
124-
$(MAKE) cmake BUILD_DIR=release BUILD_TYPE=release EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_GPU=ON"
124+
$(MAKE) cmake BUILD_DIR=release BUILD_TYPE=release EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_GPU=ON -DVELOX_ENABLE_CUDF=ON"
125125
$(MAKE) build BUILD_DIR=release
126126

127127
gpu_debug: #: Build with debugging symbols and GPU support
128-
$(MAKE) cmake BUILD_DIR=debug BUILD_TYPE=debug EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_GPU=ON"
128+
$(MAKE) cmake BUILD_DIR=debug BUILD_TYPE=debug EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_GPU=ON -DVELOX_ENABLE_CUDF=ON"
129129
$(MAKE) build BUILD_DIR=debug
130130

131131
dwio: #: Minimal build with dwio enabled.

build.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -euo pipefail
17+
18+
# Run this to launch the CUDA container:
19+
# docker-compose run -e NUM_THREADS=$(nproc) --rm ubuntu-cuda-cpp /bin/bash
20+
# Then invoke ./build.sh to build with GPU support and run tests.
21+
22+
# Run a GPU build and test
23+
pushd "$(dirname ${0})"
24+
25+
CUDA_ARCHITECTURES="native" make gpu
26+
27+
cd _build/release
28+
29+
ctest -R cudf -V
30+
31+
popd

docker-compose.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,35 @@ services:
2929
NUM_THREADS: 8 # default value for NUM_THREADS
3030
VELOX_DEPENDENCY_SOURCE: BUNDLED # Build dependencies from source
3131
CCACHE_DIR: "/velox/.ccache"
32+
CMAKE_EXPORT_COMPILE_COMMANDS: 1
33+
volumes:
34+
- .:/velox:delegated
35+
command: scripts/docker-command.sh
36+
37+
ubuntu-cuda-cpp:
38+
# Usage:
39+
# docker-compose pull ubuntu-cuda-cpp or docker-compose build ubuntu-cuda-cpp
40+
# docker-compose run --rm ubuntu-cuda-cpp
41+
# or
42+
# docker-compose run -e NUM_THREADS=<NUMBER_OF_THREADS_TO_USE> --rm ubuntu-cuda-cpp
43+
# to set the number of threads used during compilation
44+
#image: ghcr.io/facebookincubator/velox-dev:amd64-ubuntu-22.04-avx
45+
build:
46+
context: .
47+
dockerfile: scripts/ubuntu-22.04-cuda-12.2-cpp.dockerfile
48+
environment:
49+
NUM_THREADS: 8 # default value for NUM_THREADS
50+
VELOX_DEPENDENCY_SOURCE: BUNDLED # Build dependencies from source
51+
CCACHE_DIR: "/velox/.ccache"
52+
CMAKE_EXPORT_COMPILE_COMMANDS: 1
53+
privileged: true
54+
deploy:
55+
resources:
56+
reservations:
57+
devices:
58+
- driver: nvidia
59+
count: 1
60+
capabilities: [gpu]
3261
volumes:
3362
- .:/velox:delegated
3463
command: scripts/docker-command.sh

fix-compile-commands.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
sed -i 's|/velox/|/home/nfs/bdice/rapids1/velox/|g' compile_commands.json

install-aws-sdk.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
if [ ! -d "aws-sdk-cpp" ]; then
17+
git clone https://github.com/aws/aws-sdk-cpp --recurse-submodules
18+
fi
19+
cd aws-sdk-cpp
20+
21+
mkdir -p build
22+
cd build
23+
24+
cmake ../ \
25+
-DCMAKE_BUILD_TYPE=Debug \
26+
-DCMAKE_PREFIX_PATH=/usr/local \
27+
-DCMAKE_INSTALL_PREFIX=/usr/local \
28+
-DBUILD_ONLY="s3;sts;cognito-identity;identity-management" \
29+
-DENABLE_TESTING=OFF
30+
cmake --build . --config=Debug
31+
cmake --install . --config=Debug
32+
33+
#cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local
34+
#make
35+
#sudo make install

install-xsimd.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
if [ ! -d "xsimd" ]; then
17+
git clone https://github.com/xtensor-stack/xsimd --recurse-submodules
18+
fi
19+
cd xsimd
20+
21+
mkdir -p build
22+
cd build
23+
24+
cmake ../
25+
cmake --build . --config=Debug
26+
cmake --install . --config=Debug
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) Facebook, Inc. and its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
ARG base=nvidia/cuda:12.2.2-devel-ubuntu22.04
15+
# Set a default timezone, can be overriden via ARG
16+
ARG tz="Europe/Madrid"
17+
18+
FROM ${base}
19+
20+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
21+
22+
RUN apt update && \
23+
apt install -y sudo \
24+
lsb-release \
25+
pip \
26+
python3 \
27+
python3-six
28+
29+
30+
ADD scripts /velox/scripts/
31+
32+
# TZ and DEBIAN_FRONTEND="noninteractive"
33+
# are required to avoid tzdata installation
34+
# to prompt for region selection.
35+
ARG DEBIAN_FRONTEND="noninteractive"
36+
ENV TZ=${tz}
37+
RUN /velox/scripts/setup-ubuntu.sh
38+
39+
WORKDIR /velox

0 commit comments

Comments
 (0)