From 13992b070c86c4351101dfc7a531f0b7fe3cb878 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Fri, 6 Nov 2020 08:31:01 -0800 Subject: [PATCH 1/6] gpuciscripts clean and update --- ci/checks/changelog.sh | 2 +- ci/checks/style.sh | 7 ++++--- ci/cpu/build.sh | 35 ++++++++++++++++++++-------------- ci/cpu/upload-anaconda.sh | 2 +- ci/docs/build.sh | 21 +++++++++++--------- ci/gpu/build.sh | 37 +++++++++++++++++++----------------- ci/gpu/test-notebooks.sh | 4 +++- ci/local/README.md | 3 ++- ci/release/update-version.sh | 2 +- 9 files changed, 65 insertions(+), 48 deletions(-) diff --git a/ci/checks/changelog.sh b/ci/checks/changelog.sh index 4196a48f..e55b76dd 100755 --- a/ci/checks/changelog.sh +++ b/ci/checks/changelog.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2019, NVIDIA CORPORATION. +# Copyright (c) 2020, NVIDIA CORPORATION. ############################# # cuSignal CHANGELOG Tester # ############################# diff --git a/ci/checks/style.sh b/ci/checks/style.sh index 2badf57b..1eb9853f 100755 --- a/ci/checks/style.sh +++ b/ci/checks/style.sh @@ -1,15 +1,16 @@ #!/bin/bash -# Copyright (c) 2019, NVIDIA CORPORATION. +# Copyright (c) 2020, NVIDIA CORPORATION. ######################### # cuSignal Style Tester # ######################### # Ignore errors and set path set +e -PATH=/conda/bin:$PATH +PATH=/opt/conda/bin:$PATH # Activate common conda env -source activate gdf +. /opt/conda/etc/profile.d/conda.sh +conda activate rapids cd $WORKSPACE/python diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index d8203c6a..91e3c809 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -1,18 +1,18 @@ #!/bin/bash -# Copyright (c) 2018, NVIDIA CORPORATION. +# Copyright (c) 2020, NVIDIA CORPORATION. ########################################## # cuSignal CPU conda build script for CI # ########################################## set -e # Logger function for build status output -function logger() { +function gpuci_logger() { echo -e "\n>>>> $@\n" } # Set path and build parallel level -export PATH=/conda/bin:/usr/local/cuda/bin:$PATH -export PARALLEL_LEVEL=4 +export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH +export PARALLEL_LEVEL=-4 # Set home to the job's workspace export HOME=$WORKSPACE @@ -29,17 +29,20 @@ fi # SETUP - Check environment ################################################################################ -logger "Get env..." +gpuci_logger "Get env" env -logger "Activate conda env..." -source activate gdf +gpuci_logger "Activate conda env" +. /opt/conda/etc/profile.d/conda.sh +conda activate rapids -logger "Check versions..." +gpuci_logger "Check versions" python --version -gcc --version -g++ --version -conda list +$CC --version +$CXX --version +conda info +conda config --show-sources +conda list --show-channel-urls # FIX Added to deal with Anancoda SSL verification issues during conda builds conda config --set ssl_verify False @@ -48,12 +51,16 @@ conda config --set ssl_verify False # BUILD - Conda package build ################################################################################ -logger "Build conda pkg for cuSignal..." -conda build conda/recipes/cusignal --python=${PYTHON} +# Setup 'gpuci_conda_retry' for build retries (results in 2 total attempts) +export GPUCI_CONDA_RETRY_MAX=1 +export GPUCI_CONDA_RETRY_SLEEP=30 + +gpuci_logger "Build conda pkg for cuSignal" +gpuci_conda_retry build conda/recipes/cusignal --python=${PYTHON} ################################################################################ # UPLOAD - Conda packages ################################################################################ -logger "Upload conda pkgs for cuSignal..." +gpuci_logger "Upload conda pkgs for cuSignal" source ci/cpu/upload-anaconda.sh diff --git a/ci/cpu/upload-anaconda.sh b/ci/cpu/upload-anaconda.sh index 2ba25b02..5e36330b 100755 --- a/ci/cpu/upload-anaconda.sh +++ b/ci/cpu/upload-anaconda.sh @@ -3,7 +3,7 @@ set -e CUDA_REL=${CUDA_VERSION%.*} -export UPLOADFILE=`conda build conda/recipes/cusignal --python=${PYTHON} --output` +export UPLOADFILE=`gpuci_conda_retry build conda/recipes/cusignal --python=${PYTHON} --output` LABEL_OPTION="--label main" diff --git a/ci/docs/build.sh b/ci/docs/build.sh index cfe68fb6..2d46aa2c 100644 --- a/ci/docs/build.sh +++ b/ci/docs/build.sh @@ -11,34 +11,37 @@ if [ -z "$PROJECT_WORKSPACE" ]; then fi export DOCS_WORKSPACE=$WORKSPACE/docs -export PATH=/conda/bin:/usr/local/cuda/bin:$PATH +export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export HOME=$WORKSPACE export PROJECT_WORKSPACE=/rapids/cusignal export LIBCUDF_KERNEL_CACHE_PATH="$HOME/.jitify-cache" export NIGHTLY_VERSION=$(echo $BRANCH_VERSION | awk -F. '{print $2}') export PROJECTS=(cusignal) -logger "Check environment..." +gpuci_logger "Check environment" env -logger "Check GPU usage..." +gpuci_logger "Check GPU usage" nvidia-smi -logger "Activate conda env..." -source activate rapids +gpuci_logger "Activate conda env" +. /opt/conda/etc/profile.d/conda.sh +conda activate rapids # TODO: Move installs to docs-build-env meta package -conda install -c anaconda markdown beautifulsoup4 jq +gpuci_conda_retry install -c anaconda markdown beautifulsoup4 jq pip install sphinx-markdown-tables -logger "Check versions..." +gpuci_logger "Check versions" python --version $CC --version $CXX --version -conda list +conda info +conda config --show-sources +conda list --show-channel-urls # Build Python docs -logger "Build Sphinx docs..." +gpuci_logger "Build Sphinx docs" cd $PROJECT_WORKSPACE/docs make html diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 75ae8067..a472ae9c 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2018-2019, NVIDIA CORPORATION. +# Copyright (c) 2018-2020, NVIDIA CORPORATION. ############################################# # cuSignal GPU build and test script for CI # ############################################# @@ -8,7 +8,7 @@ NUMARGS=$# ARGS=$* # Logger function for build status output -function logger() { +function gpuci_logger() { echo -e "\n>>>> $@\n" } @@ -18,8 +18,8 @@ function hasArg { } # Set path and build parallel level -export PATH=/conda/bin:/usr/local/cuda/bin:$PATH -export PARALLEL_LEVEL=4 +export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH +export PARALLEL_LEVEL=-4 export CUDA_REL=${CUDA_VERSION%.*} # Set home to the job's workspace @@ -34,34 +34,37 @@ export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` # SETUP - Check environment ################################################################################ -logger "Check environment..." +gpuci_logger "Check environment" env -logger "Check GPU usage..." +gpuci_logger "Check GPU usage" nvidia-smi -logger "Activate conda env..." -source activate rapids -conda install -c rapidsai -c rapidsai-nightly -c nvidia -c conda-forge \ +gpuci_logger "Activate conda env" +. /opt/conda/etc/profile.d/conda.sh +conda activate rapids +gpuci_conda_retry install -c rapidsai -c rapidsai-nightly -c nvidia -c conda-forge \ cudatoolkit=${CUDA_REL} \ "rapids-build-env=$MINOR_VERSION.*" \ "rapids-notebook-env=$MINOR_VERSION." # https://docs.rapids.ai/maintainers/depmgmt/ # conda remove -f rapids-build-env rapids-notebook-env -# conda install "your-pkg=1.0.0" +# gpuci_conda_retry install "your-pkg=1.0.0" -logger "Check versions..." +gpuci_logger "Check versions" python --version $CC --version $CXX --version -conda list +conda info +conda config --show-sources +conda list --show-channel-urls ################################################################################ # BUILD - Build cusignal ################################################################################ -logger "Build cusignal..." +gpuci_logger "Build cusignal" $WORKSPACE/build.sh clean cusignal ################################################################################ @@ -73,20 +76,20 @@ EXITCODE=0 trap "EXITCODE=1" ERR if hasArg --skip-tests; then - logger "Skipping Tests..." + gpuci_logger "Skipping Tests" exit 0 fi -logger "Check GPU usage..." +gpuci_logger "Check GPU usage" nvidia-smi -logger "Python pytest for cusignal..." +gpuci_logger "Python pytest for cusignal" cd $WORKSPACE/python pytest --cache-clear --junitxml=${WORKSPACE}/junit-cusignal.xml -v -s -m "not cpu" conda remove -y --force blas nomkl rapids-build-env rapids-notebook-env -conda install -y -c pytorch "pytorch>=1.4" +gpuci_conda_retry install -y -c pytorch "pytorch>=1.4" ${WORKSPACE}/ci/gpu/test-notebooks.sh 2>&1 | tee nbtest.log python ${WORKSPACE}/ci/utils/nbtestlog2junitxml.py nbtest.log diff --git a/ci/gpu/test-notebooks.sh b/ci/gpu/test-notebooks.sh index 16f92cbb..ed973e2a 100755 --- a/ci/gpu/test-notebooks.sh +++ b/ci/gpu/test-notebooks.sh @@ -12,7 +12,9 @@ SKIPNBS="sdr_wfm_demod.ipynb sdr_integration.ipynb io_examples.ipynb estimation_ ## Check env env -conda list +conda info +conda config --show-sources +conda list --show-channel-urls EXITCODE=0 diff --git a/ci/local/README.md b/ci/local/README.md index b7e17202..e50bb8ab 100644 --- a/ci/local/README.md +++ b/ci/local/README.md @@ -30,7 +30,8 @@ For a full list of available gpuCI docker images, visit our [DockerHub](https:// Style Check: ```bash $ bash ci/local/build.sh -r ~/rapids/cusignal -s -$ source activate rapids # Activate gpuCI conda environment +$ . /opt/conda/etc/profile.d/conda.sh +$ conda activate rapids # Activate gpuCI conda environment $ cd rapids $ flake8 python ``` diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index dc5be773..5827ab63 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2019, NVIDIA CORPORATION. +# Copyright (c) 2020, NVIDIA CORPORATION. ######################## # cuML Version Updater # ######################## From 9107ca64b22db450b9c26c3997480246fc59952c Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Fri, 13 Nov 2020 07:50:34 -0800 Subject: [PATCH 2/6] Updated upload.sh and build.sh --- ci/cpu/build.sh | 2 +- ci/cpu/upload-anaconda.sh | 27 ------------------------ ci/cpu/upload.sh | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 28 deletions(-) delete mode 100755 ci/cpu/upload-anaconda.sh create mode 100644 ci/cpu/upload.sh diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 91e3c809..2ff7e316 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -63,4 +63,4 @@ gpuci_conda_retry build conda/recipes/cusignal --python=${PYTHON} ################################################################################ gpuci_logger "Upload conda pkgs for cuSignal" -source ci/cpu/upload-anaconda.sh +source ci/cpu/upload.sh diff --git a/ci/cpu/upload-anaconda.sh b/ci/cpu/upload-anaconda.sh deleted file mode 100755 index 5e36330b..00000000 --- a/ci/cpu/upload-anaconda.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -e - -CUDA_REL=${CUDA_VERSION%.*} - -export UPLOADFILE=`gpuci_conda_retry build conda/recipes/cusignal --python=${PYTHON} --output` - - -LABEL_OPTION="--label main" -echo "LABEL_OPTION=${LABEL_OPTION}" - -test -e ${UPLOADFILE} - -# Restrict uploads to master branch -if [ ${BUILD_MODE} != "branch" ]; then - echo "Skipping upload" - return 0 -fi - -if [ -z "$MY_UPLOAD_KEY" ]; then - echo "No upload key" - return 0 -fi - -echo "Upload" -echo ${UPLOADFILE} -anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${UPLOADFILE} diff --git a/ci/cpu/upload.sh b/ci/cpu/upload.sh new file mode 100644 index 00000000..f72921c7 --- /dev/null +++ b/ci/cpu/upload.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh + +set -e + +# Setup 'gpuci_retry' for upload retries (results in 4 total attempts) +export GPUCI_RETRY_MAX=3 +export GPUCI_RETRY_SLEEP=30 + +# Set default label options if they are not defined elsewhere +export LABEL_OPTION=${LABEL_OPTION:-"--label main"} + +# Skip uploads unless BUILD_MODE == "branch" +if [ ${BUILD_MODE} != "branch" ]; then + echo "Skipping upload" + return 0 +fi + +# Skip uploads if there is no upload key +if [ -z "$MY_UPLOAD_KEY" ]; then + echo "No upload key" + return 0 +fi + +################################################################################ +# SETUP - Get conda file output locations +################################################################################ + +gpuci_logger "Get conda file output locations" +export CUSIGNAL_FILE=`conda build conda/recipes/libcugraph --output` + +################################################################################ +# UPLOAD - Conda packages +################################################################################ + +gpuci_logger "Starting conda uploads" + +test -e ${CUSIGNAL_FILE} +echo "Upload cusignal" +echo ${CUSIGNAL_FILE} +gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${CUSIGNAL_FILE} + From ef81981cf42a9003e84cf3541b07c79f5cd7430b Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Fri, 13 Nov 2020 10:24:23 -0800 Subject: [PATCH 3/6] removed gpuci_logger and replaced parallel level --- ci/cpu/build.sh | 7 +------ ci/gpu/build.sh | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 2ff7e316..1e1998ca 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -5,14 +5,9 @@ ########################################## set -e -# Logger function for build status output -function gpuci_logger() { - echo -e "\n>>>> $@\n" -} - # Set path and build parallel level export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH -export PARALLEL_LEVEL=-4 +export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} # Set home to the job's workspace export HOME=$WORKSPACE diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index a472ae9c..ab6df6ae 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -7,11 +7,6 @@ set -e NUMARGS=$# ARGS=$* -# Logger function for build status output -function gpuci_logger() { - echo -e "\n>>>> $@\n" -} - # Arg parsing function function hasArg { (( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ") @@ -19,7 +14,7 @@ function hasArg { # Set path and build parallel level export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH -export PARALLEL_LEVEL=-4 +export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} export CUDA_REL=${CUDA_VERSION%.*} # Set home to the job's workspace From 8e156655baacd24f34dbe25b0f4fb40d2a1284ac Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Thu, 19 Nov 2020 15:20:45 -0800 Subject: [PATCH 4/6] Updated changelog --- CHANGELOG.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68aa912e..1d931a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,19 @@ ## New Features - PR #241 - Add inverse_complex_cepstrum and minimum_phase to acoustics module +- PR #270 - Add second and third order convolutions as convolve1d2o and convolve1d3o +- PR #274 - Add nightly benchmarks to CI ## Improvements -- PR #267 Various optimization across all functions -- PR #271 Increase robustness of testing +- PR #267 - Various optimization across all functions +- PR #271 - Increase robustness of testing +- PR #282 - Update README to reflect current versions +- PR #285 - Updates to gpuci scripts ## Bug Fixes - PR #272 Fix bug in gausspulse +- PR #275 Improve gpuCI Scripts +- PR #281 Fix erroneous path in CI scripts # cuSignal 0.16.0 (21 Oct 2020) From 78ae914d59d46732708536fb29c96b871f76715e Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Wed, 2 Dec 2020 21:59:19 -0800 Subject: [PATCH 5/6] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d931a0f..0f06f958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - PR #267 - Various optimization across all functions - PR #271 - Increase robustness of testing - PR #282 - Update README to reflect current versions +- PR #283 - Cleanup gpuCI scripts - PR #285 - Updates to gpuci scripts ## Bug Fixes From 2e67064fc5a28624bbf45220e8bccb50bb4df352 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Wed, 2 Dec 2020 22:07:29 -0800 Subject: [PATCH 6/6] updated changelog.mg --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f06f958..5db7463c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - PR #267 - Various optimization across all functions - PR #271 - Increase robustness of testing - PR #282 - Update README to reflect current versions -- PR #283 - Cleanup gpuCI scripts +- PR #283 - Cleanup and added functions to gpuCI scripts - PR #285 - Updates to gpuci scripts ## Bug Fixes