Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions docs/source/builder/build-variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ available. This list will be updated as new PyTorch versions are released.

## CUDA aarch64-linux

- `torch210-cu126-aarch64-linux`
- `torch210-cu128-aarch64-linux`
- `torch210-cu130-aarch64-linux`
- `torch211-cu126-aarch64-linux`
- `torch211-cu128-aarch64-linux`
- `torch211-cu130-aarch64-linux`
- `torch212-cu126-aarch64-linux`
- `torch212-cu130-aarch64-linux`
- `torch212-cu132-aarch64-linux`
- `torch213-cu126-aarch64-linux`
- `torch213-cu130-aarch64-linux`
- `torch213-cu132-aarch64-linux`
Expand All @@ -46,6 +55,15 @@ available. This list will be updated as new PyTorch versions are released.

## CUDA x86_64-linux

- `torch210-cu126-x86_64-linux`
- `torch210-cu128-x86_64-linux`
- `torch210-cu130-x86_64-linux`
- `torch211-cu126-x86_64-linux`
- `torch211-cu128-x86_64-linux`
- `torch211-cu130-x86_64-linux`
- `torch212-cu126-x86_64-linux`
- `torch212-cu130-x86_64-linux`
- `torch212-cu132-x86_64-linux`
- `torch213-cu126-x86_64-linux`
- `torch213-cu130-x86_64-linux`
- `torch213-cu132-x86_64-linux`
Expand Down
6 changes: 6 additions & 0 deletions examples/kernels/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
path = ./relu-torch-stable-abi;
drv = sys: out: out.packages.${sys}.redistributable.${"torch-stable-abi211-${cudaVersion}-${sys}"};
}
# Check that we can also build the non-stable ABI version preceding the stable ABI version.
{
name = "relu-torch-stable-abi-kernel";
path = ./relu-torch-stable-abi;
drv = sys: out: out.packages.${sys}.redistributable.${"torch210-${cudaVersion}-${sys}"};
}
{
name = "relu-tvm-ffi-kernel";
path = ./relu-tvm-ffi;
Expand Down
4 changes: 2 additions & 2 deletions examples/kernels/relu-torch-bounds/build.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ backends = [
repo-id = "kernels-test/relu-torch-bounds"

[torch]
minver = "2.12"
maxver = "2.12"
minver = "2.13"
maxver = "2.13"
src = [
"torch-ext/torch_binding.cpp",
"torch-ext/torch_binding.h",
Expand Down
18 changes: 18 additions & 0 deletions nix-builder/build-variants.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
"torch215-cpu-aarch64-linux"
],
"cuda": [
"torch210-cu126-aarch64-linux",
"torch210-cu128-aarch64-linux",
"torch210-cu130-aarch64-linux",
"torch211-cu126-aarch64-linux",
"torch211-cu128-aarch64-linux",
"torch211-cu130-aarch64-linux",
"torch212-cu126-aarch64-linux",
"torch212-cu130-aarch64-linux",
"torch212-cu132-aarch64-linux",
"torch213-cu126-aarch64-linux",
"torch213-cu130-aarch64-linux",
"torch213-cu132-aarch64-linux",
Expand All @@ -39,6 +48,15 @@
"torch215-cpu-x86_64-linux"
],
"cuda": [
"torch210-cu126-x86_64-linux",
"torch210-cu128-x86_64-linux",
"torch210-cu130-x86_64-linux",
"torch211-cu126-x86_64-linux",
"torch211-cu128-x86_64-linux",
"torch211-cu130-x86_64-linux",
"torch212-cu126-x86_64-linux",
"torch212-cu130-x86_64-linux",
"torch212-cu132-x86_64-linux",
"torch213-cu126-x86_64-linux",
"torch213-cu130-x86_64-linux",
"torch213-cu132-x86_64-linux",
Expand Down
12 changes: 10 additions & 2 deletions nix-builder/lib/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ let
path = ../../examples/kernels/relu-torch-bounds;
};

# The Torch version that `relu-torch-bounds` is bounded to (minver/maxver).
expectedTorchVersion = "2.13.0";
kernelBuildSetTorchVersions = lib.unique (map (buildSet: buildSet.torch.version) kernelBuildSets);

badRegistrationCheck = testers.testBuildFailure' {
drv =
(genKernelFlakeOutputs {
Expand Down Expand Up @@ -128,9 +132,13 @@ let
touch $out
'';
in
assert lib.assertMsg (builtins.all (buildSet: buildSet.torch.version == "2.13.0") kernelBuildSets)
assert lib.assertMsg (kernelBuildSets != [ ]) ''
Torch minver/maxver filtering does not work: expected build sets with Torch ${expectedTorchVersion}, got no build sets.
'';
assert lib.assertMsg
(builtins.all (buildSet: buildSet.torch.version == expectedTorchVersion) kernelBuildSets)
''
Torch minver/maxver filtering does not work.
Torch minver/maxver filtering does not work: expected only build sets with Torch ${expectedTorchVersion}, got: ${lib.concatStringsSep ", " kernelBuildSetTorchVersions}
'';
assert lib.assertMsg (torchVersionUtilsTestFailures == [ ]) ''
torch-version-utils tests failed: ${builtins.toJSON torchVersionUtilsTestFailures}
Expand Down
5 changes: 3 additions & 2 deletions nix-builder/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ final: prev:
in
{
inherit (triton)
triton_3_6_0
triton_3_7_0
triton_3_7_1
triton_3_8_0
Expand Down Expand Up @@ -249,7 +250,7 @@ final: prev:

torch-bin_2_10 = mkTorch {
version = "2.10";
triton-cuda = null;
triton-cuda = triton_3_6_0;
triton-rocm = null;
triton-xpu = triton-xpu_3_6_0;
xpuPackages = final.xpuPackages_2025_3_1;
Expand All @@ -258,7 +259,7 @@ final: prev:
# Maintain a minimal version for TPU support.
torch-bin_2_11 = mkTorch {
version = "2.11";
triton-cuda = null;
triton-cuda = triton_3_6_0;
triton-rocm = null;
triton-xpu = triton-xpu_3_7_0;
xpuPackages = final.xpuPackages_2025_3_2;
Expand Down
162 changes: 129 additions & 33 deletions nix-builder/pkgs/python-modules/torch/binary/torch-versions-hash.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
{
"2.10": {
"aarch64-darwin": {
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.10.0-cp314-cp314-macosx_14_0_arm64.whl",
"hash": "sha256-yIsRKf1OFPD4gpY8ZygxXKrjXS9HN00X7e7R7cdpdJc=",
"version": "2.10.0"
}
},
"x86_64-linux": {
"xpu": {
"url": "https://download.pytorch.org/whl/xpu/torch-2.10.0%2Bxpu-cp314-cp314-linux_x86_64.whl",
"hash": "sha256-NJN2IhJKNBK+qpizLyYcHLVnZGEwcv/DQ/TaGzQg7X8=",
"version": "2.10.0"
},
"cu128": {
"url": "https://download.pytorch.org/whl/cu128/torch-2.10.0%2Bcu128-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-N9cf7qBod2hVaGoVEgWN8/GfbwQKFR8FWqdGYBZ4dE8=",
"version": "2.10.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.10.0%2Bcu126-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-TPWXQD8zmlBorVqW+sViomZKfMWE8kaJ0xNr896w0H4=",
"version": "2.10.0"
},
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.10.0%2Bcu130-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-21pheRt9o8GqWkluZM1y29TvPvLLtpaA/UXcJVsNovM=",
"version": "2.10.0"
}
},
"aarch64-linux": {
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.10.0%2Bcu130-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-GPh65ijALwlfLpd1bk+iSc7vbtbofVo8ebUzir+EJRE=",
"version": "2.10.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.10.0%2Bcu126-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-aTWQLVUAezAxoeHOdPnQ4aZ4DLApkIGBM6hoVgGX36Y=",
"version": "2.10.0"
},
"cu128": {
"url": "https://download.pytorch.org/whl/cu128/torch-2.10.0%2Bcu128-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-xCN3vCYH4+HGDacbeS+1B8OTjIf9btq4shxZyRRzw20=",
"version": "2.10.0"
}
},
"aarch64-darwin": {
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.10.0-cp314-cp314-macosx_14_0_arm64.whl",
"hash": "sha256-yIsRKf1OFPD4gpY8ZygxXKrjXS9HN00X7e7R7cdpdJc=",
"version": "2.10.0"
}
}
},
Expand All @@ -26,6 +58,38 @@
"url": "https://download.pytorch.org/whl/xpu/torch-2.11.0%2Bxpu-cp314-cp314-linux_x86_64.whl",
"hash": "sha256-9j+b6Gd+E4oquM6pYA4F1Db3AFvgEmr3Clj3s/cYnnM=",
"version": "2.11.0"
},
"cu128": {
"url": "https://download.pytorch.org/whl/cu128/torch-2.11.0%2Bcu128-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-04moUGd/DSTa+uFXNkQDRCjY07nIC1HVW6Yv7X5sh3c=",
"version": "2.11.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.11.0%2Bcu126-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-CQg+zKX29iFLAh0SyXF2MmfNEnDfn/y7YpHIFcSDsaA=",
"version": "2.11.0"
},
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.11.0%2Bcu130-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-bMw2ko/RfIYBG0b7gb0shUdfH7+Wfd51hnLWqNg6ISo=",
"version": "2.11.0"
}
},
"aarch64-linux": {
"cu128": {
"url": "https://download.pytorch.org/whl/cu128/torch-2.11.0%2Bcu128-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-uqUve4pTyrFlh7EPHCfRAAygM/lyNoeLaFt11aG5JAg=",
"version": "2.11.0"
},
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.11.0%2Bcu130-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-783+COwsnbKLUMxzKf7QyQu3T6b7zg9+sS4g2yJ5pA8=",
"version": "2.11.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.11.0%2Bcu126-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-m+9uLATCQWO/DK+rgu4q7N9QOxgX+Tbh5vXGUiMbBvE=",
"version": "2.11.0"
}
},
"aarch64-darwin": {
Expand All @@ -37,18 +101,50 @@
}
},
"2.12": {
"aarch64-darwin": {
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.12.0-cp314-cp314-macosx_14_0_arm64.whl",
"hash": "sha256-99+uSlGRl9+gUOmNjjY3ig+1iZYlqHXCtURFAFouQE4=",
"version": "2.12.0"
}
},
"x86_64-linux": {
"xpu": {
"url": "https://download.pytorch.org/whl/xpu/torch-2.12.0%2Bxpu-cp314-cp314-linux_x86_64.whl",
"hash": "sha256-CAXv6u5uWyIA13Bx3WxS1lUg+VsD5H9S9oPmL0jmIuY=",
"version": "2.12.0"
},
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.12.0%2Bcu130-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-P/c2b2kZIy8JnvcCw+vTUJyRqzfDZ+QIyzeZxr7SFKQ=",
"version": "2.12.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.12.0%2Bcu126-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-FJo3aBO69h9KbR+is90EakHJi5HX0sIqCYmYRkI3P3M=",
"version": "2.12.0"
},
"cu132": {
"url": "https://download.pytorch.org/whl/cu132/torch-2.12.0%2Bcu132-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-bH9721cP5nj6ukj10KH/HVqE+17mQgVmcOLD0ASh/t0=",
"version": "2.12.0"
}
},
"aarch64-linux": {
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.12.0%2Bcu126-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-6b5n5sZLmAz9dfjPCUY9euqE3XXN3ZqQxrI2O+IhprU=",
"version": "2.12.0"
},
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.12.0%2Bcu130-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-Bb4Xq0wb0zXP9Lb7THjrpv8m732MmXiH5ctZsMKUJ7I=",
"version": "2.12.0"
},
"cu132": {
"url": "https://download.pytorch.org/whl/cu132/torch-2.12.0%2Bcu132-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-TEqccTGwXG6XTaMZIqyRTj320Z+wu8lKBCAp0QcJIGI=",
"version": "2.12.0"
}
},
"aarch64-darwin": {
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.12.0-cp314-cp314-macosx_14_0_arm64.whl",
"hash": "sha256-99+uSlGRl9+gUOmNjjY3ig+1iZYlqHXCtURFAFouQE4=",
"version": "2.12.0"
}
}
},
Expand Down Expand Up @@ -190,48 +286,43 @@
},
"2.15": {
"x86_64-linux": {
"cpu": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ccfR027iL67S4QImAMBz3nq4GxMcQML92FTMU1+eMlQ=",
"version": "2.15.0"
},
"cu130": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcu130-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-HVajzRduiOsnn8TcD/UXOZ/N6jZfluSngz+Eicwj7bQ=",
"version": "2.15.0"
},
"cu132": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcu132-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ZvMSOsOiXvPsZys8yW1/KO6hvWCCHO12tn7FV7fbUr4=",
"version": "2.15.0"
},
"cu134": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcu134-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-5dYGV7nt1nNlnkvvQa239XTmMkSJv1ej16ZEhztZIwA=",
"version": "2.15.0"
},
"cu132": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcu132-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ZvMSOsOiXvPsZys8yW1/KO6hvWCCHO12tn7FV7fbUr4=",
"cpu": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ccfR027iL67S4QImAMBz3nq4GxMcQML92FTMU1+eMlQ=",
"version": "2.15.0"
},
"xpu": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bxpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-UauujCMCQFMS+EHw7HFOURjg0s9W3RPSdhRwnGErQMw=",
"rocm714": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Brocm7.14-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-/Vdsj1DgJvYNyJETM6DYl3j5/RaHAOUclavCXgvP5No=",
"version": "2.15.0"
},
"rocm100": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Brocm10.0-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-CZsiabaC1soLrXZqORaEv2FAPYJMCQ5P2HIoR9GyjIs=",
"version": "2.15.0"
},
"rocm714": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Brocm7.14-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-/Vdsj1DgJvYNyJETM6DYl3j5/RaHAOUclavCXgvP5No=",
"xpu": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bxpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-UauujCMCQFMS+EHw7HFOURjg0s9W3RPSdhRwnGErQMw=",
"version": "2.15.0"
}
},
"aarch64-linux": {
"cpu": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-Egmzbm4g1+f/3eSIYWQqwEzo4JmfkTR813RupstkQ/A=",
"version": "2.15.0"
},
"cu130": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcu130-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-fpeAs7lXuETKdC0zZ8SwgwIi6Sa2KyWaCjooPF/iEac=",
Expand All @@ -246,6 +337,11 @@
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcu134-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-P2VQ8PZqiAPLLys+jMLAEykeuOwh+GW7sEnOtf6Xxj4=",
"version": "2.15.0"
},
"cpu": {
"url": "https://huggingface.co/buckets/kernels-community/pytorch-rc/resolve/2.15.0/rc3/torch-2.15.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-Egmzbm4g1+f/3eSIYWQqwEzo4JmfkTR813RupstkQ/A=",
"version": "2.15.0"
}
},
"aarch64-darwin": {
Expand Down
Loading
Loading