Skip to content

Commit

Permalink
Merge pull request #2114 from NVIDIA/merge-branch-24.06-to-main
Browse files Browse the repository at this point in the history
Merge branch-24.06 into main
  • Loading branch information
NvTimLiu authored Jun 7, 2024
2 parents 1ca4fd0 + 080b37e commit e9c92a5
Show file tree
Hide file tree
Showing 78 changed files with 4,594 additions and 1,914 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ name: auto-merge HEAD to BASE
on:
pull_request_target:
branches:
- branch-24.04
- branch-24.06
types: [closed]

env:
HEAD: branch-24.04
BASE: branch-24.06
HEAD: branch-24.06
BASE: branch-24.08

jobs:
auto-merge:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/blossom-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,16 @@ jobs:
# This job only runs for pull request comments
if: contains( '\
abellina,\
andygrove,\
anfeng,\
firestarman,\
GaryShen2008,\
jbrennan333, \
jlowe,\
krajendrannv,\
mythrocks,\
nartal1,\
nvdbaranec,\
NvTimLiu,\
razajafri,\
revans2,\
rongou,\
rwlee,\
sameerz,\
tgravescs,\
Expand All @@ -66,6 +62,10 @@ jobs:
yinqingh,\
thirtiseven,\
parthosa,\
liurenjie1024,\
binmahone,\
pmattione-nvidia,\
Feng-Jiang28,\
', format('{0},', github.actor)) && github.event.comment.body == 'build'
steps:
- name: Check if comment is issued by authorized person
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "thirdparty/cudf"]
path = thirdparty/cudf
url = https://github.com/rapidsai/cudf.git
branch = branch-24.04
branch = branch-24.06
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ $ ./build/build-in-docker install ...
```

Now cd to ~/repos/NVIDIA/spark-rapids and build with one of the options from
[spark-rapids instructions](https://github.com/NVIDIA/spark-rapids/blob/branch-24.04/CONTRIBUTING.md#building-from-source).
[spark-rapids instructions](https://github.com/NVIDIA/spark-rapids/blob/branch-24.06/CONTRIBUTING.md#building-from-source).

```bash
$ ./build/buildall
Expand Down Expand Up @@ -355,7 +355,7 @@ conda install -c conda-forge pre-commit
pip install pre-commit
```

Then, run pre-commit hooks before committing your code. This wil reformat the stagged files:
Then, run pre-commit hooks before committing your code. This will reformat the staged files:
```
pre-commit run
```
Expand Down
22 changes: 21 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,24 @@ 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.
limitations under the License.

--------------------------------------------------------------------------------

This project includes code from flatbuffers (https://github.com/google/flatbuffers).

Copyright 2021 Google Inc. 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.

--------------------------------------------------------------------------------
25 changes: 11 additions & 14 deletions build/build-in-docker
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-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.
Expand All @@ -24,30 +24,27 @@ set -e
SCRIPTDIR=$(cd $(dirname $0); pwd)

LOCAL_MAVEN_REPO=${LOCAL_MAVEN_REPO:-"$HOME/.m2/repository"}
CUDF_USE_PER_THREAD_DEFAULT_STREAM=${CUDF_USE_PER_THREAD_DEFAULT_STREAM:-ON}
USE_GDS=${USE_GDS:-ON}
export CMAKE_GENERATOR=${CMAKE_GENERATOR:-"Ninja"}
# Make CUDA_VERSION consistent with the file run-in-docker
export CUDA_VERSION=${CUDA_VERSION:-11.8.0}
CUDA_CLASSIFIER=cuda${CUDA_VERSION%%.*}
BUILD_FAULTINJ=${BUILD_FAULTINJ:-ON}

if (( $# == 0 )); then
echo "Usage: $0 <Maven build arguments>"
exit 1
fi

_CUDF_CLEAN_SKIP=""
# if ccache is enabled and libcudf.clean.skip not provided
# by the user remove the cpp build directory
#
if [[ "$CCACHE_DISABLE" != "1" ]]; then
if [[ ! "$*" =~ " -Dlibcudf.clean.skip=" ]]; then
# Don't skip clean if ccache is enabled
# unless the user overrides
_CUDF_CLEAN_SKIP="-Dlibcudf.clean.skip=false"
fi
# Set env for arm64 build, The possible values of 'uname -m' : [x86_64/i386/aarch64/mips/...]
if [ "$(uname -m)" == "aarch64" ]; then
USE_GDS="OFF" # The GDS cuFiles RDMA libraries are not included in the arm64 CUDA toolkit.
BUILD_FAULTINJ="OFF" # libcupti_static.a linked by cufaultinj, does not exist in the arm64 CUDA toolkit.
fi

$SCRIPTDIR/run-in-docker mvn \
-Dmaven.repo.local=$LOCAL_MAVEN_REPO \
-DCUDF_USE_PER_THREAD_DEFAULT_STREAM=$CUDF_USE_PER_THREAD_DEFAULT_STREAM \
-DUSE_GDS=$USE_GDS \
$_CUDF_CLEAN_SKIP \
-DBUILD_FAULTINJ=${BUILD_FAULTINJ} \
-Dcuda.version=$CUDA_CLASSIFIER \
"$@"
11 changes: 8 additions & 3 deletions build/run-in-docker
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2022-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.
Expand All @@ -27,11 +27,16 @@ REPODIR=$SCRIPTDIR/..
CUDA_VERSION=${CUDA_VERSION:-11.8.0}
DOCKER_CMD=${DOCKER_CMD:-docker}
DOCKER_BUILD_EXTRA_ARGS=${DOCKER_BUILD_EXTRA_ARGS:-""}
if [ "$(uname -m)" == "aarch64" ]; then
DOCKER_BUILD_EXTRA_ARGS="--build-arg TARGETPLATFORM=linux/arm64 --build-arg CMAKE_ARCH=aarch64 $DOCKER_BUILD_EXTRA_ARGS"
else
DOCKER_BUILD_EXTRA_ARGS="--build-arg TARGETPLATFORM=linux/amd64 --build-arg CMAKE_ARCH=x86_64 $DOCKER_BUILD_EXTRA_ARGS"
fi
DOCKER_RUN_EXTRA_ARGS=${DOCKER_RUN_EXTRA_ARGS:-""}
LOCAL_CCACHE_DIR=${LOCAL_CCACHE_DIR:-"$HOME/.ccache"}
LOCAL_MAVEN_REPO=${LOCAL_MAVEN_REPO:-"$HOME/.m2/repository"}

SPARK_IMAGE_NAME="spark-rapids-jni-build:${CUDA_VERSION}-devel-centos7"
SPARK_IMAGE_NAME="spark-rapids-jni-build:${CUDA_VERSION}-devel-rockylinux8"

# ensure directories exist
mkdir -p "$LOCAL_CCACHE_DIR" "$LOCAL_MAVEN_REPO"
Expand Down Expand Up @@ -74,4 +79,4 @@ $DOCKER_CMD run $DOCKER_GPU_OPTS $DOCKER_RUN_EXTRA_ARGS -u $(id -u):$(id -g) --r
-e VERBOSE \
$DOCKER_OPTS \
$SPARK_IMAGE_NAME \
scl enable devtoolset-11 "$RUN_CMD"
scl enable gcc-toolset-11 "$RUN_CMD"
35 changes: 18 additions & 17 deletions ci/Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,32 @@
###
# Build the image for spark-rapids-jni development environment.
#
# Arguments: CUDA_VERSION=11.8.0
# Arguments: CUDA_VERSION=[11.X.Y, 12.X.Y], OS_RELEASE=[8, 9], TARGETPLATFORM=[linux/amd64, linux/arm64]
#
###
ARG CUDA_VERSION=11.8.0
FROM nvidia/cuda:$CUDA_VERSION-devel-centos7
ARG DEVTOOLSET_VERSION=11
ARG OS_RELEASE=8
ARG TARGETPLATFORM=linux/amd64
# multi-platform build with: docker buildx build --platform linux/arm64,linux/amd64 <ARGS> on either amd64 or arm64 host
# check available official arm-based docker images at https://hub.docker.com/r/nvidia/cuda/tags (OS/ARCH)
FROM --platform=$TARGETPLATFORM nvidia/cuda:$CUDA_VERSION-devel-rockylinux$OS_RELEASE
ARG TOOLSET_VERSION=11
### Install basic requirements
RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-${DEVTOOLSET_VERSION} rh-python38 epel-release
RUN yum install -y zlib-devel maven tar wget patch ninja-build
# require git 2.18+ to keep consistent submodule operations
RUN yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && yum install -y git
# pin urllib3<2.0 for https://github.com/psf/requests/issues/6432
RUN scl enable rh-python38 "pip install requests 'urllib3<2.0'"

RUN dnf --enablerepo=powertools install -y scl-utils gcc-toolset-${TOOLSET_VERSION} python39 zlib-devel maven tar wget patch ninja-build git && \
alternatives --set python /usr/bin/python3 && \
python -m pip install requests 'urllib3<2.0'
## pre-create the CMAKE_INSTALL_PREFIX folder, set writable by any user for Jenkins
RUN mkdir /usr/local/rapids && mkdir /rapids && chmod 777 /usr/local/rapids && chmod 777 /rapids
RUN mkdir -m 777 /usr/local/rapids /rapids

# 3.22.3: CUDA architecture 'native' support + flexible CMAKE_<LANG>_*_LAUNCHER for ccache
ARG CMAKE_VERSION=3.26.4

RUN cd /usr/local && wget --quiet https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz && \
tar zxf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz && \
rm cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz
ENV PATH /usr/local/cmake-${CMAKE_VERSION}-linux-x86_64/bin:$PATH
# default x86_64 from x86 build, aarch64 cmake for arm build
ARG CMAKE_ARCH=x86_64
RUN cd /usr/local && wget --quiet https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz && \
tar zxf cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz && \
rm cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz
ENV PATH /usr/local/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}/bin:$PATH

# ccache for interactive builds
ARG CCACHE_VERSION=4.6
Expand All @@ -51,7 +52,7 @@ RUN cd /tmp && wget --quiet https://github.com/ccache/ccache/releases/download/v
cd ccache-${CCACHE_VERSION} && \
mkdir build && \
cd build && \
scl enable devtoolset-${DEVTOOLSET_VERSION} \
scl enable gcc-toolset-${TOOLSET_VERSION} \
"cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DZSTD_FROM_INTERNET=ON \
Expand Down
76 changes: 0 additions & 76 deletions ci/Dockerfile.multi

This file was deleted.

6 changes: 3 additions & 3 deletions ci/Jenkinsfile.premerge
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import ipp.blossom.*

def githubHelper // blossom github helper
def TEMP_IMAGE_BUILD = true
def IMAGE_PREMERGE = "${common.ARTIFACTORY_NAME}/sw-spark-docker/plugin-jni:centos7-cuda11.8.0-blossom"
def IMAGE_PREMERGE = "${common.ARTIFACTORY_NAME}/sw-spark-docker/plugin-jni:rockylinux8-cuda11.8.0-blossom"
def cpuImage = pod.getCPUYAML(IMAGE_PREMERGE)
def PREMERGE_DOCKERFILE = 'ci/Dockerfile'
def PREMERGE_TAG
Expand Down Expand Up @@ -150,7 +150,7 @@ git --no-pager diff --name-only HEAD \$BASE -- ${PREMERGE_DOCKERFILE} || true"""
}

if (TEMP_IMAGE_BUILD) {
PREMERGE_TAG = "centos7-cuda11.8.0-blossom-dev-${BUILD_TAG}"
PREMERGE_TAG = "rockylinux8-cuda11.8.0-blossom-dev-${BUILD_TAG}"
IMAGE_PREMERGE = "${ARTIFACTORY_NAME}/sw-spark-docker-local/plugin-jni:${PREMERGE_TAG}"
docker.build(IMAGE_PREMERGE, "--network=host -f ${PREMERGE_DOCKERFILE} -t $IMAGE_PREMERGE .")
uploadDocker(IMAGE_PREMERGE)
Expand Down Expand Up @@ -212,7 +212,7 @@ git --no-pager diff --name-only HEAD \$BASE -- ${PREMERGE_DOCKERFILE} || true"""
container('gpu') {
timeout(time: 3, unit: 'HOURS') { // step only timeout for test run
common.resolveIncompatibleDriverIssue(this)
sh 'scl enable devtoolset-11 "ci/premerge-build.sh"'
sh 'scl enable gcc-toolset-11 "ci/premerge-build.sh"'
sh 'bash ci/fuzz-test.sh'
}
}
Expand Down
2 changes: 1 addition & 1 deletion ci/submodule-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# NOTE:
# this script is for jenkins only, and should not be used for local development
# run with ci/Dockerfile in jenkins:
# scl enable devtoolset-11 rh-python38 "ci/submodule-sync.sh"
# scl enable gcc-toolset-11 ci/submodule-sync.sh

set -ex

Expand Down
Loading

0 comments on commit e9c92a5

Please sign in to comment.