From 0ba3cc00fe38dc10d757ed63089e00355a738d54 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Thu, 20 Feb 2025 15:37:16 -0500 Subject: [PATCH 1/5] Require sphinx<8.2.0 (#2590) Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Gil Forsyth (https://github.com/gforsyth) URL: https://github.com/rapidsai/raft/pull/2590 --- conda/environments/all_cuda-118_arch-aarch64.yaml | 1 + conda/environments/all_cuda-118_arch-x86_64.yaml | 1 + conda/environments/all_cuda-128_arch-aarch64.yaml | 1 + conda/environments/all_cuda-128_arch-x86_64.yaml | 1 + dependencies.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/conda/environments/all_cuda-118_arch-aarch64.yaml b/conda/environments/all_cuda-118_arch-aarch64.yaml index 2cf400550f..fab2e77de1 100644 --- a/conda/environments/all_cuda-118_arch-aarch64.yaml +++ b/conda/environments/all_cuda-118_arch-aarch64.yaml @@ -55,6 +55,7 @@ dependencies: - scipy - sphinx-copybutton - sphinx-markdown-tables +- sphinx<8.2.0 - sysroot_linux-aarch64==2.28 - ucx-py==0.43.*,>=0.0.0a0 name: all_cuda-118_arch-aarch64 diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 9aa9e4ef62..784f035c99 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -55,6 +55,7 @@ dependencies: - scipy - sphinx-copybutton - sphinx-markdown-tables +- sphinx<8.2.0 - sysroot_linux-64==2.28 - ucx-py==0.43.*,>=0.0.0a0 name: all_cuda-118_arch-x86_64 diff --git a/conda/environments/all_cuda-128_arch-aarch64.yaml b/conda/environments/all_cuda-128_arch-aarch64.yaml index f180b766b3..ab9576dec2 100644 --- a/conda/environments/all_cuda-128_arch-aarch64.yaml +++ b/conda/environments/all_cuda-128_arch-aarch64.yaml @@ -51,6 +51,7 @@ dependencies: - scipy - sphinx-copybutton - sphinx-markdown-tables +- sphinx<8.2.0 - sysroot_linux-aarch64==2.28 - ucx-py==0.43.*,>=0.0.0a0 name: all_cuda-128_arch-aarch64 diff --git a/conda/environments/all_cuda-128_arch-x86_64.yaml b/conda/environments/all_cuda-128_arch-x86_64.yaml index a098636ea6..81c144dad7 100644 --- a/conda/environments/all_cuda-128_arch-x86_64.yaml +++ b/conda/environments/all_cuda-128_arch-x86_64.yaml @@ -51,6 +51,7 @@ dependencies: - scipy - sphinx-copybutton - sphinx-markdown-tables +- sphinx<8.2.0 - sysroot_linux-64==2.28 - ucx-py==0.43.*,>=0.0.0a0 name: all_cuda-128_arch-x86_64 diff --git a/dependencies.yaml b/dependencies.yaml index e36feb220d..f7641910c3 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -441,6 +441,7 @@ dependencies: - recommonmark - sphinx-copybutton - sphinx-markdown-tables + - sphinx<8.2.0 py_version: specific: - output_types: conda From 3e53bf0bac7e40bf1ccdd09c09c1ef6f6a49aa26 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Thu, 20 Feb 2025 20:53:50 -0500 Subject: [PATCH 2/5] Add `verify-codeowners` hook (#2557) Issue: https://github.com/rapidsai/pre-commit-hooks/issues/61 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Jake Awe (https://github.com/AyodeAwe) - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/raft/pull/2557 --- .github/CODEOWNERS | 15 ++++++++------- .pre-commit-config.yaml | 4 +++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a7f455e200..d739f962d7 100755 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,8 +5,9 @@ cpp/ @rapidsai/raft-cpp-codeowners python/ @rapidsai/raft-python-codeowners #cmake code owners -**/CMakeLists.txt @rapidsai/raft-cmake-codeowners +CMakeLists.txt @rapidsai/raft-cmake-codeowners **/cmake/ @rapidsai/raft-cmake-codeowners +*.cmake @rapidsai/raft-cmake-codeowners python/setup.py @rapidsai/raft-cmake-codeowners build.sh @rapidsai/raft-cmake-codeowners **/build.sh @rapidsai/raft-cmake-codeowners @@ -14,11 +15,11 @@ build.sh @rapidsai/raft-cmake-codeowners #CI code owners /.github/ @rapidsai/ci-codeowners /ci/ @rapidsai/ci-codeowners -/.pre-commit-config.yaml @rapidsai/ci-codeowners #packaging code owners -/.devcontainer/ @rapidsai/packaging-codeowners -/conda/ @rapidsai/packaging-codeowners -/dependencies.yaml @rapidsai/packaging-codeowners -/build.sh @rapidsai/packaging-codeowners -pyproject.toml @rapidsai/packaging-codeowners +/.pre-commit-config.yaml @rapidsai/packaging-codeowners +/.devcontainer/ @rapidsai/packaging-codeowners +/conda/ @rapidsai/packaging-codeowners +dependencies.yaml @rapidsai/packaging-codeowners +/build.sh @rapidsai/packaging-codeowners +pyproject.toml @rapidsai/packaging-codeowners diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 21dc20e776..a9da756266 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -107,7 +107,7 @@ repos: hooks: - id: check-json - repo: https://github.com/rapidsai/pre-commit-hooks - rev: v0.4.0 + rev: v0.5.0 hooks: - id: verify-copyright files: | @@ -122,6 +122,8 @@ repos: cpp/include/raft/thirdparty/| docs/source/sphinxext/github_link[.]py| - id: verify-alpha-spec + - id: verify-codeowners + args: [--fix, --project-prefix=raft] - repo: https://github.com/rapidsai/dependency-file-generator rev: v1.17.0 hooks: From 613ca02dd01b2598952face7735438f07421fa2e Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 21 Feb 2025 15:35:51 -0500 Subject: [PATCH 3/5] Require CMake 3.30.4 (#2584) Update CMake minimum required to 3.30.4 across all of RAPIDS Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - Jake Awe (https://github.com/AyodeAwe) - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/raft/pull/2584 --- conda/environments/all_cuda-118_arch-aarch64.yaml | 2 +- conda/environments/all_cuda-118_arch-x86_64.yaml | 2 +- conda/environments/all_cuda-128_arch-aarch64.yaml | 2 +- conda/environments/all_cuda-128_arch-x86_64.yaml | 2 +- conda/recipes/libraft/conda_build_config.yaml | 2 +- conda/recipes/pylibraft/conda_build_config.yaml | 2 +- conda/recipes/raft-dask/conda_build_config.yaml | 2 +- cpp/CMakeLists.txt | 2 +- cpp/include/raft/thirdparty/mdspan/CMakeLists.txt | 2 +- cpp/include/raft/thirdparty/mdspan/cmake/metabench.cmake | 2 +- cpp/include/raft/thirdparty/mdspan/examples/CMakeLists.txt | 2 +- dependencies.yaml | 2 +- python/libraft/CMakeLists.txt | 2 +- python/libraft/pyproject.toml | 2 +- python/pylibraft/CMakeLists.txt | 2 +- python/pylibraft/pyproject.toml | 2 +- python/raft-dask/CMakeLists.txt | 2 +- python/raft-dask/pyproject.toml | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/conda/environments/all_cuda-118_arch-aarch64.yaml b/conda/environments/all_cuda-118_arch-aarch64.yaml index fab2e77de1..d64ef573ac 100644 --- a/conda/environments/all_cuda-118_arch-aarch64.yaml +++ b/conda/environments/all_cuda-118_arch-aarch64.yaml @@ -11,7 +11,7 @@ dependencies: - c-compiler - clang-tools=16.0.6 - clang==16.0.6 -- cmake>=3.26.4,!=3.30.0 +- cmake>=3.30.4 - cuda-nvtx=11.8 - cuda-profiler-api=11.8.86 - cuda-python>=11.8.5,<12.0a0 diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 784f035c99..d6f2e02162 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -11,7 +11,7 @@ dependencies: - c-compiler - clang-tools=16.0.6 - clang==16.0.6 -- cmake>=3.26.4,!=3.30.0 +- cmake>=3.30.4 - cuda-nvtx=11.8 - cuda-profiler-api=11.8.86 - cuda-python>=11.8.5,<12.0a0 diff --git a/conda/environments/all_cuda-128_arch-aarch64.yaml b/conda/environments/all_cuda-128_arch-aarch64.yaml index ab9576dec2..64922ac67e 100644 --- a/conda/environments/all_cuda-128_arch-aarch64.yaml +++ b/conda/environments/all_cuda-128_arch-aarch64.yaml @@ -11,7 +11,7 @@ dependencies: - c-compiler - clang-tools=16.0.6 - clang==16.0.6 -- cmake>=3.26.4,!=3.30.0 +- cmake>=3.30.4 - cuda-cudart-dev - cuda-nvcc - cuda-nvtx-dev diff --git a/conda/environments/all_cuda-128_arch-x86_64.yaml b/conda/environments/all_cuda-128_arch-x86_64.yaml index 81c144dad7..3d573ed6d0 100644 --- a/conda/environments/all_cuda-128_arch-x86_64.yaml +++ b/conda/environments/all_cuda-128_arch-x86_64.yaml @@ -11,7 +11,7 @@ dependencies: - c-compiler - clang-tools=16.0.6 - clang==16.0.6 -- cmake>=3.26.4,!=3.30.0 +- cmake>=3.30.4 - cuda-cudart-dev - cuda-nvcc - cuda-nvtx-dev diff --git a/conda/recipes/libraft/conda_build_config.yaml b/conda/recipes/libraft/conda_build_config.yaml index 1386116d81..46a323a929 100644 --- a/conda/recipes/libraft/conda_build_config.yaml +++ b/conda/recipes/libraft/conda_build_config.yaml @@ -17,7 +17,7 @@ c_stdlib_version: - "2.28" cmake_version: - - ">=3.26.4,!=3.30.0" + - ">=3.30.4" # The CTK libraries below are missing from the conda-forge::cudatoolkit package # for CUDA 11. The "*_host_*" version specifiers correspond to `11.8` packages diff --git a/conda/recipes/pylibraft/conda_build_config.yaml b/conda/recipes/pylibraft/conda_build_config.yaml index 83f5ebcb15..0a1108eb51 100644 --- a/conda/recipes/pylibraft/conda_build_config.yaml +++ b/conda/recipes/pylibraft/conda_build_config.yaml @@ -17,4 +17,4 @@ c_stdlib_version: - "2.28" cmake_version: - - ">=3.26.4,!=3.30.0" + - ">=3.30.4" diff --git a/conda/recipes/raft-dask/conda_build_config.yaml b/conda/recipes/raft-dask/conda_build_config.yaml index 21cb020067..cf357c821f 100644 --- a/conda/recipes/raft-dask/conda_build_config.yaml +++ b/conda/recipes/raft-dask/conda_build_config.yaml @@ -23,7 +23,7 @@ ucxx_version: - "0.43.*" cmake_version: - - ">=3.26.4,!=3.30.0" + - ">=3.30.4" nccl_version: - ">=2.19" diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 436b120872..752ce13f3d 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -10,7 +10,7 @@ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # or implied. See the License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) include(../rapids_config.cmake) include(rapids-cmake) include(rapids-cpm) diff --git a/cpp/include/raft/thirdparty/mdspan/CMakeLists.txt b/cpp/include/raft/thirdparty/mdspan/CMakeLists.txt index 0ff692820a..94960fb35e 100644 --- a/cpp/include/raft/thirdparty/mdspan/CMakeLists.txt +++ b/cpp/include/raft/thirdparty/mdspan/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) project(MDSpan VERSION 0.4.0 diff --git a/cpp/include/raft/thirdparty/mdspan/cmake/metabench.cmake b/cpp/include/raft/thirdparty/mdspan/cmake/metabench.cmake index 8ba683ddce..075f75584b 100644 --- a/cpp/include/raft/thirdparty/mdspan/cmake/metabench.cmake +++ b/cpp/include/raft/thirdparty/mdspan/cmake/metabench.cmake @@ -8,7 +8,7 @@ # benchmarks. For documentation, questions and other resources please # visit the home of the project at https://github.com/ldionne/metabench. -cmake_minimum_required(VERSION 3.12...3.19) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) find_package(Ruby 2.1 QUIET) if(NOT RUBY_EXECUTABLE) diff --git a/cpp/include/raft/thirdparty/mdspan/examples/CMakeLists.txt b/cpp/include/raft/thirdparty/mdspan/examples/CMakeLists.txt index 6c9733ed01..963b27fa0c 100644 --- a/cpp/include/raft/thirdparty/mdspan/examples/CMakeLists.txt +++ b/cpp/include/raft/thirdparty/mdspan/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12...3.19) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) project(example LANGUAGES CXX) diff --git a/dependencies.yaml b/dependencies.yaml index f7641910c3..5a2f0b5417 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -185,7 +185,7 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: - - &cmake_ver cmake>=3.26.4,!=3.30.0 + - &cmake_ver cmake>=3.30.4 - ninja - output_types: [conda] packages: diff --git a/python/libraft/CMakeLists.txt b/python/libraft/CMakeLists.txt index db81aa9507..0b7ef04bd2 100644 --- a/python/libraft/CMakeLists.txt +++ b/python/libraft/CMakeLists.txt @@ -12,7 +12,7 @@ # the License. # ============================================================================= -cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) include(../../rapids_config.cmake) diff --git a/python/libraft/pyproject.toml b/python/libraft/pyproject.toml index 8ef419282c..3b39754e9a 100644 --- a/python/libraft/pyproject.toml +++ b/python/libraft/pyproject.toml @@ -103,7 +103,7 @@ regex = "(?P.*)" [tool.rapids-build-backend] build-backend = "scikit_build_core.build" requires = [ - "cmake>=3.26.4,!=3.30.0", + "cmake>=3.30.4", "librmm==25.4.*,>=0.0.0a0", "ninja", "rapids-logger==0.1.*,>=0.0.0a0", diff --git a/python/pylibraft/CMakeLists.txt b/python/pylibraft/CMakeLists.txt index 83c262dc10..e4972c8c44 100644 --- a/python/pylibraft/CMakeLists.txt +++ b/python/pylibraft/CMakeLists.txt @@ -12,7 +12,7 @@ # the License. # ============================================================================= -cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) include(../../rapids_config.cmake) diff --git a/python/pylibraft/pyproject.toml b/python/pylibraft/pyproject.toml index dc9a6e8d99..49b3cb0adc 100644 --- a/python/pylibraft/pyproject.toml +++ b/python/pylibraft/pyproject.toml @@ -118,7 +118,7 @@ regex = "(?P.*)" [tool.rapids-build-backend] build-backend = "scikit_build_core.build" requires = [ - "cmake>=3.26.4,!=3.30.0", + "cmake>=3.30.4", "cuda-python", "cython>=3.0.0,<3.1.0a0", "libraft==25.4.*,>=0.0.0a0", diff --git a/python/raft-dask/CMakeLists.txt b/python/raft-dask/CMakeLists.txt index 1fcb40a58d..3a4cc848f7 100644 --- a/python/raft-dask/CMakeLists.txt +++ b/python/raft-dask/CMakeLists.txt @@ -12,7 +12,7 @@ # the License. # ============================================================================= -cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) +cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR) include(../../rapids_config.cmake) include(rapids-cpm) diff --git a/python/raft-dask/pyproject.toml b/python/raft-dask/pyproject.toml index 49f9ba5252..82ebc6981c 100644 --- a/python/raft-dask/pyproject.toml +++ b/python/raft-dask/pyproject.toml @@ -118,7 +118,7 @@ regex = "(?P.*)" [tool.rapids-build-backend] build-backend = "scikit_build_core.build" requires = [ - "cmake>=3.26.4,!=3.30.0", + "cmake>=3.30.4", "cython>=3.0.0,<3.1.0a0", "libraft==25.4.*,>=0.0.0a0", "librmm==25.4.*,>=0.0.0a0", From cb6fe7c777fa586c0ad6e76fb2fdfd81953d2308 Mon Sep 17 00:00:00 2001 From: tsuki <12711693+enp1s0@users.noreply.github.com> Date: Wed, 26 Feb 2025 02:42:04 +0900 Subject: [PATCH 4/5] [BUG] Fix illegal memory access in linalg::reduction (#2592) Illegal memory access occurs when calling `mean` for a large matrix, specifically, when `extent(0) * extent(1)` exceeds INT_MAX. This PR fixes it. Although I think it is safer to use `uint64_t` or `size_t` than `IdxType` as the index type in the kernel, I follow the [coalescedReduction kernels](https://github.com/rapidsai/raft/blob/branch-25.04/cpp/include/raft/linalg/detail/coalesced_reduction-inl.cuh). Authors: - tsuki (https://github.com/enp1s0) Approvers: - Micka (https://github.com/lowener) - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/raft/pull/2592 --- .../raft/linalg/detail/strided_reduction.cuh | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cpp/include/raft/linalg/detail/strided_reduction.cuh b/cpp/include/raft/linalg/detail/strided_reduction.cuh index 567dc6220e..eba3c67d0d 100644 --- a/cpp/include/raft/linalg/detail/strided_reduction.cuh +++ b/cpp/include/raft/linalg/detail/strided_reduction.cuh @@ -35,19 +35,19 @@ namespace detail { // Note that the compensation will only be performed 'per-block' for performance // reasons and therefore not be equivalent to a sequential compensation. -template +template RAFT_KERNEL stridedSummationKernel( - Type* out, const Type* data, int D, int N, Type init, MainLambda main_op) + Type* out, const Type* data, IdxType D, IdxType N, Type init, MainLambda main_op) { // Thread reduction - Type thread_sum = Type(init); - Type thread_c = Type(0); - int colStart = blockIdx.x * blockDim.x + threadIdx.x; + Type thread_sum = Type(init); + Type thread_c = Type(0); + IdxType colStart = blockIdx.x * blockDim.x + threadIdx.x; if (colStart < D) { - int rowStart = blockIdx.y * blockDim.y + threadIdx.y; - int stride = blockDim.y * gridDim.y; - for (int j = rowStart; j < N; j += stride) { - int idx = colStart + j * D; + IdxType rowStart = blockIdx.y * blockDim.y + threadIdx.y; + IdxType stride = blockDim.y * gridDim.y; + for (IdxType j = rowStart; j < N; j += stride) { + auto idx = colStart + j * D; // KahanBabushkaNeumaierSum const Type cur_value = main_op(data[idx], j); @@ -97,8 +97,8 @@ template RAFT_KERNEL stridedReductionKernel(OutType* dots, const InType* data, - int D, - int N, + IdxType D, + IdxType N, OutType init, MainLambda main_op, ReduceLambda reduce_op) @@ -167,7 +167,7 @@ void stridedReduction(OutType* dots, raft::min((IdxType)MaxBlocksDimY, raft::ceildiv(N, (IdxType)MinRowsPerBlk))); const size_t shmemSize = sizeof(OutType) * Block.x * 2; - stridedSummationKernel + stridedSummationKernel <<>>(dots, data, D, N, init, main_op); } else { // Arbitrary numbers for now, probably need to tune From 0b244c435408df51eded79fc86e0cb9d90de35b2 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 25 Feb 2025 15:40:08 -0600 Subject: [PATCH 5/5] Use conda-build instead of conda-mambabuild (#2595) This changes from `conda mambabuild` to `conda build`. Conda now uses the mamba solver so no performance regressions are expected. This is a temporary change as we plan to migrate to `rattler-build` in the near future. However, this is needed sooner to drop `boa` and unblock Python 3.13 migrations. xref: https://github.com/rapidsai/build-planning/issues/149 Authors: - Bradley Dice (https://github.com/bdice) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/raft/pull/2595 --- ci/build_cpp.sh | 2 +- ci/build_python.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 06bd2901b2..80fd1c0000 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -17,7 +17,7 @@ rapids-logger "Begin cpp build" sccache --zero-stats -RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild \ +RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry build \ conda/recipes/libraft sccache --show-adv-stats diff --git a/ci/build_python.sh b/ci/build_python.sh index 131f99c212..76dfff1ee3 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -25,7 +25,7 @@ sccache --zero-stats # TODO: Remove `--no-test` flags once importing on a CPU # node works correctly -rapids-conda-retry mambabuild \ +rapids-conda-retry build \ --no-test \ --channel "${CPP_CHANNEL}" \ conda/recipes/pylibraft @@ -33,7 +33,7 @@ rapids-conda-retry mambabuild \ sccache --show-adv-stats sccache --zero-stats -rapids-conda-retry mambabuild \ +rapids-conda-retry build \ --no-test \ --channel "${CPP_CHANNEL}" \ --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \