From fbed42f35f424e6361895f1874660b7a440a764d Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 14 Sep 2022 19:08:35 -0400 Subject: [PATCH 1/4] Updating cpu job in hopes it speeds up python cpu builds --- ci/cpu/build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 759a941245..c68402a3eb 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -94,22 +94,25 @@ if [ "$BUILD_LIBRAFT" == "1" ]; then sccache --show-stats else gpuci_logger "SKIPPING build of conda packages for libraft-nn, libraft-distance, libraft-headers and libraft-tests" + + # Install pre-built conda packages from previous CI step + gpuci_logger "Install libraft conda packages from CPU job" + gpuci_mamba_retry install -y -c ${CONDA_BLD_DIR}/libraft/work libraft-headers libraft-distance libraft-nn libraft-tests fi if [ "$BUILD_RAFT" == '1' ]; then gpuci_logger "Building Python conda packages for raft" if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/raft-dask --python=$PYTHON gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibraft --python=$PYTHON + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/raft-dask --python=$PYTHON else - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/raft-dask -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON - mkdir -p ${CONDA_BLD_DIR}/raft-dask/work - mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/raft-dask/work - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibraft -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON mkdir -p ${CONDA_BLD_DIR}/pylibraft/work mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/pylibraft/work + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/raft-dask -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=$PYTHON + mkdir -p ${CONDA_BLD_DIR}/raft-dask/work + mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/raft-dask/work fi else gpuci_logger "SKIPPING build of Python conda packages for raft" From a2f1846d3c66258a8902d176bcd4ec822d13bd09 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 14 Sep 2022 19:48:24 -0400 Subject: [PATCH 2/4] Trying different directory --- ci/cpu/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index c68402a3eb..4d1b72065c 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -97,7 +97,8 @@ else # Install pre-built conda packages from previous CI step gpuci_logger "Install libraft conda packages from CPU job" - gpuci_mamba_retry install -y -c ${CONDA_BLD_DIR}/libraft/work libraft-headers libraft-distance libraft-nn libraft-tests + CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here + gpuci_mamba_retry install -y -c ${CONDA_ARTIFACT_PATH} libraft-headers libraft-distance libraft-nn libraft-tests fi if [ "$BUILD_RAFT" == '1' ]; then From fa35aaee9850fe675b9aa48da5657fa5f1c46ab8 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 14 Sep 2022 20:59:30 -0400 Subject: [PATCH 3/4] Trying to set FIND_RAFT_CPP on by default --- python/pylibraft/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pylibraft/CMakeLists.txt b/python/pylibraft/CMakeLists.txt index 6567fdff0f..9076626692 100644 --- a/python/pylibraft/CMakeLists.txt +++ b/python/pylibraft/CMakeLists.txt @@ -29,7 +29,7 @@ project( CXX) option(FIND_RAFT_CPP "Search for existing RAFT C++ installations before defaulting to local files" - OFF) + ON) # If the user requested it we attempt to find RAFT. if(FIND_RAFT_CPP) From 9db8d7f58a5882ec03513a02b146680de4f56083 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 14 Sep 2022 21:53:46 -0400 Subject: [PATCH 4/4] Don't auto-build dists by default for pylibraft --- build.sh | 4 ++-- python/pylibraft/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 3838232fba..bfce3815d1 100755 --- a/build.sh +++ b/build.sh @@ -184,7 +184,7 @@ if hasArg --compile-nn || hasArg --compile-libs || (( ${NUMARGS} == 0 )); then CMAKE_TARGET="${CMAKE_TARGET};raft_nn_lib" fi -if hasArg --compile-dist || hasArg --compile-libs || hasArg pylibraft || (( ${NUMARGS} == 0 )); then +if hasArg --compile-dist || hasArg --compile-libs || (( ${NUMARGS} == 0 )); then COMPILE_DIST_LIBRARY=ON CMAKE_TARGET="${CMAKE_TARGET};raft_distance_lib" fi @@ -252,7 +252,7 @@ fi ################################################################################ # Configure for building all C++ targets -if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg pylibraft || hasArg docs || hasArg tests || hasArg bench; then +if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || hasArg bench; then if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then RAFT_CMAKE_CUDA_ARCHITECTURES="NATIVE" echo "Building for the architecture of the GPU in the system..." diff --git a/python/pylibraft/CMakeLists.txt b/python/pylibraft/CMakeLists.txt index 9076626692..6287efc768 100644 --- a/python/pylibraft/CMakeLists.txt +++ b/python/pylibraft/CMakeLists.txt @@ -28,14 +28,14 @@ project( C CXX) -option(FIND_RAFT_CPP "Search for existing RAFT C++ installations before defaulting to local files" - ON) +option(FIND_RAFT_CPP "Search for existing RAFT C++ installations before defaulting to local files" ON) # If the user requested it we attempt to find RAFT. if(FIND_RAFT_CPP) find_package(raft ${pylibraft_version} REQUIRED COMPONENTS distance) if(NOT TARGET raft::raft_distance_lib) message(FATAL_ERROR "Building against a preexisting libraft library requires the distance components of that library to have been built!") + endif() else() set(raft_FOUND OFF)