Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate C++ conda recipes and add libcudf-tests package #10326

Merged
merged 28 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ee9073d
rm variables that exist in CI container
ajschmidt8 Feb 15, 2022
c4c6521
mv libcudf_kafka recipe to libcudf recipe
ajschmidt8 Feb 16, 2022
d74fdf6
rm WORKSPACE env var dependency from libcudf_example recipe
ajschmidt8 Feb 16, 2022
26047de
mv libcudf_example recipe to libcudf recipe
ajschmidt8 Feb 16, 2022
47a96ce
rm extraneous build cmds from ci/cpu/build.sh
ajschmidt8 Feb 17, 2022
9f35a74
update upload scripts for multi-pkg recipe
ajschmidt8 Feb 17, 2022
cc7041c
add libcudf_tests pkg to recipe
ajschmidt8 Feb 17, 2022
ff87b5d
update ci/gpu/build.sh to use libcudf_tests pkg
ajschmidt8 Feb 17, 2022
031ff67
update copyright headers
ajschmidt8 Feb 17, 2022
455b569
update `headers_test.sh` for new recipe format
ajschmidt8 Feb 17, 2022
fcbcfb5
provide default LIB_BUILD_DIR value for examples
ajschmidt8 Feb 23, 2022
844b734
fix libcudf_examples pkg build
ajschmidt8 Feb 25, 2022
14c57d2
test openssl spec
ajschmidt8 Feb 26, 2022
127b17a
debug build
ajschmidt8 Feb 26, 2022
7e8311e
Revert "debug build"
ajschmidt8 Feb 26, 2022
d919338
convert to top-level build
ajschmidt8 Feb 26, 2022
0ae60f9
add cudf_ROOT var for libcudf_kafka build
ajschmidt8 Feb 27, 2022
7b191dd
workaround PATH issue
ajschmidt8 Feb 28, 2022
74e61b3
download thrust for Java builds
ajschmidt8 Mar 2, 2022
69e06e1
rm extraneous code from ci/gpu/java.sh
ajschmidt8 Mar 2, 2022
15fd9c3
Merge remote-tracking branch 'upstream/branch-22.04' into update-recipes
ajschmidt8 Mar 14, 2022
aa960bb
Merge remote-tracking branch 'upstream/branch-22.04' into update-recipes
ajschmidt8 Mar 16, 2022
e5dc196
use Jinja ~ operator for int/string concatenation
ajschmidt8 Mar 16, 2022
2cba7e3
add `libcudf` & `libcudf_kafka` pkgs to install command
ajschmidt8 Mar 17, 2022
d51d417
rename `libcudf_tests` to `libcudf-tests`
ajschmidt8 Mar 18, 2022
62800a6
Merge remote-tracking branch 'upstream/branch-22.06' into update-recipes
ajschmidt8 Mar 28, 2022
c0e7b8b
rename libcudf_example to libcudf-example
ajschmidt8 Mar 28, 2022
7deedf6
make upload scripts less verbose
ajschmidt8 Mar 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/checks/headers_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
#####################################
# conda existence test for headers #
#####################################
Expand All @@ -10,7 +10,7 @@ DIRNAMES="cudf cudf_test"

# existence tests for lib${LIBNAME}
for DIRNAME in ${DIRNAMES[@]}; do
HEADERS=`cd cpp && find include/${DIRNAME}/ -type f \( -iname "*.h" -o -iname "*.hpp" \) -printf " - test -f \\\$PREFIX/%p\n" | sort`
HEADERS=`cd cpp && find include/${DIRNAME}/ -type f \( -iname "*.h" -o -iname "*.hpp" \) -printf " - test -f \\\$PREFIX/%p\n" | sort`
vyasr marked this conversation as resolved.
Show resolved Hide resolved
META_TESTS=`grep -E "test -f .*/include/${DIRNAME}/.*\.h(pp)?" conda/recipes/lib${LIBNAME}/meta.yaml | sort`
HEADER_DIFF=`diff <(echo "$HEADERS") <(echo "$META_TESTS")`
LIB_RETVAL=$?
Expand Down
19 changes: 4 additions & 15 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
set -e

