Skip to content

Note for --no-build-isolation for CUDA version mismatch#1437

Open
mnabian wants to merge 3 commits intomainfrom
mnabian/no-isolation-build
Open

Note for --no-build-isolation for CUDA version mismatch#1437
mnabian wants to merge 3 commits intomainfrom
mnabian/no-isolation-build

Conversation

@mnabian
Copy link
Collaborator

@mnabian mnabian commented Feb 23, 2026

PhysicsNeMo Pull Request

Description

Checklist

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

@mnabian mnabian requested a review from ktangsali February 23, 2026 19:51
@mnabian mnabian self-assigned this Feb 23, 2026
@mnabian mnabian requested a review from peterdsharpe February 23, 2026 19:51
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 23, 2026

Greptile Summary

Added a documentation note to help users troubleshoot CUDA version mismatch errors when installing extras like gnns. The note recommends using the --no-build-isolation flag with uv sync, which is consistent with how the Dockerfile handles similar packages that require PyTorch at build time (e.g., natten, torch_sparse).

  • Clear and helpful troubleshooting guidance for a common installation issue
  • Includes specific error message example for easy identification
  • Provides concrete command example with the fix
  • Well-placed in the installation section after the extras installation instructions

Important Files Changed

Filename Overview
README.md Added helpful troubleshooting note about --no-build-isolation flag for CUDA version mismatch errors

Last reviewed commit: aaf6b47

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@mnabian
Copy link
Collaborator Author

mnabian commented Feb 23, 2026

/blossom-ci

@mnabian mnabian enabled auto-merge February 23, 2026 19:55
README.md Outdated
uv sync --extra cu12 --extra nn-extras
```

> **Note:** If you encounter a CUDA version mismatch (e.g., "The detected
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should refine the language here - --no-build-isolation should be the way to install these packages correctly. Without that, it can cause a version mismatch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about this?

Note: Extras such as gnns, nn-extras, and transformer-engine pull in packages that either ship only source distributions or require wheels built for a specific PyTorch and CUDA version. These should be installed with --no-build-isolation, e.g. uv sync --extra cu13 --extra gnns --no-build-isolation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this better, thanks!

@mnabian mnabian requested a review from coreyjadams February 23, 2026 20:09
@peterdsharpe
Copy link
Collaborator

Oh cool, awesome find!

I wonder - can we specify this in pyproject.toml so it happens automatically for users?

uv has support for new syntax using no-build-isolation-package, which instructs specific package(s) to not isolate when building.

@mnabian if you have a moment, would you be able to try adding this to pyproject.toml to see if it works?

[tool.uv]
no-build-isolation-package = ["torch_sparse", "torch_geometric"]

(Not sure which other GNN packages require no-build-isolation, but we should add those too)

If this works, then we might be able to make this "just work" with uv sync --extra cu13 --extra gnns. If it doesn't, then I agree that this docs-based approach is a perfectly fine alternative too!

@mnabian
Copy link
Collaborator Author

mnabian commented Feb 25, 2026

Oh cool, awesome find!

I wonder - can we specify this in pyproject.toml so it happens automatically for users?

uv has support for new syntax using no-build-isolation-package, which instructs specific package(s) to not isolate when building.

@mnabian if you have a moment, would you be able to try adding this to pyproject.toml to see if it works?

[tool.uv]
no-build-isolation-package = ["torch_sparse", "torch_geometric"]

(Not sure which other GNN packages require no-build-isolation, but we should add those too)

If this works, then we might be able to make this "just work" with uv sync --extra cu13 --extra gnns. If it doesn't, then I agree that this docs-based approach is a perfectly fine alternative too!

@peterdsharpe I tested this out and ran into some other issues. We might be able to get it working, but right before the release, I’d prefer not to make big changes to the build unless you want to give this a try.

@mnabian
Copy link
Collaborator Author

mnabian commented Feb 26, 2026

/blossom-ci

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants