Skip to content

Declare uv conflicts for mutually exclusive CUDA version extras/groups#1802

Open
rparolin wants to merge 1 commit intoNVIDIA:mainfrom
rparolin:rparolin/tool-uv-conflicts-fixes
Open

Declare uv conflicts for mutually exclusive CUDA version extras/groups#1802
rparolin wants to merge 1 commit intoNVIDIA:mainfrom
rparolin:rparolin/tool-uv-conflicts-fixes

Conversation

@rparolin
Copy link
Collaborator

@rparolin rparolin commented Mar 20, 2026

Summary

  • Adds [tool.uv] conflicts to cuda_core/pyproject.toml and cuda_pathfinder/pyproject.toml so uv knows that cu12/cu13 extras and dependency groups are mutually exclusive alternatives, not co-installable
  • Without this, uv sync and uv lock fail with unsatisfiable dependency errors because uv tries to resolve all extras simultaneously
  • The [tool.uv] section is only read by uv — pip, setuptools, and pixi ignore it, so existing workflows are unaffected

Closes #1247

Test plan

  • Both pyproject.toml files validated with tomllib.load()
  • uv lock succeeds on cuda_pathfinder (63 packages resolved)
  • uv lock succeeds on cuda_core with CUDA_HOME set (41 packages resolved)
  • Reproduced the exact error from the issue (nccl4py-style downstream package) without the fix, confirmed it resolves with the fix

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Mar 20, 2026

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.

@rparolin rparolin changed the title using uv.tools.conflicts Declare uv conflicts for mutually exclusive CUDA version extras/groups Mar 20, 2026
@rparolin rparolin marked this pull request as ready for review March 20, 2026 22:42
@rparolin rparolin self-assigned this Mar 20, 2026
@rparolin rparolin added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Mar 20, 2026
@rparolin rparolin requested review from Copilot and cpcloud March 20, 2026 22:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds uv conflict metadata so CUDA 12 vs CUDA 13 dependency selections are treated as mutually exclusive, preventing uv lock/sync from attempting to co-resolve incompatible alternatives.

Changes:

  • Add [tool.uv].conflicts for mutually exclusive CUDA 12/13 dependency groups in cuda_pathfinder.
  • Add [tool.uv].conflicts for mutually exclusive CUDA 12/13 extras and test dependency groups in cuda_core.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cuda_pathfinder/pyproject.toml Declares uv conflicts between cu12/cu13 and test-cu12/test-cu13 dependency groups.
cuda_core/pyproject.toml Declares uv conflicts between cu12/cu13 extras and CUDA-versioned test dependency groups.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

],
[
{ group = "test-cu12" },
{ group = "test-cu13" },
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The conflicts list groups test-cu12, test-cu13, test-cu12-ft, and test-cu13-ft into a single mutually-exclusive set. This would prevent installing both test-cu12 and test-cu12-ft together (same CUDA major), even though they appear to be complementary (CupPy vs free-threaded variant). Consider splitting this into two conflict entries (test-cu12 vs test-cu13, and test-cu12-ft vs test-cu13-ft) so only cross-CUDA combinations are disallowed.

Suggested change
{ group = "test-cu13" },
{ group = "test-cu13" },
],
[

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update pyproject.toml for uv

2 participants