Skip to content

Update CuPy and NumPy dependency specs - #22962

Merged
rapids-bot[bot] merged 7 commits into
NVIDIA:mainfrom
bdice:cupy-pin
Jun 30, 2026
Merged

Update CuPy and NumPy dependency specs#22962
rapids-bot[bot] merged 7 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.

@github-actions github-actions Bot added Python Affects Python cuDF API. pylibcudf Issues specific to the pylibcudf package labels Jun 24, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jun 24, 2026
@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 gforsyth June 24, 2026 05:54
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updates CuPy and NumPy version constraints across dependency matrices, Python package manifests, conda recipes, and generated CUDA environment files. Some package and recipe headers also change to include “NVIDIA CORPORATION & AFFILIATES”.

Changes

CuPy 14 and NumPy 2 Dependency Bump

Layer / File(s) Summary
Canonical dependency constraints in dependencies.yaml
dependencies.yaml
numpy_run is raised to >=2.0,<3.0; depends_on_cupy raises the shared CuPy constraint to >=14.0.1,!=14.1.0 and switches CUDA wheel selectors to [ctk] variants; test matrices bump the oldest CuPy pin, update NumPy pins for Python tests, and adjust test_cudf_pandas_compat NumPy and CUDA version entries.
Python package dependency manifests
python/cudf/pyproject.toml, python/dask_cudf/pyproject.toml, python/cudf_streaming/pyproject.toml, python/pylibcudf/pyproject.toml
CuPy requirements are updated to the [ctk] selector where applicable and NumPy requirements are raised to >=2.0 while preserving upper bounds. SPDX copyright headers are updated in the files that show header changes.
Conda recipes and generated environment files
conda/recipes/cudf/recipe.yaml, conda/recipes/pylibcudf/recipe.yaml, conda/environments/all_cuda-129_arch-*.yaml, conda/environments/all_cuda-133_arch-*.yaml
CuPy and NumPy constraints are updated in the recipe runtime constraints and all four generated CUDA environment YAML files. Recipe copyright headers are updated to the newer NVIDIA text.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rapidsai/cudf#22702: Modifies the same CuPy version constraints, including the !=14.1.0 exclusion, in the same dependency files.
  • rapidsai/cudf#22189: Adjusts dependencies.yaml compatibility/test dependency pins in the same matrix area used here.

Suggested labels

conda, ci

Suggested reviewers

  • jameslamb
  • mroeschke
🚥 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 specs.
Description check ✅ Passed The description matches the changeset by describing the CuPy/NumPy requirement updates and [ctk] wheel dependency changes.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dependencies.yaml`:
- Around line 1060-1073: The test CuPy wheel pins in the dependency matrices
still use plain cupy-cuda12x and cupy-cuda13x, which is inconsistent with the
canonical depends_on_cupy entries that require the [ctk] selector. Update the
affected matrix package entries in dependencies.yaml to use the same [ctk]
contract as depends_on_cupy so test and production dependency resolution stay
aligned.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 526ee758-902a-45ff-baa5-e39c036693d7

📥 Commits

Reviewing files that changed from the base of the PR and between 20a16c7 and 26fb661.

📒 Files selected for processing (1)
  • dependencies.yaml

Comment thread dependencies.yaml
Comment thread dependencies.yaml

@mroeschke mroeschke left a comment

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.

(Reminding myself that are some CI/code cleanups available once this merged)

@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.

Changes look right to me, though there are what look like real failures in the oldest-deps jobs:

Attribute "dtype" are different
[left]:  int64
[right]: float64
FAILED tests/dataframe/test_np_ufuncs.py::test_ufunc_dataframe[ceil-False-False] - AssertionError: Attributes of DataFrame.iloc[:, 0] (column name="foo") are different

Attribute "dtype" are different
[left]:  int64
[right]: float64
FAILED tests/dataframe/test_np_ufuncs.py::test_ufunc_dataframe[floor-True-False] - AssertionError: Attributes of DataFrame.iloc[:, 0] (column name="foo") are different

(build link)

@gforsyth gforsyth removed their assignment Jun 30, 2026
@gforsyth

gforsyth commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Ok, so previously, oldest deps was pulling in numpy==1.26.4 and latest deps was pulling in numpy==2.4.6

It seems like numpy==2.0.* only fail a few tests because of dtype inconsistencies.

I don't think this is a new failure, so much as one that hasn't shown up yet because we haven't tested on 2.0.*.

What if we bump the lower bound of numpy to 2.1.*?

I can reproduce this locally if numpy=2.0.* is installed.

On other PRs without the dependency changes proposed here, the oldest deps job passes because it's on numpy 1.26: https://github.com/rapidsai/cudf/actions/runs/28449642641/job/84316150615

numpy 2.1.0 is when numpy dropped support for Python 3.9, but that should be fine, since we've already dropped 3.9

`cupy>=14` and `numpy>=2.1` have unified behavior around casting
integers and booleans to floats (they don't do it).
This leaves us with a condition where numpy>2,<2.1 where the two
libraries mismatch on their behavior.  These get xfailed.
@gforsyth
gforsyth requested a review from a team as a code owner June 30, 2026 17:37
@gforsyth
gforsyth requested review from galipremsagar and wence- June 30, 2026 17:37
Comment on lines +41 to +42
and parse(np.__version__) >= parse("2.0")
and parse(np.__version__) < parse("2.1"),

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.

Now that we are using cupy>=14, which has unified casting behavior with numpy>=2.1, we only need to xfail these tests when numpy>=2.0,<2.1

Comment on lines +20 to +21
and parse(np.__version__) >= parse("2.0")
and parse(np.__version__) < parse("2.1"),

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.

Now that we are using cupy>=14, which has unified casting behavior with numpy>=2.1, we only need to xfail these tests when numpy>=2.0,<2.1

@gforsyth

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 0f28e6d into NVIDIA:main Jun 30, 2026
138 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jun 30, 2026
rapids-bot Bot pushed a commit that referenced this pull request Jul 1, 2026
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 pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants