From c5758eb6eb4eefdad9f40fc9f533807d230a56b2 Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Thu, 1 Jul 2021 12:52:02 -0700 Subject: [PATCH 1/5] Add cudf_ROOT to cmake --- cpp/examples/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/examples/build.sh b/cpp/examples/build.sh index c3cf75a556f..9897a2711d2 100755 --- a/cpp/examples/build.sh +++ b/cpp/examples/build.sh @@ -4,14 +4,15 @@ # libcudf examples build script -# Add libcudf examples build scripts down below - # Parallelism control PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} +# Root of examples EXAMPLES_DIR=${WORKSPACE}/cpp/examples ################################################################################ +# Add individual libcudf examples build scripts down below + # Basic example BASIC_EXAMPLE_DIR=${EXAMPLES_DIR}/basic BASIC_EXAMPLE_BUILD_DIR=${BASIC_EXAMPLE_DIR}/build @@ -19,4 +20,4 @@ BASIC_EXAMPLE_BUILD_DIR=${BASIC_EXAMPLE_DIR}/build # Configure cmake -S ${BASIC_EXAMPLE_DIR} -B ${BASIC_EXAMPLE_BUILD_DIR} # Build -cmake --build ${BASIC_EXAMPLE_BUILD_DIR} -j${PARALLEL_LEVEL} +cmake --build ${BASIC_EXAMPLE_BUILD_DIR} -j${PARALLEL_LEVEL} -Dcudf_ROOT="${LIB_BUILD_DIR}" From c731ae2fdca1dafb421a191ec487bf1785e114b8 Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Thu, 1 Jul 2021 13:00:14 -0700 Subject: [PATCH 2/5] . --- cpp/examples/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/examples/build.sh b/cpp/examples/build.sh index 9897a2711d2..d896d19ad26 100755 --- a/cpp/examples/build.sh +++ b/cpp/examples/build.sh @@ -18,6 +18,6 @@ BASIC_EXAMPLE_DIR=${EXAMPLES_DIR}/basic BASIC_EXAMPLE_BUILD_DIR=${BASIC_EXAMPLE_DIR}/build # Configure -cmake -S ${BASIC_EXAMPLE_DIR} -B ${BASIC_EXAMPLE_BUILD_DIR} +cmake -S ${BASIC_EXAMPLE_DIR} -B ${BASIC_EXAMPLE_BUILD_DIR} -Dcudf_ROOT="${LIB_BUILD_DIR}" # Build -cmake --build ${BASIC_EXAMPLE_BUILD_DIR} -j${PARALLEL_LEVEL} -Dcudf_ROOT="${LIB_BUILD_DIR}" +cmake --build ${BASIC_EXAMPLE_BUILD_DIR} -j${PARALLEL_LEVEL} From 7286797290d8421be1834be25248a4f16bd52c00 Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Tue, 6 Jul 2021 14:26:01 -0700 Subject: [PATCH 3/5] Building libcudf examples using libcudf conda source --- ci/cpu/build.sh | 6 +++++ ci/gpu/build.sh | 8 ------ conda/recipes/libcudf_example/build.sh | 4 +++ conda/recipes/libcudf_example/meta.yaml | 34 +++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 conda/recipes/libcudf_example/build.sh create mode 100644 conda/recipes/libcudf_example/meta.yaml diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index e11a0488624..d29bfcc05a9 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -83,6 +83,12 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then 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 + + # If examples grows too large to build, should move to cpu side + 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 diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 1d0154aedc7..92ec9960aaa 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -196,14 +196,6 @@ fi # Both regular and Project Flash proceed here -################################################################################ -# BUILD - Build libcudf examples -################################################################################ - -# If examples grows too large to build, should move to cpu side -gpuci_logger "Building libcudf examples" -$WORKSPACE/cpp/examples/build.sh - # set environment variable for numpy 1.16 # will be enabled for later versions by default np_ver=$(python -c "import numpy; print('.'.join(numpy.__version__.split('.')[:-1]))") diff --git a/conda/recipes/libcudf_example/build.sh b/conda/recipes/libcudf_example/build.sh new file mode 100644 index 00000000000..4df9550f1a2 --- /dev/null +++ b/conda/recipes/libcudf_example/build.sh @@ -0,0 +1,4 @@ +# Copyright (c) 2021, NVIDIA CORPORATION. + +# This assumes the script is executed from the root of the repo directory +./cpp/examples/build.sh diff --git a/conda/recipes/libcudf_example/meta.yaml b/conda/recipes/libcudf_example/meta.yaml new file mode 100644 index 00000000000..d65aaa9162f --- /dev/null +++ b/conda/recipes/libcudf_example/meta.yaml @@ -0,0 +1,34 @@ +# Copyright (c) 2021, NVIDIA CORPORATION. + +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} +{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} + +package: + name: libcudf_example + version: {{ version }} + +source: + git_url: ../../.. + +build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: {{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + script_env: + - CC + - CXX + - CUDAHOSTCXX + - PARALLEL_LEVEL + - PROJECT_FLASH + +requirements: + build: + - cmake >=3.20.1 + host: + - libcudf {{ version }} + +about: + home: http://rapids.ai/ + license: Apache-2.0 + license_family: Apache + license_file: LICENSE + summary: libcudf_example library From 1175ae1a35c2be34245f85c1b275227b86c9d7fa Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Tue, 6 Jul 2021 14:26:57 -0700 Subject: [PATCH 4/5] Update build.sh --- ci/cpu/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index d29bfcc05a9..00dffa57683 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -84,7 +84,6 @@ if [ "$BUILD_LIBCUDF" == '1' ]; then mkdir -p ${CONDA_BLD_DIR}/libcudf_kafka/work cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcudf_kafka/work - # If examples grows too large to build, should move to cpu side 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 From 024ef2aebf04e52171f47f9e5b7f1a69546a415c Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Fri, 9 Jul 2021 16:49:57 -0700 Subject: [PATCH 5/5] path variable passthrough --- conda/recipes/libcudf_example/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/recipes/libcudf_example/meta.yaml b/conda/recipes/libcudf_example/meta.yaml index d65aaa9162f..c20a62c44c7 100644 --- a/conda/recipes/libcudf_example/meta.yaml +++ b/conda/recipes/libcudf_example/meta.yaml @@ -19,6 +19,7 @@ build: - CUDAHOSTCXX - PARALLEL_LEVEL - PROJECT_FLASH + - WORKSPACE requirements: build: