Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5397e04
python3Packages.torch-bin: add 2.12 versions/hashes
danieldk Apr 23, 2026
b52ed4b
python3Packages.huggingface-hub: 1.10.0 -> 1.11.0
danieldk Apr 23, 2026
afb7f1c
python3Packages.triton: init
danieldk Apr 23, 2026
ef6dc83
python3Packages.triton-xpu: add 3.7.1
danieldk Apr 23, 2026
24ab053
python3Packages.torch-bin: pass through new triton packages
danieldk Apr 23, 2026
5d5c741
rocmPackages: all the hashes are changed again
danieldk Apr 23, 2026
d58b244
rocmPackages.rocprofiler-sdk: add dependencies
danieldk Apr 24, 2026
5e158d7
Update nixpkgs to latest unstable-small
danieldk Apr 24, 2026
b145f81
python3Packages.torch-bin_2_12: init at 2.12.0-rc2
danieldk Apr 24, 2026
442cb2c
python3Packages.torch-bin_2_9: fix torch-cuda passhtrough
danieldk Apr 24, 2026
cf52f70
python3Packages.torch-bin_2_12: 2.12.0-rc2 -> 2.12.0-rc3
danieldk Apr 24, 2026
8f2e96b
python3Packages.triton_3_5_0: init at 3.5.0
danieldk Apr 24, 2026
7719b74
Add Torch 2.12 arch list
danieldk Apr 27, 2026
e2e1078
python3Packages.torch-bin_2_12: rc3 -> rc7
danieldk May 1, 2026
412b197
python3Packages.triton: fix aarch64-linux
danieldk May 2, 2026
396c190
Update variants
danieldk May 3, 2026
0f2fc38
generate_torch_versions: parallelize fetching + hashing
danieldk May 5, 2026
910e775
python3Packages.torch-bin_2_12: rc7 -> rc9
danieldk May 5, 2026
a0c4895
nix-builder: ROCm builds require rocshmem now
danieldk May 5, 2026
689d22f
rocmPackages.rocm-smi-lib: fix CMake include paths
danieldk May 5, 2026
838906d
hooks: use final package set
danieldk May 5, 2026
d2a72d5
Remove stale HIP conditional
danieldk May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/source/builder/build-variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ available. This list will be updated as new PyTorch versions are released.

- `torch210-cpu-aarch64-darwin`
- `torch211-cpu-aarch64-darwin`
- `torch212-cpu-aarch64-darwin`

## Metal aarch64-darwin

- `torch210-metal-aarch64-darwin`
- `torch211-metal-aarch64-darwin`
- `torch212-metal-aarch64-darwin`

## CPU aarch64-linux

- `torch210-cxx11-cpu-aarch64-linux`
- `torch211-cxx11-cpu-aarch64-linux`
- `torch212-cxx11-cpu-aarch64-linux`

## CUDA aarch64-linux

Expand All @@ -28,11 +31,15 @@ available. This list will be updated as new PyTorch versions are released.
- `torch211-cxx11-cu126-aarch64-linux`
- `torch211-cxx11-cu128-aarch64-linux`
- `torch211-cxx11-cu130-aarch64-linux`
- `torch212-cxx11-cu126-aarch64-linux`
- `torch212-cxx11-cu130-aarch64-linux`
- `torch212-cxx11-cu132-aarch64-linux`

## CPU x86_64-linux

- `torch210-cxx11-cpu-x86_64-linux`
- `torch211-cxx11-cpu-x86_64-linux`
- `torch212-cxx11-cpu-x86_64-linux`

## CUDA x86_64-linux

Expand All @@ -42,18 +49,24 @@ available. This list will be updated as new PyTorch versions are released.
- `torch211-cxx11-cu126-x86_64-linux`
- `torch211-cxx11-cu128-x86_64-linux`
- `torch211-cxx11-cu130-x86_64-linux`
- `torch212-cxx11-cu126-x86_64-linux`
- `torch212-cxx11-cu130-x86_64-linux`
- `torch212-cxx11-cu132-x86_64-linux`

## ROCm x86_64-linux

- `torch210-cxx11-rocm70-x86_64-linux`
- `torch210-cxx11-rocm71-x86_64-linux`
- `torch211-cxx11-rocm71-x86_64-linux`
- `torch211-cxx11-rocm72-x86_64-linux`
- `torch212-cxx11-rocm71-x86_64-linux`
- `torch212-cxx11-rocm72-x86_64-linux`

## XPU x86_64-linux

- `torch210-cxx11-xpu20253-x86_64-linux`
- `torch211-cxx11-xpu20253-x86_64-linux`
- `torch212-cxx11-xpu20253-x86_64-linux`

## Python-only kernels

Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions kernel-builder/src/pyproject/templates/kernel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ function(cuda_kernel_component SRC_VAR)
set(${SRC_VAR} ${_TMP_SRC} PARENT_SCOPE)

elseif(GPU_LANG STREQUAL "HIP")
if(NOT KERNEL_SUPPORTS_HIPIFY)
message(WARNING "Kernel does not support HIP")
return()
endif()

# Apply HIP-specific compile flags
if(KERNEL_HIP_FLAGS)
foreach(_SRC ${_KERNEL_SRC})
Expand Down
29 changes: 21 additions & 8 deletions nix-builder/build-variants.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,62 @@
"aarch64-darwin": {
"cpu": [
"torch210-cpu-aarch64-darwin",
"torch211-cpu-aarch64-darwin"
"torch211-cpu-aarch64-darwin",
"torch212-cpu-aarch64-darwin"
],
"metal": [
"torch210-metal-aarch64-darwin",
"torch211-metal-aarch64-darwin"
"torch211-metal-aarch64-darwin",
"torch212-metal-aarch64-darwin"
]
},
"aarch64-linux": {
"cpu": [
"torch210-cxx11-cpu-aarch64-linux",
"torch211-cxx11-cpu-aarch64-linux"
"torch211-cxx11-cpu-aarch64-linux",
"torch212-cxx11-cpu-aarch64-linux"
],
"cuda": [
"torch210-cxx11-cu126-aarch64-linux",
"torch210-cxx11-cu128-aarch64-linux",
"torch210-cxx11-cu130-aarch64-linux",
"torch211-cxx11-cu126-aarch64-linux",
"torch211-cxx11-cu128-aarch64-linux",
"torch211-cxx11-cu130-aarch64-linux"
"torch211-cxx11-cu130-aarch64-linux",
"torch212-cxx11-cu126-aarch64-linux",
"torch212-cxx11-cu130-aarch64-linux",
"torch212-cxx11-cu132-aarch64-linux"
]
},
"x86_64-linux": {
"cpu": [
"torch210-cxx11-cpu-x86_64-linux",
"torch211-cxx11-cpu-x86_64-linux"
"torch211-cxx11-cpu-x86_64-linux",
"torch212-cxx11-cpu-x86_64-linux"
],
"cuda": [
"torch210-cxx11-cu126-x86_64-linux",
"torch210-cxx11-cu128-x86_64-linux",
"torch210-cxx11-cu130-x86_64-linux",
"torch211-cxx11-cu126-x86_64-linux",
"torch211-cxx11-cu128-x86_64-linux",
"torch211-cxx11-cu130-x86_64-linux"
"torch211-cxx11-cu130-x86_64-linux",
"torch212-cxx11-cu126-x86_64-linux",
"torch212-cxx11-cu130-x86_64-linux",
"torch212-cxx11-cu132-x86_64-linux"
],
"rocm": [
"torch210-cxx11-rocm70-x86_64-linux",
"torch210-cxx11-rocm71-x86_64-linux",
"torch211-cxx11-rocm71-x86_64-linux",
"torch211-cxx11-rocm72-x86_64-linux"
"torch211-cxx11-rocm72-x86_64-linux",
"torch212-cxx11-rocm71-x86_64-linux",
"torch212-cxx11-rocm72-x86_64-linux"
],
"xpu": [
"torch210-cxx11-xpu20253-x86_64-linux",
"torch211-cxx11-xpu20253-x86_64-linux"
"torch211-cxx11-xpu20253-x86_64-linux",
"torch212-cxx11-xpu20253-x86_64-linux"
]
}
}
1 change: 1 addition & 0 deletions nix-builder/lib/extension/torch/arch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ stdenv.mkDerivation (prevAttrs: {
hipsparselt
rocprim-devel
rocthrust-devel
rocshmem-devel
rocwmma-devel
]
)
Expand Down
36 changes: 23 additions & 13 deletions nix-builder/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ in
blas = if useMKL then prev.blas.override { blasProvider = prev.mkl; } else prev.blas;
lapack = if useMKL then prev.lapack.override { lapackProvider = prev.mkl; } else prev.lapack;

kernel-builder = prev.callPackage ./pkgs/kernel-builder { };
kernel-builder = final.callPackage ./pkgs/kernel-builder { };

cmakeNvccThreadsHook = prev.callPackage ./pkgs/cmake-nvcc-threads-hook { };
cmakeNvccThreadsHook = final.callPackage ./pkgs/cmake-nvcc-threads-hook { };

get-kernel-check = prev.callPackage ./pkgs/get-kernel-check { };
get-kernel-check = final.callPackage ./pkgs/get-kernel-check { };

kernel-abi-check = prev.callPackage ./pkgs/kernel-abi-check { };
kernel-abi-check = final.callPackage ./pkgs/kernel-abi-check { };

kernel-layout-check = prev.callPackage ./pkgs/kernel-layout-check { };
kernel-layout-check = final.callPackage ./pkgs/kernel-layout-check { };

nvtx = final.callPackage ./pkgs/nvtx { };

metal-cpp = final.callPackage ./pkgs/metal-cpp { };

rewrite-nix-paths-macho = prev.callPackage ./pkgs/rewrite-nix-paths-macho { };
rewrite-nix-paths-macho = final.callPackage ./pkgs/rewrite-nix-paths-macho { };

remove-bytecode-hook = prev.callPackage ./pkgs/remove-bytecode-hook { };
remove-bytecode-hook = final.callPackage ./pkgs/remove-bytecode-hook { };

ruff = prev.ruff.overrideAttrs (
finalAttrs: prevAttrs: {
Expand Down Expand Up @@ -72,9 +72,13 @@ in
python-self: python-super:
with python-self;
let
triton = callPackage ./pkgs/python-modules/triton { };
triton-xpu = callPackage ./pkgs/python-modules/triton-xpu { };
in
{
inherit (triton) triton_3_5_0 triton_3_6_0 triton_3_7_0;
inherit (triton-xpu) triton-xpu_3_6_0 triton-xpu_3_7_0 triton-xpu_3_7_1;

cuda-bindings = python-self.callPackage ./pkgs/python-modules/cuda-bindings { };

cuda-pathfinder = python-self.callPackage ./pkgs/python-modules/cuda-pathfinder { };
Expand All @@ -89,11 +93,11 @@ in
python-self.callPackage ./pkgs/python-modules/cuda-python { };

huggingface-hub = python-super.huggingface-hub.overridePythonAttrs (prevAttrs: rec {
version = "1.10.0";
version = "1.11.0";
src = python-super.fetchPypi {
pname = "huggingface_hub";
inherit version;
hash = "sha256-+APDquLcmFFaQ0GgzjELTmuWrFV7tLX7Sne89SUCbVs=";
hash = "sha256-Ffs3E8f5zf97gIqU/ZFmT2YasUJ5a7SMnNlJPo0WYng=";
};
dependencies =
(prevAttrs.dependencies or [ ])
Expand Down Expand Up @@ -175,23 +179,33 @@ in
# Remove once sglang moves to a newer Torch version.
torch-bin_2_9 = mkTorch {
version = "2.9";
triton-cuda = triton_3_5_0;
triton-xpu = null;
# Not supported anymore.
xpuPackages = null;
};

torch-bin_2_10 = mkTorch {
version = "2.10";
triton-cuda = triton_3_6_0;
triton-xpu = triton-xpu_3_6_0;
xpuPackages = final.xpuPackages_2025_3_1;
};

torch-bin_2_11 = mkTorch {
version = "2.11";
triton-cuda = triton_3_6_0;
triton-xpu = triton-xpu_3_7_0;
xpuPackages = final.xpuPackages_2025_3_2;
};

torch-bin_2_12 = mkTorch {
version = "2.12";
triton-cuda = triton_3_7_0;
triton-xpu = triton-xpu_3_7_1;
xpuPackages = final.xpuPackages_2025_3_2;
};

transformers = python-super.transformers.overridePythonAttrs (prevAttrs: rec {
version = "5.3.0";
src = python-super.fetchPypi {
Expand All @@ -205,10 +219,6 @@ in
];
});

triton-xpu_3_6_0 = triton-xpu.triton-xpu_3_6_0;

triton-xpu_3_7_0 = triton-xpu.triton-xpu_3_7_0;

tvm-ffi = callPackage ./pkgs/python-modules/tvm-ffi {
};
}
Expand Down
2 changes: 1 addition & 1 deletion nix-builder/pkgs/kernel-layout-check/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ makeSetupHook, python3 }:
{ makeSetupHook }:

makeSetupHook {
name = "kernel-layout-check-hook";
Expand Down
1 change: 1 addition & 0 deletions nix-builder/pkgs/python-modules/cuda-bindings/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ let
"12.9" = cuda_12;
"13.0" = cuda_13;
"13.1" = cuda_13;
"13.2" = cuda_13;
};

versionHash =
Expand Down
71 changes: 71 additions & 0 deletions nix-builder/pkgs/python-modules/torch/archs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,75 @@
"gfx1201"
];
};

"2.12" = {
# https://github.com/pytorch/pytorch/blob/release/2.12/.ci/manywheel/build_cuda.sh
capsPerCudaVersion = {
"13.2" = [
"7.5"
"8.0"
"8.6"
"9.0"
"10.0"
"11.0"
"12.0"
];
"13.0" = [
"7.5"
"8.0"
"8.6"
"9.0"
"10.0"
"11.0"
"12.0"
];
# NOTE: 12.9 does not seem to be in RC builds, check if needed for final release.
# https://download.pytorch.org/whl/test/torch/
"12.9" = [
"7.0"
"7.5"
"8.0"
"9.0"
"10.0"
"12.0"
];
"12.8" = [
"7.0"
"7.5"
"8.0"
"8.6"
"9.0"
"10.0"
"12.0"
];
"12.6" = [
"5.0"
"6.0"
"7.0"
"7.5"
"8.0"
"8.6"
"9.0"
];
};

supportedTorchRocmArchs = [
# https://github.com/pytorch/pytorch/blob/release/2.12/.ci/docker/almalinux/build.sh
"gfx900"
"gfx906"
"gfx908"
"gfx90a"
"gfx942"
"gfx950"
"gfx1030"
"gfx1100"
"gfx1101"
"gfx1102"
"gfx1150"
"gfx1151"
"gfx1200"
"gfx1201"
];
};

}
3 changes: 2 additions & 1 deletion nix-builder/pkgs/python-modules/torch/binary/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}:

{
triton-cuda,
triton-xpu,
xpuPackages,
version,
Expand All @@ -39,6 +40,6 @@ let
or (throw "Unsupported framework: ${framework} for torch version: ${version} on system: ${system}");
in
callPackage ./generic.nix {
inherit triton-xpu xpuPackages;
inherit triton-cuda triton-xpu xpuPackages;
inherit (urlHash) url hash version;
}
Loading
Loading