# Set path and build parallel level
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
# FIXME: PATH variable shouldn't be necessary.
# This should be removed once we either stop using the `remote-docker-plugin`
# or the following issue is addressed: https://github.com/gpuopenanalytics/remote-docker-plugin/issues/47
export PATH=/usr/local/gcc9/bin:/opt/conda/bin:/usr/local/cuda/bin:$PATH
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}

# Set home to the job's workspace
Expand All @@ -31,10 +34,6 @@ if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
export VERSION_SUFFIX=`date +%y%m%d`
fi

export CMAKE_CUDA_COMPILER_LAUNCHER="sccache"
export CMAKE_CXX_COMPILER_LAUNCHER="sccache"
export CMAKE_C_COMPILER_LAUNCHER="sccache"

################################################################################
# SETUP - Check environment
################################################################################
Expand Down Expand Up @@ -94,16 +93,6 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then
cp "$LIBCUDF_BUILD_DIR/ninja_log.html" "$WORKSPACE/build-metrics/BuildMetrics.html"
cp "$LIBCUDF_BUILD_DIR/ninja.log" "$WORKSPACE/build-metrics/ninja.log"
fi

gpuci_logger "Build conda pkg for libcudf_kafka"
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf_kafka $CONDA_BUILD_ARGS
mkdir -p ${CONDA_BLD_DIR}/libcudf_kafka/work
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf_kafka/work

gpuci_logger "Building libcudf examples"
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcudf_example $CONDA_BUILD_ARGS
mkdir -p ${CONDA_BLD_DIR}/libcudf_example/work
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf_example/work
fi

if [ "$BUILD_CUDF" == '1' ]; then
Expand Down
3 changes: 1 addition & 2 deletions ci/cpu/prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env bash

# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
set -e

#Always upload cudf packages
export UPLOAD_CUDF=1
export UPLOAD_LIBCUDF=1
export UPLOAD_CUDF_KAFKA=1
export UPLOAD_LIBCUDF_KAFKA=1
vyasr marked this conversation as resolved.
Show resolved Hide resolved

if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
#If project flash is not activate, always build both
Expand Down
30 changes: 8 additions & 22 deletions ci/cpu/upload.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh

set -e
Expand Down Expand Up @@ -29,45 +29,31 @@ fi

gpuci_logger "Starting conda uploads"
if [[ "$BUILD_LIBCUDF" == "1" && "$UPLOAD_LIBCUDF" == "1" ]]; then
export LIBCUDF_FILE=$(conda build --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/libcudf --output)
test -e ${LIBCUDF_FILE}
echo "Upload libcudf"
echo ${LIBCUDF_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBCUDF_FILE} --no-progress
export LIBCUDF_FILES=$(conda build --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/libcudf --output)
LIBCUDF_FILES=$(echo "$LIBCUDF_FILES" | sed 's/.*libcudf-example.*//') # skip libcudf-example pkg upload
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing --no-progress $LIBCUDF_FILES
fi

if [[ "$BUILD_CUDF" == "1" && "$UPLOAD_CUDF" == "1" ]]; then
export CUDF_FILE=$(conda build --croot "${CONDA_BLD_DIR}" conda/recipes/cudf --python=$PYTHON --output)
test -e ${CUDF_FILE}
echo "Upload cudf"
echo ${CUDF_FILE}
echo "Upload cudf: ${CUDF_FILE}"
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${CUDF_FILE} --no-progress

export DASK_CUDF_FILE=$(conda build --croot "${CONDA_BLD_DIR}" conda/recipes/dask-cudf --python=$PYTHON --output)
test -e ${DASK_CUDF_FILE}
echo "Upload dask-cudf"
echo ${DASK_CUDF_FILE}
echo "Upload dask-cudf: ${DASK_CUDF_FILE}"
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${DASK_CUDF_FILE} --no-progress

export CUSTREAMZ_FILE=$(conda build --croot "${CONDA_BLD_DIR}" conda/recipes/custreamz --python=$PYTHON --output)
test -e ${CUSTREAMZ_FILE}
echo "Upload custreamz"
echo ${CUSTREAMZ_FILE}
echo "Upload custreamz: ${CUSTREAMZ_FILE}"
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${CUSTREAMZ_FILE} --no-progress
fi

if [[ "$BUILD_LIBCUDF" == "1" && "$UPLOAD_LIBCUDF_KAFKA" == "1" ]]; then
export LIBCUDF_KAFKA_FILE=$(conda build --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/libcudf_kafka --output)
test -e ${LIBCUDF_KAFKA_FILE}
echo "Upload libcudf_kafka"
echo ${LIBCUDF_KAFKA_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBCUDF_KAFKA_FILE} --no-progress
fi

if [[ "$BUILD_CUDF" == "1" && "$UPLOAD_CUDF_KAFKA" == "1" ]]; then
export CUDF_KAFKA_FILE=$(conda build --croot "${CONDA_BLD_DIR}" conda/recipes/cudf_kafka --python=$PYTHON --output)
test -e ${CUDF_KAFKA_FILE}
echo "Upload cudf_kafka"
echo ${CUDF_KAFKA_FILE}
echo "Upload cudf_kafka: ${CUDF_KAFKA_FILE}"
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${CUDF_KAFKA_FILE} --no-progress
fi
27 changes: 5 additions & 22 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ export INSTALL_DASK_MAIN=1
# ucx-py version
export UCX_PY_VERSION='0.26.*'

export CMAKE_CUDA_COMPILER_LAUNCHER="sccache"
export CMAKE_CXX_COMPILER_LAUNCHER="sccache"
export CMAKE_C_COMPILER_LAUNCHER="sccache"

################################################################################
# TRAP - Setup trap for removing jitify cache
################################################################################
Expand Down Expand Up @@ -166,8 +162,6 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
fi
else
#Project Flash
export LIB_BUILD_DIR="$WORKSPACE/ci/artifacts/cudf/cpu/libcudf_work/cpp/build"
export LD_LIBRARY_PATH="$LIB_BUILD_DIR:$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"

if hasArg --skip-tests; then
gpuci_logger "Skipping Tests"
Expand All @@ -177,17 +171,16 @@ else
gpuci_logger "Check GPU usage"
nvidia-smi

set -x
cd $LIB_BUILD_DIR
gpuci_mamba_retry install -y -c ${CONDA_ARTIFACT_PATH} libcudf libcudf_kafka libcudf-tests

gpuci_logger "GoogleTests"

for gt in gtests/* ; do
test_name=$(basename ${gt})
# Run libcudf and libcudf_kafka gtests from libcudf-tests package
for gt in "$CONDA_PREFIX/bin/gtests/libcudf"*/* ; do
echo "Running GoogleTest $test_name"
${gt} --gtest_output=xml:"$WORKSPACE/test-results/"
done

export LIB_BUILD_DIR="$WORKSPACE/ci/artifacts/cudf/cpu/libcudf_work/cpp/build"
# Copy libcudf build time results
echo "Checking for build time log $LIB_BUILD_DIR/ninja_log.xml"
if [[ -f "$LIB_BUILD_DIR/ninja_log.xml" ]]; then
Expand All @@ -204,7 +197,7 @@ else
export GTEST_CUDF_RMM_MODE=cuda
COMPUTE_SANITIZER_CMD="compute-sanitizer --tool memcheck"
mkdir -p "$WORKSPACE/test-results/"
for gt in gtests/*; do
for gt in "$CONDA_PREFIX/bin/gtests/libcudf"*/* ; do
test_name=$(basename ${gt})
if [[ "$test_name" == "ERROR_TEST" ]]; then
continue
Expand All @@ -217,16 +210,6 @@ else
fi
fi

CUDF_CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcudf-*.tar.bz2"`
CUDF_CONDA_FILE=`basename "$CUDF_CONDA_FILE" .tar.bz2` #get filename without extension
CUDF_CONDA_FILE=${CUDF_CONDA_FILE//-/=} #convert to conda install
KAFKA_CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcudf_kafka-*.tar.bz2"`
KAFKA_CONDA_FILE=`basename "$KAFKA_CONDA_FILE" .tar.bz2` #get filename without extension
KAFKA_CONDA_FILE=${KAFKA_CONDA_FILE//-/=} #convert to conda install

gpuci_logger "Installing $CUDF_CONDA_FILE & $KAFKA_CONDA_FILE"
gpuci_mamba_retry install -c ${CONDA_ARTIFACT_PATH} "$CUDF_CONDA_FILE" "$KAFKA_CONDA_FILE"

install_dask

gpuci_logger "Build python libs from source"
Expand Down
17 changes: 3 additions & 14 deletions ci/gpu/java.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018-2020, NVIDIA CORPORATION.
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
##############################################
# cuDF GPU build and test script for CI #
##############################################
Expand Down Expand Up @@ -122,19 +122,8 @@ function install_dask {
# INSTALL - Install libcudf artifacts
################################################################################

export LIB_BUILD_DIR="$WORKSPACE/ci/artifacts/cudf/cpu/libcudf_work/cpp/build"
export CUDF_ROOT=${LIB_BUILD_DIR}
export LD_LIBRARY_PATH="$LIB_BUILD_DIR:$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"

CUDF_CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcudf-*.tar.bz2"`
CUDF_CONDA_FILE=`basename "$CUDF_CONDA_FILE" .tar.bz2` #get filename without extension
CUDF_CONDA_FILE=${CUDF_CONDA_FILE//-/=} #convert to conda install
KAFKA_CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcudf_kafka-*.tar.bz2"`
KAFKA_CONDA_FILE=`basename "$KAFKA_CONDA_FILE" .tar.bz2` #get filename without extension
KAFKA_CONDA_FILE=${KAFKA_CONDA_FILE//-/=} #convert to conda install

gpuci_logger "Installing $CUDF_CONDA_FILE & $KAFKA_CONDA_FILE"
gpuci_mamba_retry install -c ${CONDA_ARTIFACT_PATH} "$CUDF_CONDA_FILE" "$KAFKA_CONDA_FILE"
gpuci_logger "Installing libcudf & libcudf_kafka"
gpuci_mamba_retry install -c ${CONDA_ARTIFACT_PATH} libcudf libcudf_kafka

install_dask

Expand Down
11 changes: 4 additions & 7 deletions conda/recipes/libcudf/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Copyright (c) 2018-2019, NVIDIA CORPORATION.
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
# This assumes the script is executed from the root of the repo directory
./build.sh -v libcudf --allgpuarch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
else
./build.sh -v libcudf tests --allgpuarch --build_metrics --incl_cache_stats --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
fi
export cudf_ROOT="$(realpath ./cpp/build)"
./build.sh -n -v libcudf libcudf_kafka benchmarks tests --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
14 changes: 14 additions & 0 deletions conda/recipes/libcudf/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_version:
- ">=3.20.1"
vyasr marked this conversation as resolved.
Show resolved Hide resolved

gtest_version:
- "=1.10.0"

arrow_cpp_version:
- ">=6.0.1,<6.0.2.0a0"

dlpack_version:
- ">=0.5,<0.6.0a0"

librdkafka_version:
- ">=1.7.0,<1.8.0a0"
4 changes: 4 additions & 0 deletions conda/recipes/libcudf/install_libcudf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

cmake --install cpp/build
4 changes: 4 additions & 0 deletions conda/recipes/libcudf/install_libcudf_example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

./cpp/examples/build.sh
4 changes: 4 additions & 0 deletions conda/recipes/libcudf/install_libcudf_kafka.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

cmake --install cpp/libcudf_kafka/build
5 changes: 5 additions & 0 deletions conda/recipes/libcudf/install_libcudf_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

cmake --install cpp/build --component testing
cmake --install cpp/libcudf_kafka/build --component testing
Loading