Skip to content

python3Packages.triton: 3.6.0 -> 3.7.0; python3Packages.torch: 2.11.0 -> 2.12.0 - #519925

Merged
NickCao merged 12 commits into
NixOS:masterfrom
GaetanLepage:update/python3Packages.torch
Jun 3, 2026
Merged

NickCao merged 12 commits into
NixOS:masterfrom
GaetanLepage:update/python3Packages.torch

Conversation

@GaetanLepage

@GaetanLepage GaetanLepage commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Things done

Update the torch ecosystem:

  • python3Packages.triton: 3.6.0 -> 3.7.0 (Changelog, Diff)
  • python3Packages.triton: hardcode CC for runtime JIT compilation
  • python3Packages.triton: better stdenv selection
  • rocmPackages.rocprofiler-sdk: fix segfault when importing torch
  • python3Packages.torch: 2.11.0 -> 2.12.0 (Changelog, Diff)
  • python3Packages.torch: remove runtime requirement on ninja
  • python3Packages.bitsandbytes: add missing ninja build-system
  • python3Packages.torch: do not propagate compiler up
  • python3Packages.torch: gate CUDAToolkit_VERSION cmake flag on cudaSupport
  • python3Packages.torchcodec: 0.11.1 -> 0.14.0 (Changelog, Diff)
  • python3Packages.torchvision: 0.26.0 -> 0.27.0 (Changelog, Diff)
  • python3Packages.executorch: 1.2.0 -> 1.3.1 (Changelog, Diff)
  • python3Packages.torchdata: skip failing test

cc @teh @thoughtpolice @tscholak @junjihashimoto @ericsagnes
cc @NixOS/cuda-maintainers

Previous update: #502810


  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-branch-check nixpkgs-branch-check Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR's base branch is set to master, and this PR causes 608 rebuilds.
Please consider whether this PR causes a mass rebuild according to our conventions.
If it does cause a mass rebuild, please change the base branch to the right base branch for your changes (probably staging).
If it does not cause a mass rebuild, this message can be ignored.

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 6.topic: python Python is a high-level, general-purpose programming language. labels May 13, 2026
@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch from cfcf28f to 6c1c2c7 Compare May 13, 2026 22:13
@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch from 6c1c2c7 to a61ede3 Compare May 17, 2026 09:44
@nixpkgs-ci nixpkgs-ci Bot removed the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label May 17, 2026
@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch 2 times, most recently from 5bd55b8 to 7797889 Compare May 17, 2026 20:00
@GaetanLepage
GaetanLepage marked this pull request as ready for review May 17, 2026 20:07
@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch 3 times, most recently from 813db27 to 8f620da Compare May 18, 2026 13:58
@nixpkgs-ci
nixpkgs-ci Bot requested review from 06kellyjac and bcdarwin May 18, 2026 14:04
@GaetanLepage

Copy link
Copy Markdown
Contributor Author

@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch from 8f620da to 923daa2 Compare May 20, 2026 12:00
@LunNova

LunNova commented Jun 2, 2026

Copy link
Copy Markdown
Member

Great, torch is now building with ROCm support. torchcodec is failing though

diff --git a/pkgs/development/python-modules/torchcodec/default.nix b/pkgs/development/python-modules/torchcodec/default.nix
index a4bf4e41daac..374cf0bbf30a 100644
--- a/pkgs/development/python-modules/torchcodec/default.nix
+++ b/pkgs/development/python-modules/torchcodec/default.nix
@@ -61,6 +61,9 @@ buildPythonPackage.override { inherit (torch) stdenv; } (finalAttrs: {
   ]
   ++ lib.optionals cudaSupport [
     cudaPackages.cuda_nvcc
+  ]
+  ++ lib.optionals rocmSupport [
+    torch.rocmPackages.clr
   ];
 
   buildInputs = [
@@ -111,7 +114,11 @@ buildPythonPackage.override { inherit (torch) stdenv; } (finalAttrs: {
   ];
 
   disabledTests =
-    lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
+    lib.optionals rocmSupport [
+      # HSA runtime logs topology error in sandbox breaking test that asserts no output
+      "test_python_logger"
+    ]
+    ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
       # AssertionError: index 0
       "test_get_frames_played_at"
 

GaetanLepage and others added 8 commits June 3, 2026 07:34
Triton JIT-compiles cuda_utils.c at runtime using whatever `cc`/`gcc`
is on PATH. In environments without a compiler in PATH (e.g. deployed
Nix environments), this fails with linker errors (cannot find crti.o,
-lc, -lgcc_s).

Hardcode the Nix cc-wrapper path as the default fallback for the CC
lookup in build.py, matching the pattern already used in the test's
axpy-cuda derivation.

Assisted-by: Claude Code (claude-opus-4-6)

Originally submitted at NixOS#526003
…port

Fix a cache miss when `cudaSupport = false` but
`cudaPackages.cudaMajorMinorVersion` is not the default (as could be the
case with an overlay like `cudaPackages = cudaPackages_13_1;`)
@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch from fbc1761 to f08d615 Compare June 3, 2026 07:34
@GaetanLepage

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 519925 --extra-nixpkgs-config '{ allowRocm = true; }' --package python313Packages.torchaudio --package python314Packages.torchcodec --package python313Packages.torchvision --package python314Packages.torch --package python314Packages.torchvision --package python3Packages.torchcodec --package python314Packages.torchaudio --package python313Packages.torch
Commit: f08d615539733638f1628bda4aaaf7c4b31d3912


x86_64-linux

✅ 8 packages built:
  • python313Packages.torch
  • python313Packages.torchaudio
  • python313Packages.torchvision
  • python314Packages.torch
  • python314Packages.torchaudio
  • python314Packages.torchcodec
  • python314Packages.torchvision
  • python3Packages.torchcodec

@GaetanLepage

Copy link
Copy Markdown
Contributor Author

Thanks a lot @LunNova !
I think that we're now good to merge.

cc @NickCao @ConnorBaker for TheFinalStamp ™️

@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch 2 times, most recently from 92807b3 to 8f2a5ed Compare June 3, 2026 13:17
@GaetanLepage
GaetanLepage force-pushed the update/python3Packages.torch branch from 8f2a5ed to 676ea58 Compare June 3, 2026 22:55
@GaetanLepage
GaetanLepage dismissed nixpkgs-branch-check[bot]’s stale review June 3, 2026 23:30

AI doesn't wait for staging-next.

@NickCao
NickCao added this pull request to the merge queue Jun 3, 2026
Merged via the queue into NixOS:master with commit dda0131 Jun 3, 2026
26 checks passed
@GaetanLepage
GaetanLepage deleted the update/python3Packages.torch branch June 3, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants