Skip to content

Update CuPy and NumPy dependency specs#3058

Open
bdice wants to merge 5 commits into
NVIDIA:mainfrom
bdice:cupy-pin
Open

Update CuPy and NumPy dependency specs#3058
bdice wants to merge 5 commits into
NVIDIA:mainfrom
bdice:cupy-pin

Conversation

@bdice

@bdice bdice commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Contributes to rapidsai/build-planning#279

RAPIDS is taking on requirements cupy>=14.0.1,!=14.1.0 and numpy>=2.0. Wheel dependencies on cupy-cuda12x and cupy-cuda13x now use the [ctk] extra.

See the linked issue for details.

@bdice bdice added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Jun 24, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@bdice bdice changed the title Update CuPy lower bound to 14.0.1 Update CuPy and NumPy lower bounds Jun 24, 2026
@bdice bdice changed the title Update CuPy and NumPy lower bounds Update CuPy and NumPy dependency specs Jun 24, 2026
@bdice bdice marked this pull request as ready for review June 24, 2026 05:54
@bdice bdice requested a review from a team as a code owner June 24, 2026 05:54
@bdice bdice requested a review from KyleFromNVIDIA June 24, 2026 05:54
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8f1fe369-cc35-44c6-97be-96232b1d9e9e

📥 Commits

Reviewing files that changed from the base of the PR and between 0337940 and beb60f2.

📒 Files selected for processing (1)
  • dependencies.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • dependencies.yaml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated CUDA-related package requirements across supported environments and packaging metadata.
    • Raised the minimum supported NumPy version to 2.0 (kept upper bound <3.0).
    • Updated CuPy compatibility to require newer 14.0.1+ builds while continuing to exclude 14.1.0 (and relaxing the previous exclusion of 14.0.0 where applicable).
    • Aligned these constraints across x86_64 and aarch64, including recipe and test extra requirements (with the CUDA selector variant).

Walkthrough

Raises the minimum CuPy version from >=13.6.0 to >=14.0.1 and the minimum NumPy version from >=1.23 to >=2.0, with matching constraint updates in shared dependency files, conda recipes, and generated conda environment files. The pyproject test extra also switches to cupy-cuda13x[ctk].

Changes

CuPy and NumPy Version Bump

Layer / File(s) Summary
Canonical dependency definitions
dependencies.yaml, python/pylibraft/pyproject.toml
depends_on_cupy updates CuPy selector pins to >=14.0.1 with !=14.1.0; run_pylibraft raises NumPy to >=2.0,<3.0; pyproject.toml raises NumPy to >=2.0,<3.0 and changes the test extra CuPy spec to cupy-cuda13x[ctk]>=14.0.1,!=14.1.0.
Conda recipe constraint updates
conda/recipes/pylibraft/recipe.yaml, conda/recipes/raft-dask/recipe.yaml
pylibraft raises the run NumPy requirement to >=2.0,<3.0 and updates cupy run_constraints to >=14.0.1,!=14.1.0; raft-dask updates its cupy run_constraints pin to >=14.0.1,!=14.1.0.
Conda environment file propagation
conda/environments/all_cuda-129_arch-*.yaml, conda/environments/all_cuda-133_arch-*.yaml
All four conda environment files update cupy to >=14.0.1,!=14.1.0 and numpy to >=2.0,<3.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating CuPy and NumPy dependency specifications.
Description check ✅ Passed The description matches the changeset by describing the CuPy, NumPy, and [ctk] dependency updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Comment thread dependencies.yaml
Comment on lines +380 to 385
- cupy-cuda12x[ctk]>=14.0.1,!=14.1.0
# fallback to CUDA 13 versions if 'cuda' is '13.*' or not provided
- matrix:
packages:
- cupy-cuda13x>=13.6.0,!=14.0.0,!=14.1.0
- cupy-cuda13x[ctk]>=14.0.1,!=14.1.0
depends_on_rapids_logger:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The depends_on_cupy block is also used to define test_python -- and the requirements generated by dependency-file-generator get piped into $PIP_CONSTRAINTS in test_wheel_pylibraft.sh (and others).

