Skip to content

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

Merged
rparolin merged 1 commit into
NVIDIA:mainfrom
rparolin:rparolin/tool-uv-conflicts-fixes
Mar 24, 2026
Merged

Declare uv conflicts for mutually exclusive CUDA version extras/groups#1802
rparolin merged 1 commit into
NVIDIA:mainfrom
rparolin:rparolin/tool-uv-conflicts-fixes

Conversation

@rparolin

@rparolinrparolin commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor

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.

@rparolinrparolin changed the title using uv.tools.conflictsDeclare uv conflicts for mutually exclusive CUDA version extras/groupsMar 20, 2026
@rparolin
rparolin marked this pull request as ready for review March 20, 2026 22:42
@rparolinrparolin self-assigned this Mar 20, 2026
@rparolinrparolin 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 cpcloudMarch 20, 2026 22:43

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

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.

FileDescription
cuda_pathfinder/pyproject.tomlDeclares uv conflicts between cu12/cu13 and test-cu12/test-cu13 dependency groups.
cuda_core/pyproject.tomlDeclares 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" },

CopilotAIMar 20, 2026

Copy link

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
Copy Markdown

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

LGTM

@rparolin
rparolin merged commit 992856b into NVIDIA:mainMar 24, 2026
177 of 179 checks passed
github-actionsBot pushed a commit that referenced this pull request Mar 25, 2026
Removed preview folders for the following PRs:
- PR #1801
- PR #1802
- PR #1803
@leofangleofang added this to the cuda.core v0.7.0 milestone Apr 7, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindingsEverything related to the cuda.bindings modulecuda.coreEverything related to the cuda.core modulecuda.pathfinderEverything related to the cuda.pathfinder module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update pyproject.toml for uv

4 participants

@rparolin@mdboom@leofang