From f1adb5eecf4691da080d8950cc29dc7899c45dc0 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jan 2025 04:13:57 +0000 Subject: [PATCH 1/6] Update CMake --- cpp/CMakeLists.txt | 7 ++----- cpp/cmake/thirdparty/get_rmm.cmake | 19 +++++++++++++++---- rapids_config.cmake | 4 +++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index ed69ee3df7..e3c829ed71 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -231,11 +231,8 @@ endif() rapids_cpm_init() rapids_cmake_install_lib_dir(lib_dir) -# Not using rapids-cmake since we never want to find, always download. -CPMAddPackage( - NAME rapids_logger GITHUB_REPOSITORY rapidsai/rapids-logger GIT_SHALLOW FALSE GIT_TAG - 4df3ee70c6746fd1b6c0dc14209dae2e2d4378c6 VERSION 4df3ee70c6746fd1b6c0dc14209dae2e2d4378c6 -) +include(${rapids-cmake-dir}/cpm/logger.cmake) +rapids_cpm_logger() rapids_make_logger( ML EXPORT_SET cuml-exports LOGGER_HEADER_DIR include/cuml/common/ LOGGER_MACRO_PREFIX CUML LOGGER_TARGET cuml_logger ) diff --git a/cpp/cmake/thirdparty/get_rmm.cmake b/cpp/cmake/thirdparty/get_rmm.cmake index 35968f7245..c27b41a059 100644 --- a/cpp/cmake/thirdparty/get_rmm.cmake +++ b/cpp/cmake/thirdparty/get_rmm.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2025, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,9 +15,20 @@ #============================================================================= function(find_and_configure_rmm) - include(${rapids-cmake-dir}/cpm/rmm.cmake) - rapids_cpm_rmm(BUILD_EXPORT_SET cuml-exports - INSTALL_EXPORT_SET cuml-exports) + #include(${rapids-cmake-dir}/cpm/rmm.cmake) + #rapids_cpm_rmm(BUILD_EXPORT_SET cuml-exports + # INSTALL_EXPORT_SET cuml-exports) + include("${rapids-cmake-dir}/cpm/find.cmake") + rapids_cpm_find( + rmm 25.02 + BUILD_EXPORT_SET cuml-exports + INSTALL_EXPORT_SET cuml-exports + GLOBAL_TARGETS rmm::rmm + CPM_ARGS + GIT_REPOSITORY "https://github.com/vyasr/rmm.git" + GIT_TAG "chore/rapids_cmake_logger" + OPTIONS "BUILD_TESTS OFF" "BUILD_BENCHMARKS OFF" + ) endfunction() find_and_configure_rmm() diff --git a/rapids_config.cmake b/rapids_config.cmake index f064a5b497..592886d6b1 100644 --- a/rapids_config.cmake +++ b/rapids_config.cmake @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2018-2024, NVIDIA CORPORATION. +# Copyright (c) 2018-2025, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -12,6 +12,8 @@ # the License. # ============================================================================= file(READ "${CMAKE_CURRENT_LIST_DIR}/VERSION" _rapids_version) +set(rapids-cmake-repo "vyasr/rapids-cmake") +set(rapids-cmake-branch "feat/logger") if(_rapids_version MATCHES [[^([0-9][0-9])\.([0-9][0-9])\.([0-9][0-9])]]) set(RAPIDS_VERSION_MAJOR "${CMAKE_MATCH_1}") set(RAPIDS_VERSION_MINOR "${CMAKE_MATCH_2}") From 0247781a705b4b30c9d43b7affc96b103e437a36 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jan 2025 04:14:48 +0000 Subject: [PATCH 2/6] Update CI scripts --- ci/build_cpp.sh | 6 ++++-- ci/build_python.sh | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index fa066c03c6..af1e12104a 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2024, NVIDIA CORPORATION. +# Copyright (c) 2022-2025, NVIDIA CORPORATION. set -euo pipefail @@ -17,7 +17,9 @@ rapids-logger "Begin cpp build" sccache --zero-stats -RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcuml +LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) + +RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild --channel "${LIBRMM_CHANNEL}" conda/recipes/libcuml sccache --show-adv-stats diff --git a/ci/build_python.sh b/ci/build_python.sh index e8d2b3ed39..c8618fd1cd 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2024, NVIDIA CORPORATION. +# Copyright (c) 2022-2025, NVIDIA CORPORATION. set -euo pipefail @@ -17,6 +17,8 @@ rapids-generate-version > ./VERSION rapids-logger "Begin py build" +LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) +PYLIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 python) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) sccache --zero-stats @@ -26,6 +28,8 @@ sccache --zero-stats RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ + --channel "${LIBRMM_CHANNEL}" \ + --channel "${PYLIBRMM_CHANNEL}" \ conda/recipes/cuml sccache --show-adv-stats From 213efbb19d2eb857cc6423882a9caed76ae605c8 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jan 2025 04:20:46 +0000 Subject: [PATCH 3/6] More CI script updates --- ci/build_cpp.sh | 3 ++- ci/build_python.sh | 4 ++++ ci/test_cpp.sh | 6 ++++-- ci/test_python_common.sh | 10 +++++++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index af1e12104a..0b2a40c2e5 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -18,8 +18,9 @@ rapids-logger "Begin cpp build" sccache --zero-stats LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) +LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) -RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild --channel "${LIBRMM_CHANNEL}" conda/recipes/libcuml +RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild --channel "${LIBRMM_CHANNEL}" --channel "${LIBRAFT_CHANNEL}" conda/recipes/libcuml sccache --show-adv-stats diff --git a/ci/build_python.sh b/ci/build_python.sh index c8618fd1cd..df01d8ca9d 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -19,6 +19,8 @@ rapids-logger "Begin py build" LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) PYLIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 python) +LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) +PYLIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 python) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) sccache --zero-stats @@ -30,6 +32,8 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --channel "${CPP_CHANNEL}" \ --channel "${LIBRMM_CHANNEL}" \ --channel "${PYLIBRMM_CHANNEL}" \ + --channel "${LIBRAFT_CHANNEL}" \ + --channel "${PYLIBRAFT_CHANNEL}" \ conda/recipes/cuml sccache --show-adv-stats diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index ea6d1cdc11..55eec1001d 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2024, NVIDIA CORPORATION. +# Copyright (c) 2022-2025, NVIDIA CORPORATION. set -euo pipefail @@ -9,6 +9,8 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../ . /opt/conda/etc/profile.d/conda.sh rapids-logger "Downloading artifacts from previous jobs" +LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) +LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) rapids-logger "Generate C++ testing dependencies" @@ -16,7 +18,7 @@ rapids-dependency-file-generator \ --output conda \ --file-key test_cpp \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \ - --prepend-channel "${CPP_CHANNEL}" | tee env.yaml + -prepend--channel "${LIBRMM_CHANNEL}" --prepend-channel "${LIBRAFT_CHANNEL}" --prepend-channel "${CPP_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test diff --git a/ci/test_python_common.sh b/ci/test_python_common.sh index 5f1894356c..2661eed33b 100644 --- a/ci/test_python_common.sh +++ b/ci/test_python_common.sh @@ -1,11 +1,15 @@ #!/bin/bash -# Copyright (c) 2022-2024, NVIDIA CORPORATION. +# Copyright (c) 2022-2025, NVIDIA CORPORATION. set -euo pipefail . /opt/conda/etc/profile.d/conda.sh rapids-logger "Downloading artifacts from previous jobs" +LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) +PYLIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 python) +LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) +PYLIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 python) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) @@ -14,6 +18,10 @@ rapids-dependency-file-generator \ --output conda \ --file-key test_python \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ + --prepend-channel "${LIBRMM_CHANNEL}" \ + --prepend-channel "${PYLIBRMM_CHANNEL}" \ + --prepend-channel "${LIBRAFT_CHANNEL}" \ + --prepend-channel "${PYLIBRAFT_CHANNEL}" \ --prepend-channel "${CPP_CHANNEL}" \ --prepend-channel "${PYTHON_CHANNEL}" | tee env.yaml From 1c9936afe9780a2c210e5dacc6a2a82217606c96 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jan 2025 07:37:20 +0000 Subject: [PATCH 4/6] Typo --- ci/test_cpp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index 55eec1001d..e6cf35d5eb 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -18,7 +18,7 @@ rapids-dependency-file-generator \ --output conda \ --file-key test_cpp \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \ - -prepend--channel "${LIBRMM_CHANNEL}" --prepend-channel "${LIBRAFT_CHANNEL}" --prepend-channel "${CPP_CHANNEL}" | tee env.yaml + --prepend-channel "${LIBRMM_CHANNEL}" --prepend-channel "${LIBRAFT_CHANNEL}" --prepend-channel "${CPP_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test From 2f13133d091fdf882faf6a773a2c04b8c86ded4b Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jan 2025 18:32:59 +0000 Subject: [PATCH 5/6] Revert testing changes --- ci/build_cpp.sh | 7 ++----- ci/build_python.sh | 10 +--------- ci/test_cpp.sh | 6 ++---- ci/test_python_common.sh | 10 +--------- cpp/cmake/thirdparty/get_rmm.cmake | 19 ++++--------------- rapids_config.cmake | 4 +--- 6 files changed, 11 insertions(+), 45 deletions(-) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 0b2a40c2e5..fa066c03c6 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2025, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -17,10 +17,7 @@ rapids-logger "Begin cpp build" sccache --zero-stats -LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) -LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) - -RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild --channel "${LIBRMM_CHANNEL}" --channel "${LIBRAFT_CHANNEL}" conda/recipes/libcuml +RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcuml sccache --show-adv-stats diff --git a/ci/build_python.sh b/ci/build_python.sh index df01d8ca9d..e8d2b3ed39 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2025, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -17,10 +17,6 @@ rapids-generate-version > ./VERSION rapids-logger "Begin py build" -LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) -PYLIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 python) -LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) -PYLIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 python) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) sccache --zero-stats @@ -30,10 +26,6 @@ sccache --zero-stats RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ - --channel "${LIBRMM_CHANNEL}" \ - --channel "${PYLIBRMM_CHANNEL}" \ - --channel "${LIBRAFT_CHANNEL}" \ - --channel "${PYLIBRAFT_CHANNEL}" \ conda/recipes/cuml sccache --show-adv-stats diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index e6cf35d5eb..ea6d1cdc11 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2025, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -9,8 +9,6 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../ . /opt/conda/etc/profile.d/conda.sh rapids-logger "Downloading artifacts from previous jobs" -LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) -LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) rapids-logger "Generate C++ testing dependencies" @@ -18,7 +16,7 @@ rapids-dependency-file-generator \ --output conda \ --file-key test_cpp \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \ - --prepend-channel "${LIBRMM_CHANNEL}" --prepend-channel "${LIBRAFT_CHANNEL}" --prepend-channel "${CPP_CHANNEL}" | tee env.yaml + --prepend-channel "${CPP_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test diff --git a/ci/test_python_common.sh b/ci/test_python_common.sh index 2661eed33b..5f1894356c 100644 --- a/ci/test_python_common.sh +++ b/ci/test_python_common.sh @@ -1,15 +1,11 @@ #!/bin/bash -# Copyright (c) 2022-2025, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail . /opt/conda/etc/profile.d/conda.sh rapids-logger "Downloading artifacts from previous jobs" -LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 cpp) -PYLIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1776 python) -LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 cpp) -PYLIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2534 python) CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) @@ -18,10 +14,6 @@ rapids-dependency-file-generator \ --output conda \ --file-key test_python \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ - --prepend-channel "${LIBRMM_CHANNEL}" \ - --prepend-channel "${PYLIBRMM_CHANNEL}" \ - --prepend-channel "${LIBRAFT_CHANNEL}" \ - --prepend-channel "${PYLIBRAFT_CHANNEL}" \ --prepend-channel "${CPP_CHANNEL}" \ --prepend-channel "${PYTHON_CHANNEL}" | tee env.yaml diff --git a/cpp/cmake/thirdparty/get_rmm.cmake b/cpp/cmake/thirdparty/get_rmm.cmake index c27b41a059..35968f7245 100644 --- a/cpp/cmake/thirdparty/get_rmm.cmake +++ b/cpp/cmake/thirdparty/get_rmm.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023-2025, NVIDIA CORPORATION. +# Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,20 +15,9 @@ #============================================================================= function(find_and_configure_rmm) - #include(${rapids-cmake-dir}/cpm/rmm.cmake) - #rapids_cpm_rmm(BUILD_EXPORT_SET cuml-exports - # INSTALL_EXPORT_SET cuml-exports) - include("${rapids-cmake-dir}/cpm/find.cmake") - rapids_cpm_find( - rmm 25.02 - BUILD_EXPORT_SET cuml-exports - INSTALL_EXPORT_SET cuml-exports - GLOBAL_TARGETS rmm::rmm - CPM_ARGS - GIT_REPOSITORY "https://github.com/vyasr/rmm.git" - GIT_TAG "chore/rapids_cmake_logger" - OPTIONS "BUILD_TESTS OFF" "BUILD_BENCHMARKS OFF" - ) + include(${rapids-cmake-dir}/cpm/rmm.cmake) + rapids_cpm_rmm(BUILD_EXPORT_SET cuml-exports + INSTALL_EXPORT_SET cuml-exports) endfunction() find_and_configure_rmm() diff --git a/rapids_config.cmake b/rapids_config.cmake index 592886d6b1..f064a5b497 100644 --- a/rapids_config.cmake +++ b/rapids_config.cmake @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2018-2025, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -12,8 +12,6 @@ # the License. # ============================================================================= file(READ "${CMAKE_CURRENT_LIST_DIR}/VERSION" _rapids_version) -set(rapids-cmake-repo "vyasr/rapids-cmake") -set(rapids-cmake-branch "feat/logger") if(_rapids_version MATCHES [[^([0-9][0-9])\.([0-9][0-9])\.([0-9][0-9])]]) set(RAPIDS_VERSION_MAJOR "${CMAKE_MATCH_1}") set(RAPIDS_VERSION_MINOR "${CMAKE_MATCH_2}") From a0f567e79343ec87c6f94b70be4943512632569a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jan 2025 18:41:11 +0000 Subject: [PATCH 6/6] Update for rapids-cmake changes --- cpp/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e3c829ed71..bfa9cba085 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -231,8 +231,8 @@ endif() rapids_cpm_init() rapids_cmake_install_lib_dir(lib_dir) -include(${rapids-cmake-dir}/cpm/logger.cmake) -rapids_cpm_logger() +include(${rapids-cmake-dir}/cpm/rapids_logger.cmake) +rapids_cpm_rapids_logger() rapids_make_logger( ML EXPORT_SET cuml-exports LOGGER_HEADER_DIR include/cuml/common/ LOGGER_MACRO_PREFIX CUML LOGGER_TARGET cuml_logger )