But you can't use extras in the $PIP_CONSTRAINTS -- maybe we break it out into depends_on_cupy and depends_on_cupy_test and then explicitly list the ctk packages there?

@jameslamb jameslamb Jun 26, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the resolution pushed in recent commits, where the [ctk] extra is only present in output_type: pyproject lists.

Comment thread dependencies.yaml
cuda: "12.*"
packages:
- cupy-cuda12x>=13.6.0,!=14.0.0,!=14.1.0
- cupy-cuda12x[ctk]>=14.0.1,!=14.1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to complicate this, but I think this needs the use_cuda_wheels: true qualifier, like this:

raft/dependencies.yaml

Lines 271 to 283 in c1babf1

# if use_cuda_wheels=false is provided, do not add dependencies on any CUDA wheels
# (e.g. for DLFW and pip devcontainers)
- matrix:
use_cuda_wheels: "false"
packages:
- matrix:
arch: aarch64
cuda: "12.2"
use_cuda_wheels: "true"
packages:
# some components (like nvidia-cublas-cu12 and nvidia-cuda-nvcc-cu12) didn't have
# aarch64 wheels until CTK 12.3, so allow a slightly looser bound here
- cuda-toolkit>=12.2,<12.4

Otherwise, this will pull in cuda-toolkit[...]:

https://github.com/cupy/cupy/blob/9d193b65ea0a393b579cb50d5db8dbf23a667ab1/setup.py#L85-L87

And we'll end up having to patch it in builds like DLFW where we prefer a system-installed CTK.

This applies to all of the PRs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates across all the repos to address this, I'm happy with the new state of these PRs: rapidsai/build-planning#279 (comment)

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one tiny suggestion

Comment thread dependencies.yaml Outdated
Comment on lines +377 to +396
- matrix:
cuda: "12.*"
packages:
- cupy-cuda12x>=14.0.1,!=14.1.0
# fallback to CUDA 13 versions if 'cuda' is '13.*' or not provided
- matrix:
packages:
- cupy-cuda13x>=14.0.1,!=14.1.0
- output_types: pyproject
matrices:
- matrix:
cuda: "12.*"
use_cuda_wheels: "false"
packages:
- cupy-cuda12x>=14.0.1,!=14.1.0
- matrix:
cuda: "13.*"
use_cuda_wheels: "false"
packages:
- cupy-cuda13x>=14.0.1,!=14.1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- matrix:
cuda: "12.*"
packages:
- cupy-cuda12x>=14.0.1,!=14.1.0
# fallback to CUDA 13 versions if 'cuda' is '13.*' or not provided
- matrix:
packages:
- cupy-cuda13x>=14.0.1,!=14.1.0
- output_types: pyproject
matrices:
- matrix:
cuda: "12.*"
use_cuda_wheels: "false"
packages:
- cupy-cuda12x>=14.0.1,!=14.1.0
- matrix:
cuda: "13.*"
use_cuda_wheels: "false"
packages:
- cupy-cuda13x>=14.0.1,!=14.1.0
- matrix:
cuda: "12.*"
packages:
- &cupy_cu12 cupy-cuda12x>=14.0.1,!=14.1.0
# fallback to CUDA 13 versions if 'cuda' is '13.*' or not provided
- matrix:
packages:
- &cupy_cu13 cupy-cuda13x>=14.0.1,!=14.1.0
- output_types: pyproject
matrices:
- matrix:
cuda: "12.*"
use_cuda_wheels: "false"
packages:
- *cupy_cu12
- matrix:
cuda: "13.*"
use_cuda_wheels: "false"
packages:
- *cupy_cu13

Minor comment... realizing that in many of these PRs, the spelling of this dependency is indentical in both of these cases:

  • requirements
  • pyproject.toml + use_cuda_wheels: "false"

Using YAML anchors could help keep them consistent (I think we always want them to be?) and reduce duplication.

Comment thread dependencies.yaml
cuda: "12.*"
packages:
- cupy-cuda12x>=13.6.0,!=14.0.0,!=14.1.0
- cupy-cuda12x[ctk]>=14.0.1,!=14.1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates across all the repos to address this, I'm happy with the new state of these PRs: rapidsai/build-planning#279 (comment)

@bdice bdice requested a review from a team as a code owner June 26, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants