Skip to content

[UV] Fix CPU-only PyTorch in Windows wheel installations - #8429

Merged
StafaH merged 2 commits into
isaac-sim:developfrom
StafaH:fix/wheel-builder-cuda
Oct 9, 2026
Merged

StafaH merged 2 commits into
isaac-sim:developfrom
StafaH:fix/wheel-builder-cuda

Conversation

@StafaH

@StafaH StafaH commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Windows uvx --from ...#subdirectory=tools/wheel_builder installations can select CPU-only PyTorch because wheel metadata does not carry the source checkout's CUDA index selection. This causes simulation startup to fail with Torch not compiled with CUDA enabled even with a working NVIDIA driver.

Generate platform-marked, hash-pinned CUDA wheel requirements from uv.lock for torch and torchvision. This preserves CUDA selection for Windows and the supported Linux platforms without additional installer flags. Match the wheel's Python requirement to the source checkout and document the resulting installation behavior.

Add a regression test at the generated package metadata boundary and a changelog entry.

Type of change

  • Bug fix
  • Documentation update

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Validation

  • Wheel metadata tests: 10 passed under Python 3.12. The new CUDA regression fails against the pre-fix code for the intended CPU-resolution reason.
  • PEP 517 metadata generation verified six platform-marked CUDA requirements and Python version bounds.
  • Repository-wide formatting and lint hooks passed through the source CLI in an isolated uv environment; git diff --check passed.
  • Windows GPU execution was not run locally.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks through the source CLI
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria
  • I have added a changelog fragment for every touched package
  • My name already exists in CONTRIBUTORS.md

@StafaH
StafaH requested a review from a team October 9, 2026 16:29
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Oct 9, 2026

@isaaclab-review-bot isaaclab-review-bot Bot 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.

Isaac Lab Review Bot

Needs attention: Implementation (1), Style consistency (1). Other reviewed categories look good.

  • PR description: The body claims demo commands use versioned overrides, but the URL follows the documentation branch rather than the wheel source tag; correct the implementation or narrow that claim and validation.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: The demo overrides meta tag uses _branch() instead of isaaclab_wheel_source_tag, so published-wheel commands can consume incompatible pins; derive the URL from the wheel source tag.
  • Style consistency: The generator now requires sibling uv.lock, but its module docstring still presents the root pyproject as the sole source; document both inputs and the lock-regeneration requirement.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 2 inline findings.

Automated review; human maintainers own approval decisions.

Comment thread docs/_extensions/isaaclab_docs.py Outdated
) -> None:
"""Expose the versioned wheel resolver overrides to the demo command builder."""
overrides_url = (
f"https://raw.githubusercontent.com/isaac-sim/IsaacLab/{_branch(app.config)}/tools/wheel_builder/uv-overrides.txt"

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.

🟡 Warning · Implementation — Overrides meta uses branch not wheel tag

Both wheel-install directives build this same URL from isaaclab_wheel_source_tag, while this handler uses _branch(). Demo commands install the published wheel but would apply the docs branch's overrides, which can pin incompatible versions. Use the wheel…


# Index settings are not part of wheel metadata. Use the locked CUDA wheel URLs so
# uvx and pip cannot silently resolve CPU builds from PyPI (especially on Windows).
with Path(root_pyproject_path).with_name("uv.lock").open("rb") as f:

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.

🟡 Warning · Style Consistency — Module docstring omits new lockfile input

The script now also reads the sibling uv.lock and fails without it, but the module docstring still says output is generated from the root pyproject alone. Document both inputs and the lock-regeneration requirement.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[High impact] Wheel builder now embeds CUDA PyTorch URLs in package metadata.

The PR appears safe to merge, with non-blocking fixes recommended for matching demo dependencies and testing the CUDA URL install path.

Findings

  1. P2 Wheel and overrides differ ▶
  2. P2 CI bypasses CUDA wheel URLs ▶

Summary

The PR puts hash-pinned CUDA wheel URLs into aggregate wheel requirements and preserves the checkout’s Python bounds. It also adds Isaac Sim resolver flags to demo commands and checks CUDA support after the initial CI installation.

  • Demo commands mix a published wheel with checkout-specific overrides.
  • Installation CI bypasses the new URL requirements through its overrides.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Lock[uv.lock CUDA wheels] --> Generator[Generate platform-specific requirements]
    Generator --> Wheel[Aggregate wheel]
    Wheel --> Base[Install through CUDA wheel URLs]
    Wheel --> Overrides[Isaac Sim resolver overrides]
    Overrides --> Indexes[Resolve PyTorch using CUDA index]
    Indexes --> Check[CI checks CUDA version]
Loading

Reviews (1) · Last reviewed commit: "Fix CUDA wheel selection and Isaac Sim d..." · Reviewed by Greptile

Comment thread docs/_extensions/isaaclab_docs.py Outdated
Comment on lines +314 to +316
overrides_url = (
f"https://raw.githubusercontent.com/isaac-sim/IsaacLab/{_branch(app.config)}/tools/wheel_builder/uv-overrides.txt"
)

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.

P2 Wheel and overrides differ

The demo commands install a published isaaclab wheel but take overrides from the documentation branch. These already differ: the configured wheel tag uses newton[sim]==1.5.2 and MuJoCo 3.11, while the checkout overrides select a Git revision of Newton and MuJoCo 3.14. Copied commands therefore do not reproduce the documented wheel environment.

Use isaaclab_wheel_source_tag for the overrides and pin --from to isaaclab_wheel_version, so the wheel and its dependencies stay together.

import isaaclab_rl
import isaaclab_tasks

assert torch.version.cuda == '13.0'

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.

P2 CI bypasses CUDA wheel URLs

The new CUDA assertion does not test installation through the new wheel URLs. installed_wheel passes overrides for both base and isaacsim. Those overrides replace the torch and torchvision URLs with version requirements, so the added CUDA index can make the assertion pass even if installation through the generated URLs is broken.

Add a base-wheel install check without the PyTorch overrides or CUDA index. The separate metadata test checks the requirements, but does not install them.

@StafaH StafaH changed the title Fix CUDA wheel selection and Isaac Sim demo resolution [UV] Fix CUDA wheel selection and Isaac Sim demo resolution Oct 9, 2026
@StafaH StafaH changed the title [UV] Fix CUDA wheel selection and Isaac Sim demo resolution [UV] Fix CPU-only PyTorch in Windows wheel installations Oct 9, 2026
@StafaH

StafaH commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 9, 2026
@StafaH
StafaH merged commit 8a7a974 into isaac-sim:develop Oct 9, 2026
59 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as 21438b7.

isaaclab-bot Bot pushed a commit that referenced this pull request Oct 9, 2026
# Description

Windows `uvx --from ...#subdirectory=tools/wheel_builder` installations
can select CPU-only PyTorch because wheel metadata does not carry the
source checkout's CUDA index selection. This causes simulation startup
to fail with `Torch not compiled with CUDA enabled` even with a working
NVIDIA driver.

Generate platform-marked, hash-pinned CUDA wheel requirements from
`uv.lock` for torch and torchvision. This preserves CUDA selection for
Windows and the supported Linux platforms without additional installer
flags. Match the wheel's Python requirement to the source checkout and
document the resulting installation behavior.

Add a regression test at the generated package metadata boundary and a
changelog entry.

## Type of change

- Bug fix
- Documentation update

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Validation

- Wheel metadata tests: 10 passed under Python 3.12. The new CUDA
regression fails against the pre-fix code for the intended
CPU-resolution reason.
- PEP 517 metadata generation verified six platform-marked CUDA
requirements and Python version bounds.
- Repository-wide formatting and lint hooks passed through the source
CLI in an isolated uv environment; `git diff --check` passed.
- Windows GPU execution was not run locally.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks through the source CLI
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the test-audit criteria
- [x] I have added a changelog fragment for every touched package
- [x] My name already exists in CONTRIBUTORS.md

(cherry picked from commit 8a7a974)
@StafaH
StafaH deleted the fix/wheel-builder-cuda branch October 26, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants