Skip to content

switch from 'cuda-python' to specific components (e.g. 'cuda-bindings')#153

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
jameslamb:drop-cuda-python
Jul 6, 2026
Merged

switch from 'cuda-python' to specific components (e.g. 'cuda-bindings')#153
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
jameslamb:drop-cuda-python

Conversation

@jameslamb

@jameslamb jameslamb commented Jul 2, 2026

Copy link
Copy Markdown
Member

Description

Contributes to rapidsai/build-planning#285

cuda-python is a metapackage and sometimes pulls in components that RAPIDS libraries don't need. This PR is part of a series dropping direct use of cuda-python in favor of depending only on those specific components.

  • drops dependency on cuda-python
  • adds explicit dependencies on components:
    • cuda-bindings >=12.9.2,<13.0 (CUDA 12), cuda-bindings >=13.0.1,<14.0 (CUDA 13)
  • adds explicit testing of oldest cuda-bindings in CI

Notes for Reviewers

Why these specific bounds?

@jameslamb jameslamb added DO NOT MERGE Hold off on merging; see PR for details improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jul 2, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 2, 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.

@jameslamb

Copy link
Copy Markdown
Member Author

/ok to test

@jameslamb jameslamb removed the DO NOT MERGE Hold off on merging; see PR for details label Jul 6, 2026
@jameslamb jameslamb changed the title WIP: switch from 'cuda-python' to specific components (e.g. 'cuda-bindings') switch from 'cuda-python' to specific components (e.g. 'cuda-bindings') Jul 6, 2026
@jameslamb jameslamb marked this pull request as ready for review July 6, 2026 20:51
@jameslamb jameslamb requested a review from a team as a code owner July 6, 2026 20:51
@jameslamb jameslamb requested a review from gforsyth July 6, 2026 20:51
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Updated CUDA Python-related packaging to use the newer bindings package across supported environments and build configurations.
    • Kept CUDA toolkit components available while aligning version constraints for CUDA 12 and CUDA 13 setups.
    • Improved dependency selection in CI and project configuration so environment installs are more consistent across architectures.

Walkthrough

This PR replaces the cuda-python dependency with cuda-bindings across conda environment YAML files, the conda recipe for nvforest, dependencies.yaml matrices, and python/nvforest/pyproject.toml, updating version bounds accordingly for CUDA 12.9/13.0 targets.

Changes

cuda-python to cuda-bindings migration

Layer / File(s) Summary
Conda environment dependency updates
conda/environments/all_cuda-129_arch-aarch64.yaml, conda/environments/all_cuda-129_arch-x86_64.yaml, conda/environments/all_cuda-133_arch-aarch64.yaml, conda/environments/all_cuda-133_arch-x86_64.yaml
Replaces cuda-python entries with cuda-bindings at matching version bounds (12.9.2/13.0.1) alongside existing CUDA dev tooling packages.
Conda recipe requirements
conda/recipes/nvforest/recipe.yaml
Updates the cuda_major == "12" build and run requirement blocks from cuda-python to cuda-bindings >=12.9.2,<13.0.
Dependency matrix configuration
dependencies.yaml
Adds cuda-bindings entries to the test_python oldest matrix and replaces cuda-python bounds with cuda-bindings bounds in depends_on_cuda_python for CUDA 12.* and 13.* matrices.
Python package build dependencies
python/nvforest/pyproject.toml
Replaces cuda-python with cuda-bindings in both [project].dependencies and [tool.rapids-build-backend].requires.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: ci, CUDA/C++

Suggested reviewers: bdice, KyleFromNVIDIA

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change from cuda-python to explicit CUDA components.
Description check ✅ Passed The description matches the changeset and explains the dependency swap plus CI 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.
✨ 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 `@conda/environments/all_cuda-129_arch-aarch64.yaml`:
- Line 13: The CUDA version pin is too broad and can allow 13.0 prereleases in
conda solves. Update the CUDA constraint in the relevant repeated pin locations,
including the environment YAML, recipe, and dependencies YAML, to keep the upper
bound at 13.0a0 rather than 13.0; use the existing cuda-bindings pin as the
reference point for the exact version spec format.
🪄 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: 236b84e0-3714-45a7-95ee-2c5eb9547d2e

📥 Commits

Reviewing files that changed from the base of the PR and between 4e9e382 and b7a4568.

📒 Files selected for processing (7)
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-133_arch-aarch64.yaml
  • conda/environments/all_cuda-133_arch-x86_64.yaml
  • conda/recipes/nvforest/recipe.yaml
  • dependencies.yaml
  • python/nvforest/pyproject.toml

- ccache
- click
- cmake>=4.0
- cuda-bindings>=12.9.2,<13.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if cuda-bindings has published any prerelease/alpha conda builds
# for the CUDA 13 series that a bare "<13.0" bound could match.

Repository: rapidsai/nvforest

Length of output: 155


🏁 Script executed:

rg -n "cuda-bindings|cuda-python|<13\.0a0|<13\.0" conda recipe.yaml dependencies.yaml .

Repository: rapidsai/nvforest

Length of output: 2173


🏁 Script executed:

sed -n '396,452p' dependencies.yaml && printf '\n---\n' && sed -n '82,110p' conda/recipes/nvforest/recipe.yaml && printf '\n---\n' && sed -n '1,24p' conda/environments/all_cuda-129_arch-aarch64.yaml

Repository: rapidsai/nvforest

Length of output: 3304


🌐 Web query:

conda version specifier <13.0 prerelease 13.0.0a0 conda solver semantics

💡 Result:

In conda, the version specifier <13.0 does not include prerelease versions such as 13.0.0a0 because conda treats prerelease versions as strictly less than their corresponding release versions [1][2]. Consequently, a specifier like <13.0 matches versions up to, but not including, the first prerelease version that would otherwise be considered a "starting point" for the 13.0 release [1]. To specifically exclude all 13.0-series prereleases while still allowing 12.x versions, the specifier <13.0.0a0 is often used [1]. This ensures the constraint terminates precisely at the start of the 13.0 series, effectively excluding 13.0.0a0 and any subsequent 13.0 prereleases [1]. Regarding solver semantics: - Conda's default behavior is to allow prereleases when they are requested or available [3][4]. - There is a configurable prerelease_behavior setting (available in more recent conda versions) that can be set to allow, exclude, or limit prereleases [3]. The limit mode is designed to align with PEP 440, which generally excludes prereleases unless they are already present or are the only way to satisfy the specifier [3][4]. - Because conda's version comparison logic explicitly places prereleases (like 'a', 'b', 'rc') as smaller than the final release version (e.g., 13.0.0a0 < 13.0) [5][6][7], a simple <13.0 constraint is often interpreted by users as "everything below 13.0," but in practice, it may leave a gap if the solver interprets the boundary relative to the specific version ordering [1][2]. Using the trailing 'a0' suffix in the constraint explicitly defines the boundary at the very first prerelease of the target version [1].

Citations:


🌐 Web query:

site:docs.conda.io conda package specs prerelease <13.0 a0 version ordering

💡 Result:

In Conda's versioning system, pre-release versions—such as those denoted by letters like 'a' (alpha), 'b' (beta), or 'rc' (release candidate)—are consistently considered less than their corresponding release versions [1][2][3]. Regarding version ordering for specifications like <13.0a0, the following rules apply: 1. Canonical Ordering: Conda's version comparison algorithm (implemented by the VersionOrder class) parses version strings by splitting them into components (delimited by dots and underscores) [1][4][3]. These components are then parsed into runs of numerals and non-numerals [2][3]. 2. Alpha/Pre-release Handling: When a component begins with a letter (like 'a' in '13.0a0'), Conda implicitly inserts a fill-value of 0 to keep numerical and string components in phase [1][2][3]. Consequently, '13.0a0' is treated equivalently to '13.0.0a0' [1][3]. 3. Ordering Logic: Within the comparison logic: - Integers are compared numerically [2][3]. - Strings are compared lexicographically (case-insensitive) [1][2][3]. - Non-release (pre-release) strings are generally considered smaller than integers [2][3]. 4. Result of <13.0a0: Because Conda defines pre-release versions as less than release versions, a constraint of <13.0a0 will include earlier pre-release versions (e.g., 12.9a1, 13.0a0) but exclude the final 13.0 release, as 13.0 is greater than 13.0a0 [1][2]. For predictable results, it is recommended to maintain a consistent versioning scheme and ensure components are correctly aligned [1][2][3]. If you encounter compatibility issues with specific naming conventions (such as OpenSSL-style versions), appending an underscore (e.g., 1.0.1_) can sometimes force the intended evaluation [2][3].

Citations:


🌐 Web query:

conda prerelease specifier "<13.0" "<13.0a0" package specs default solver behavior

💡 Result:

In conda, version comparisons are governed by specific ordering rules where prerelease versions are considered less than their corresponding release versions [1][2]. When using the package specifiers "<13.0" and "<13.0a0", the solver behavior differs due to how these specifiers interact with prerelease versions [1][3]. Specifier "<13.0" This specifier excludes version 13.0 and any version greater than or equal to 13.0 [1]. Because conda considers prereleases (e.g., 13.0a1, 13.0b1) to be less than the release version 13.0, the specifier "<13.0" will match and allow prerelease versions of 13.0 (such as 13.0a1) [1][3]. Specifier "<13.0a0" This specifier is more restrictive. Since 13.0a0 is a prerelease version, "<13.0a0" excludes 13.0a0 and any versions greater than or equal to it, including the final 13.0 release and all other 13.0 prereleases (as they are generally ordered after 13.0a0) [1][3]. This effectively forces the solver to look for versions strictly lower than the 13.0 prerelease series. Solver Behavior and Configuration Conda's default solver behavior for prereleases is governed by the configuration setting prerelease_behavior [4]. - Default: The default behavior is to treat prereleases the same as release versions, meaning they are considered by the solver if they satisfy the version specifier [4]. - Other modes: Conda also supports exclude (which ignores prereleases entirely) and limit (which follows PEP 440 recommendations, allowing prereleases only if they are already in the environment or are the only way to satisfy the spec) [4][5]. Additionally, users can use prerelease_allowed_packages to prevent specific packages from being treated as prereleases, which is useful for packages with non-standard versioning schemes that might otherwise trigger incorrect prerelease handling [4].

Citations:


Keep the CUDA 12 upper bound at <13.0a0. <13.0 can admit 13.0* prereleases in conda solves, so dropping the a0 broadens the allowed range across the repeated pins in the env files, recipe, and dependencies YAML.

🤖 Prompt for 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.

In `@conda/environments/all_cuda-129_arch-aarch64.yaml` at line 13, The CUDA
version pin is too broad and can allow 13.0 prereleases in conda solves. Update
the CUDA constraint in the relevant repeated pin locations, including the
environment YAML, recipe, and dependencies YAML, to keep the upper bound at
13.0a0 rather than 13.0; use the existing cuda-bindings pin as the reference
point for the exact version spec format.

@jameslamb

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit 6676ef0 into rapidsai:main Jul 6, 2026
66 checks passed
@jameslamb jameslamb deleted the drop-cuda-python branch July 6, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conda Relates to conda packaging Cython / Python improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants