From 33dd37cc8fe2c6d3990f16e45f8c11b04d3671a7 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Fri, 6 Nov 2020 11:34:50 -0800 Subject: [PATCH 1/7] Gpuciscripts clean and update --- ci/checks/style.sh | 5 ++-- ci/gpu/build.sh | 45 +++++++++++++++-------------- ci/local/README.md | 3 +- ci/local/old-gpubuild.sh | 61 +++++++++++++++++++++------------------- 4 files changed, 61 insertions(+), 53 deletions(-) diff --git a/ci/checks/style.sh b/ci/checks/style.sh index cc5bb08907..e928ccb186 100644 --- a/ci/checks/style.sh +++ b/ci/checks/style.sh @@ -6,10 +6,11 @@ # 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 # Run flake8 and get results/return code FLAKE=`flake8 --exclude=cpp,thirdparty,__init__.py,versioneer.py && flake8 --config=python/.flake8.cython` diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 6c3fc0dc7b..562b52ad4b 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -9,7 +9,7 @@ NUMARGS=$# ARGS=$* # Logger function for build status output -function logger() { +function gpuci_logger() { echo -e "\n>>>> $@\n" } @@ -19,8 +19,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 @@ -38,18 +38,19 @@ source $WORKSPACE/ci/prtest.config # SETUP - Check environment ################################################################################ -logger "Check environment..." +gpuci_logger "Check environment" env -logger "Check GPU usage..." +gpuci_logger "Check GPU usage" nvidia-smi -# temporary usage of conda install with packages listed here, looking into +# temporary usage of gpuci_conda_retry install with packages listed here, looking into # using the repos yaml files for this -logger "Activate conda env..." -source activate gdf -logger "Installing packages needed for RAFT..." -conda install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ +gpuci_logger "Activate conda env" +. /opt/conda/etc/profile.d/conda.sh +conda activate rapids +gpuci_logger "Installing packages needed for RAFT" +gpuci_conda_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ "cupy>=7,<8.0.0a0" \ "cudatoolkit=${CUDA_REL}" \ "cudf=${MINOR_VERSION}" \ @@ -63,31 +64,33 @@ conda install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ "ucx-py=${MINOR_VERSION}" # Install the master version of dask, distributed, and dask-ml -logger "pip install git+https://github.com/dask/distributed.git --upgrade --no-deps" +gpuci_logger "pip install git+https://github.com/dask/distributed.git --upgrade --no-deps" pip install "git+https://github.com/dask/distributed.git" --upgrade --no-deps -logger "pip install git+https://github.com/dask/dask.git --upgrade --no-deps" +gpuci_logger "pip install git+https://github.com/dask/dask.git --upgrade --no-deps" pip install "git+https://github.com/dask/dask.git" --upgrade --no-deps -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 RAFT tests ################################################################################ -logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" +gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" export LD_LIBRARY_PATH_CACHED=$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH -logger "Build C++ and Python targets..." +gpuci_logger "Build C++ and Python targets" $WORKSPACE/build.sh cppraft pyraft -v -logger "Resetting LD_LIBRARY_PATH..." +gpuci_logger "Resetting LD_LIBRARY_PATH" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_CACHED export LD_LIBRARY_PATH_CACHED="" @@ -99,18 +102,18 @@ export LD_LIBRARY_PATH_CACHED="" ################################################################################ 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 "GoogleTest for raft..." +gpuci_logger "GoogleTest for raft" cd $WORKSPACE/cpp/build GTEST_OUTPUT="xml:${WORKSPACE}/test-results/raft_cpp/" ./test_raft -logger "Python pytest for cuml..." +gpuci_logger "Python pytest for cuml" cd $WORKSPACE/python python -m pytest --cache-clear --junitxml=${WORKSPACE}/junit-cuml.xml -v -s diff --git a/ci/local/README.md b/ci/local/README.md index 87976b26c2..a9e1c127b6 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/cuml -s -$ source activate gdf #Activate gpuCI conda environment +$ . /opt/conda/etc/profile.d/conda.sh +$ conda activate rapids gdf #Activate gpuCI conda environment $ cd rapids $ flake8 python ``` diff --git a/ci/local/old-gpubuild.sh b/ci/local/old-gpubuild.sh index 6d50ad0159..d479b1bc70 100644 --- a/ci/local/old-gpubuild.sh +++ b/ci/local/old-gpubuild.sh @@ -9,7 +9,7 @@ NUMARGS=$# ARGS=$* # Logger function for build status output -function logger() { +function gpuci_logger() { echo -e "\n>>>> $@\n" } @@ -19,8 +19,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 @@ -38,18 +38,19 @@ source $WORKSPACE/ci/prtest.config # SETUP - Check environment ################################################################################ -logger "Check environment..." +gpuci_logger "Check environment" env -logger "Check GPU usage..." +gpuci_logger "Check GPU usage" nvidia-smi -# temporary usage of conda install with packages listed here, looking into +# temporary usage of gpuci_conda_retry install with packages listed here, looking into # using the repos yaml files for this -logger "Activate conda env..." -source activate gdf -logger "Installing packages needed for RAFT..." -conda install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ +gpuci_logger "Activate conda env" +. /opt/conda/etc/profile.d/conda.sh +conda activate rapids +gpuci_logger "Installing packages needed for RAFT" +gpuci_conda_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ "cupy>=7,<8.0.0a0" \ "cudatoolkit=${CUDA_REL}" \ "cudf=${MINOR_VERSION}" \ @@ -63,7 +64,7 @@ conda install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ "ucx-py=${MINOR_VERSION}" if [ "$RUN_CUML_LIBCUML_TESTS" = "ON" ] || [ "$RUN_CUML_PRIMS_TESTS" = "ON" ] || [ "$RUN_CUML_PYTHON_TESTS" = "ON" ]; then - conda install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ + gpuci_conda_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ "nvstrings=${MINOR_VERSION}" \ "libcumlprims=${MINOR_VERSION}" \ "lapack" \ @@ -75,7 +76,7 @@ if [ "$RUN_CUML_LIBCUML_TESTS" = "ON" ] || [ "$RUN_CUML_PRIMS_TESTS" = "ON" ] || fi if [ "$RUN_CUGRAPH_LIBCUGRAPH_TESTS" = "ON" ] || [ "$RUN_CUGRAPH_PYTHON_TESTS" = "ON" ]; then - conda install -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge -c defaults \ + gpuci_conda_retry install -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge -c defaults \ "networkx>=2.3" \ "python-louvain" \ "libcypher-parser" \ @@ -84,36 +85,38 @@ if [ "$RUN_CUGRAPH_LIBCUGRAPH_TESTS" = "ON" ] || [ "$RUN_CUGRAPH_PYTHON_TESTS" = fi # Install the master version of dask, distributed, and dask-ml -logger "pip install git+https://github.com/dask/distributed.git --upgrade --no-deps" +gpuci_logger "pip install git+https://github.com/dask/distributed.git --upgrade --no-deps" pip install "git+https://github.com/dask/distributed.git" --upgrade --no-deps -logger "pip install git+https://github.com/dask/dask.git --upgrade --no-deps" +gpuci_logger "pip install git+https://github.com/dask/dask.git --upgrade --no-deps" pip install "git+https://github.com/dask/dask.git" --upgrade --no-deps -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 RAFT tests ################################################################################ -logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" +gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" export LD_LIBRARY_PATH_CACHED=$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH -logger "Build libcuml, cuml, prims and bench targets..." +gpuci_logger "Build libcuml, cuml, prims and bench targets" $WORKSPACE/build.sh cppraft pyraft -v -logger "Resetting LD_LIBRARY_PATH..." +gpuci_logger "Resetting LD_LIBRARY_PATH" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_CACHED export LD_LIBRARY_PATH_CACHED="" -logger "Build treelite for GPU testing..." +gpuci_logger "Build treelite for GPU testing" cd $WORKSPACE @@ -123,18 +126,18 @@ cd $WORKSPACE ################################################################################ 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 "GoogleTest for raft..." +gpuci_logger "GoogleTest for raft" cd $WORKSPACE/cpp/build GTEST_OUTPUT="xml:${WORKSPACE}/test-results/raft_cpp/" ./test/ml -logger "Python pytest for cuml..." +gpuci_logger "Python pytest for cuml" cd $WORKSPACE/python pytest --cache-clear --junitxml=${WORKSPACE}/junit-cuml.xml -v -s @@ -162,19 +165,19 @@ if [ "$RUN_CUML_LIBCUML_TESTS" = "ON" ] || [ "$RUN_CUML_PRIMS_TESTS" = "ON" ] || $WORKSPACE/test_downstream_repos/cuml/build.sh if [ "$RUN_CUML_LIBCUML_TESTS" = "ON" ]; then - logger "GoogleTest for libcuml..." + gpuci_logger "GoogleTest for libcuml" cd $WORKSPACE/cpp/build GTEST_OUTPUT="xml:${WORKSPACE}/test-results/libcuml_cpp/" ./test/ml fi if [ "$RUN_CUML_PYTHON_TESTS" = "ON" ]; then - logger "Python pytest for cuml..." + gpuci_logger "Python pytest for cuml" cd $WORKSPACE/python pytest --cache-clear --junitxml=${WORKSPACE}/junit-cuml.xml -v -s -m "not memleak" fi if [ "$RUN_CUML_PRIMS_TESTS" = "ON" ]; then - logger "Run ml-prims test..." + gpuci_logger "Run ml-prims test" cd $WORKSPACE/cpp/build GTEST_OUTPUT="xml:${WORKSPACE}/test-results/prims/" ./test/prims fi @@ -194,13 +197,13 @@ if [ "$RUN_CUGRAPH_LIBCUGRAPH_TESTS" = "ON" ] || [ "$RUN_CUGRAPH_PYTHON_TESTS" = $WORKSPACE/test_downstream_repos/cugraph/build.sh clean libcugraph cugraph if [ "$RUN_CUGRAPH_LIBCUGRAPH_TESTS" = "ON" ]; then - logger "GoogleTest for libcugraph..." + gpuci_logger "GoogleTest for libcugraph" cd $WORKSPACE/cpp/build ${WORKSPACE}/ci/test.sh ${TEST_MODE_FLAG} | tee testoutput.txt fi if [ "$RUN_CUGRAPH_PYTHON_TESTS" = "ON" ]; then - logger "Python pytest for cugraph..." + gpuci_logger "Python pytest for cugraph" cd $WORKSPACE/python fi fi From fb59d5aae0f6fbbd430c6544b2c59a291946a2c5 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Fri, 13 Nov 2020 10:36:57 -0800 Subject: [PATCH 2/7] removed gpuci_logger and replaced parallel_level --- ci/gpu/build.sh | 7 +------ ci/local/old-gpubuild.sh | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 562b52ad4b..ad8aa99e64 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -8,11 +8,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 ") @@ -20,7 +15,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 diff --git a/ci/local/old-gpubuild.sh b/ci/local/old-gpubuild.sh index d479b1bc70..e47dc22019 100644 --- a/ci/local/old-gpubuild.sh +++ b/ci/local/old-gpubuild.sh @@ -8,11 +8,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 ") @@ -20,7 +15,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 25d786bc41e5eb54226067eb38b02ccc58825a0f Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Fri, 13 Nov 2020 10:48:05 -0800 Subject: [PATCH 3/7] removed gdf reference --- ci/local/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/local/README.md b/ci/local/README.md index a9e1c127b6..4e1dea789a 100644 --- a/ci/local/README.md +++ b/ci/local/README.md @@ -31,7 +31,7 @@ Style Check: ```bash $ bash ci/local/build.sh -r ~/rapids/cuml -s $ . /opt/conda/etc/profile.d/conda.sh -$ conda activate rapids gdf #Activate gpuCI conda environment +$ conda activate rapids #Activate gpuCI conda environment $ cd rapids $ flake8 python ``` From 04eb20f35c28bc8c3344d8746c85a9ed3b8ae935 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Mon, 30 Nov 2020 19:32:26 -0800 Subject: [PATCH 4/7] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 041925fa0b..d756528dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Improvements - PR #73: Move DistanceType enum from cuML to RAFT +- pr #92: Cleanup gpuCI scripts ## Bug Fixes - PR #77: Fixing CUB include for CUDA < 11 From 638bbdd54279e4d26bd5760c020101d26f85a0ac Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Tue, 1 Dec 2020 11:59:15 -0800 Subject: [PATCH 5/7] updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ceafb8cba4..88a422469b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - PR #101: MST core solver - PR #93: Incorporate Date/Nagi implementation of Hungarian Algorithm - PR #94: Allow generic reductions for the map then reduce op -- RP #95: Cholesky rank one update prim +- PR #95: Cholesky rank one update prim ## Improvements - PR #73: Move DistanceType enum from cuML to RAFT @@ -13,6 +13,7 @@ - PR #98: Adding InnerProduct to DistanceType - PR #103: Epsilon parameter for Cholesky rank one update - PR #100: Add divyegala as codeowner +- PR #111: Cleanup gpuCI scripts ## Bug Fixes - PR #77: Fixing CUB include for CUDA < 11 From 6f256ec0fed3c957a262543d9be1aaf66515a438 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Tue, 15 Dec 2020 11:29:02 -0800 Subject: [PATCH 6/7] Fixed Spacing --- ci/gpu/build.sh | 1 + ci/local/old-gpubuild.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index ad8aa99e64..8d71a73f8a 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -73,6 +73,7 @@ conda info conda config --show-sources conda list --show-channel-urls + ################################################################################ # BUILD - Build RAFT tests ################################################################################ diff --git a/ci/local/old-gpubuild.sh b/ci/local/old-gpubuild.sh index e47dc22019..d6a4f64698 100644 --- a/ci/local/old-gpubuild.sh +++ b/ci/local/old-gpubuild.sh @@ -94,6 +94,7 @@ conda info conda config --show-sources conda list --show-channel-urls + ################################################################################ # BUILD - Build RAFT tests ################################################################################ From 095a076f1023095c8e458639ebec145176704cf0 Mon Sep 17 00:00:00 2001 From: Mark Sadang Date: Wed, 16 Dec 2020 13:08:29 -0800 Subject: [PATCH 7/7] resolved merge conflict --- ci/gpu/build.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 3c7f412e68..8d71a73f8a 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -59,17 +59,10 @@ gpuci_conda_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid "ucx-py=${MINOR_VERSION}" # Install the master version of dask, distributed, and dask-ml -<<<<<<< HEAD gpuci_logger "pip install git+https://github.com/dask/distributed.git --upgrade --no-deps" pip install "git+https://github.com/dask/distributed.git" --upgrade --no-deps gpuci_logger "pip install git+https://github.com/dask/dask.git --upgrade --no-deps" pip install "git+https://github.com/dask/dask.git" --upgrade --no-deps -======= -logger "pip install git+https://github.com/dask/distributed.git@master --upgrade --no-deps" -pip install "git+https://github.com/dask/distributed.git@master" --upgrade --no-deps -logger "pip install git+https://github.com/dask/dask.git@master --upgrade --no-deps" -pip install "git+https://github.com/dask/dask.git@master" --upgrade --no-deps ->>>>>>> upstream/branch-0.18 gpuci_logger "Check versions"