Skip to content

Bump PyTorch to 2.12 - #7674

Open
ooctipus wants to merge 3 commits into
isaac-sim:developfrom
ooctipus:deps/pytorch-2.12
Open

Bump PyTorch to 2.12#7674
ooctipus wants to merge 3 commits into
isaac-sim:developfrom
ooctipus:deps/pytorch-2.12

Conversation

@ooctipus

@ooctipus ooctipus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Upgrade PyTorch to 2.12.0 and torchvision to 0.27.0. PyTorch 2.12 includes the upstream fix for CUDA lazy initialization when NVML reports more devices than the CUDA runtime exposes, avoiding the deferred device >= 0 && device < num_gpus assertion after Kit initializes graphics on a subset of GPUs.

PyTorch 2.12 is published for CUDA 13.0, so the supported x86_64 and Windows installs move from the cu128 index to cu130 as well. TorchAudio remains at 2.11.0 because it uses PyTorch stable ABI and officially supports PyTorch 2.11 and later.

Testing

  • uv lock --check
  • uv run isaaclab -f
  • LD_PRELOAD=/lib/aarch64-linux-gnu/libgomp.so.1 OMNI_KIT_ACCEPT_EULA=YES uv run pytest source/isaaclab/test/cli -q (283 passed)
  • Imported torch 2.12.0+cu130, torchvision 0.27.0+cu130, and torchaudio 2.11.0+cu130; exercised torchvision NMS and torchaudio resampling
  • Ran scripts/demos/arms.py --device=cuda:0 --visualizer kit through setup and repeated simulation resets on a 2-GPU ARM64 system where Kit exposes one GPU to the CUDA runtime
  • Ran the SKRL ANYmal-C training flow through environment setup and active PPO rollout

Supersedes the application-level initialization workaround in #7669.

@ooctipus

ooctipus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Sep 9, 2026
@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 Sep 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

The PyTorch 2.12 and torchvision 0.27 upgrade consistently moves supported platforms and installer paths to cu130, but the changelog fragment omits this user-visible CUDA index migration and its effect on existing cu128 environments.

  • Design and architecture: Dependency versions and cu130 routing are coordinated across pyproject configuration, uv overrides, the lockfile, installer logic, documentation, and tests. Consolidating _ensure_cuda_torch onto one CUDA tag matches the platform-wide index change.
  • API: The changed user-facing surface is installation behavior: Linux x86_64 and Windows now use cu130 rather than cu128. The changelog mentions only the library version bumps, contrary to the repository requirement to document changed behavior with migration guidance; it should state that existing cu128 installations will be replaced with CUDA 13 builds.
  • Implementation: The cu130 tag flows consistently through _ensure_cuda_torch into version detection, index selection, and reinstall behavior, with updated branch coverage for x86 and ARM. The required fix is limited to completing the changelog entry for the changed installer behavior.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

Changed
^^^^^^^

* Updated PyTorch to 2.12 and torchvision to 0.27. This includes PyTorch's fix for CUDA device

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.

🔵 Suggestion · Api — Changelog omits cu128 to cu130 index change

The fragment records only the torch/torchvision version bump, but this change also moves Linux x86_64 and Windows installs from the cu128 wheel index to cu130 ([tool.uv.sources], the removed pytorch-cu128 index, _ensure_cuda_torch, and the installation docs). Repository rules require migration guidance for changed behavior; existing cu128 environments will be uninstalled and reinstalled with CUDA 13 builds. Add a sentence describing the index change.

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

The PR is not yet safe to merge because the new shared versions make the existing x86 end-to-end installation commands request unavailable cu128 wheels.

Findings

  1. P1 Stale cu128 installation paths

Summary

  • Moves Linux x86_64 and Windows from cu128 to cu130.
  • Retains torchaudio 2.11.0 under its stable-ABI compatibility model.
  • Updates installer unit tests and wheel-building overrides.
  • Leaves an x86 end-to-end installation helper and Newton installation instructions on cu128, producing an unavailable version/index combination.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Pins["pyproject pins<br/>torch 2.12 / torchvision 0.27"] --> Main["Main install paths"]
  Main --> Lock["uv.lock cu130 wheels"]
  Main --> CLI["Install CLI cu130"]
  Main --> Docs["Primary docs cu130"]
  Pins --> E2E["x86 end-to-end helper"]
  E2E --> Stale["cu128 index"]
  Pins --> Newton["Newton installation guide"]
  Newton --> Stale
  Stale --> Failure["No matching 2.12 / 0.27 distributions"]
Loading

Comment thread pyproject.toml
Comment on lines +222 to +223
torch = "2.12.0"
torchvision = "0.27.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.

P1 Stale cu128 installation paths

The shared versions are now torch 2.12.0 and torchvision 0.27.0, but the x86 end-to-end installation helper still selects the cu128 index. The affected tests therefore request versions that are locked only from cu130 and fail before exercising the upgraded stack. The Newton installation guide produces the same unusable version/index combination. Update these remaining installation paths to cu130.

@ooctipus

ooctipus commented Sep 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 Sep 9, 2026
@ooctipus

ooctipus commented Sep 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 Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant