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
10 changes: 10 additions & 0 deletions nix-builder/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ final: prev:
triton_3_7_0
triton_3_7_1
triton_3_8_0
triton_3_8_0-nightly
;
inherit (triton-rocm) triton-rocm_3_7_0;
inherit (triton-xpu)
Expand Down Expand Up @@ -241,6 +242,15 @@ final: prev:
xpuPackages = final.xpuPackages_2026_1_0;
};

# Nightly for CUDA 13.4 development work.
torch-bin_2_15 = mkTorch {
version = "2.15";
triton-cuda = triton_3_8_0-nightly;
triton-rocm = null;
triton-xpu = null;
xpuPackages = null;
};

transformers = python-super.transformers.overridePythonAttrs (prevAttrs: rec {
version = "5.3.0";
src = python-super.fetchPypi {
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 @@ -38,6 +38,7 @@ let
"13.0" = cuda_13;
"13.1" = cuda_13;
"13.2" = cuda_13;
"13.4" = cuda_13;
};

versionHash =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def download_wheel(url: str, target_dir: str) -> None:

try:
urllib.request.urlretrieve(url, target_path)
print(f" ✓ Downloaded successfully")
print(" ✓ Downloaded successfully")
except Exception as e:
print(f" ✗ Error downloading: {e}", file=sys.stderr)
if os.path.exists(target_path):
Expand Down Expand Up @@ -77,6 +77,7 @@ def main():
for entry in torch_versions:
torch_version = entry.get("torchVersion")
torch_testing = entry.get("torchTesting")
torch_nightly = entry.get("torchNightly")
cuda_version = entry.get("cudaVersion")
rocm_version = entry.get("rocmVersion")
xpu_version = entry.get("xpuVersion")
Expand All @@ -88,6 +89,13 @@ def main():
print(f"Skipping entry without torchVersion: {entry}", file=sys.stderr)
continue

if torch_testing is not None and torch_nightly is not None:
print(
f"Error: entry has both torchTesting and torchNightly set: {entry}",
file=sys.stderr,
)
sys.exit(1)

if args.torch_version and torch_version != args.torch_version:
continue

Expand Down Expand Up @@ -130,6 +138,7 @@ def main():
PYTHON_VERSION,
system,
testing=torch_testing is not None,
nightly_version=torch_nightly,
)

filename = url.split("/")[-1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def main():
for entry in torch_versions:
torch_version = entry.get("torchVersion")
torch_testing = entry.get("torchTesting")
torch_nightly = entry.get("torchNightly")
cuda_version = entry.get("cudaVersion")
rocm_version = entry.get("rocmVersion")
xpu_version = entry.get("xpuVersion")
Expand All @@ -164,6 +165,13 @@ def main():
print(f"Skipping entry without torchVersion: {entry}", file=sys.stderr)
continue

if torch_testing is not None and torch_nightly is not None:
print(
f"Error: entry has both torchTesting and torchNightly set: {entry}",
file=sys.stderr,
)
sys.exit(1)

v = Version(torch_version)
version_key = f"{v.major}.{v.minor}"

Expand Down Expand Up @@ -223,7 +231,17 @@ def main():
)
continue

if torch_testing is not None:
if torch_nightly is not None:
url = generate_pytorch_url(
torch_version,
framework_version,
framework_type,
PYTHON_VERSION,
system,
testing=False,
nightly_version=torch_nightly,
)
elif torch_testing is not None:
url = generate_pytorch_rc_hf_url(
torch_version,
framework_version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@
},
"2.13": {
"x86_64-linux": {
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.13.0%2Bcu130-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-4jEwKkVymNAjb3veMQglaPbNBhO2a060aEnorVPC440=",
"version": "2.13.0"
},
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.13.0%2Bcpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-0g+lPudEUC+kxpgYpyCwXKDTer0FXU9uZsrhVRFLxpE=",
"version": "2.13.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.13.0%2Bcu126-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-r/07SaTkiu+JX/2eGWGBvVBUItfDe0pvmvp2iZ0qzT0=",
"version": "2.13.0"
},
"cu130": {
"url": "https://download.pytorch.org/whl/cu130/torch-2.13.0%2Bcu130-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-4jEwKkVymNAjb3veMQglaPbNBhO2a060aEnorVPC440=",
"version": "2.13.0"
},
"cu132": {
"url": "https://download.pytorch.org/whl/cu132/torch-2.13.0%2Bcu132-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-JP+fQfRyQJ0pjShJdOI+PlkjML/VNClVfqWb/6SZq6g=",
"version": "2.13.0"
},
"xpu": {
"url": "https://download.pytorch.org/whl/xpu/torch-2.13.0%2Bxpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ArcpOjS+L13T466NApEZdwetRjTeK9p6FpdfKruQidU=",
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.13.0%2Bcpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-0g+lPudEUC+kxpgYpyCwXKDTer0FXU9uZsrhVRFLxpE=",
"version": "2.13.0"
},
"rocm71": {
Expand All @@ -44,14 +39,14 @@
"url": "https://download.pytorch.org/whl/rocm7.2/torch-2.13.0%2Brocm7.2-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-gm3oRE9Me56sC/3oZcTNe4UrohezX7cadmuFrB4zEOI=",
"version": "2.13.0"
},
"xpu": {
"url": "https://download.pytorch.org/whl/xpu/torch-2.13.0%2Bxpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ArcpOjS+L13T466NApEZdwetRjTeK9p6FpdfKruQidU=",
"version": "2.13.0"
}
},
"aarch64-linux": {
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.13.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-ygIfnrL4NFyD+gPjoEWHMIr7jfcb1HJnCz7OAN9YYhw=",
"version": "2.13.0"
},
"cu126": {
"url": "https://download.pytorch.org/whl/cu126/torch-2.13.0%2Bcu126-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-obilv+JA2N/fLU8LcFMFUuGTUFDM1X1FA/kYKeN3M3A=",
Expand All @@ -66,6 +61,11 @@
"url": "https://download.pytorch.org/whl/cu132/torch-2.13.0%2Bcu132-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-mrdBLoddWwRYLr1RSbxGnV0dUYapMEGwLU6783u6U7Q=",
"version": "2.13.0"
},
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.13.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-ygIfnrL4NFyD+gPjoEWHMIr7jfcb1HJnCz7OAN9YYhw=",
"version": "2.13.0"
}
},
"aarch64-darwin": {
Expand Down Expand Up @@ -98,19 +98,19 @@
"hash": "sha256-8VL0HcXcRir+DeeA5FHrtH6otEUfj5GflTeqjiy+HX4=",
"version": "2.14.0"
},
"xpu": {
"url": "https://download.pytorch.org/whl/xpu/torch-2.14.0%2Bxpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-wxFmDc0QLevXVxG09ffM5epLqLMKe+XHg57jtHGvPC0=",
"rocm72": {
"url": "https://download.pytorch.org/whl/rocm7.2/torch-2.14.0%2Brocm7.2-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-96rbFtnkgPuvhKVctTqk9Vd4Eww93z5bxHTbR4vNV9c=",
"version": "2.14.0"
},
"rocm714": {
"url": "https://download.pytorch.org/whl/rocm7.14/torch-2.14.0%2Brocm7.14-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-YUNOyreck4O2klfMf9TR6TKjHFKHgc1Ew1QjmPJ9cf0=",
"version": "2.14.0"
},
"rocm72": {
"url": "https://download.pytorch.org/whl/rocm7.2/torch-2.14.0%2Brocm7.2-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-96rbFtnkgPuvhKVctTqk9Vd4Eww93z5bxHTbR4vNV9c=",
"xpu": {
"url": "https://download.pytorch.org/whl/xpu/torch-2.14.0%2Bxpu-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-wxFmDc0QLevXVxG09ffM5epLqLMKe+XHg57jtHGvPC0=",
"version": "2.14.0"
}
},
Expand All @@ -125,15 +125,15 @@
"hash": "sha256-mvTo85M8PVFdGUm++tVRJizbPxlcu9tGdDaVhcVew0I=",
"version": "2.14.0"
},
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.14.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-J7NGQP6nJohilhtzTHI4c+FbHCZXseuEvPrAU+WEFSc=",
"version": "2.14.0"
},
"cu132": {
"url": "https://download.pytorch.org/whl/cu132/torch-2.14.0%2Bcu132-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-lNS9GB45tsaNkWvDZhCPuBNK/LpBDDM868JNoHixEBc=",
"version": "2.14.0"
},
"cpu": {
"url": "https://download.pytorch.org/whl/cpu/torch-2.14.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl",
"hash": "sha256-J7NGQP6nJohilhtzTHI4c+FbHCZXseuEvPrAU+WEFSc=",
"version": "2.14.0"
}
},
"aarch64-darwin": {
Expand All @@ -143,5 +143,14 @@
"version": "2.14.0"
}
}
},
"2.15": {
"x86_64-linux": {
"cu134": {
"url": "https://download.pytorch.org/whl/nightly/cu134/torch-2.15.0.dev20260917%2Bcu134-cp314-cp314-manylinux_2_28_x86_64.whl",
"hash": "sha256-ZhghtENSCM9UQ0J/lI+H8WjUH/ABo9HTxT1q/cWE8co=",
"version": "2.15.0"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,12 @@
"torchVersion": "2.14.0",
"xpuVersion": "2026.1.0",
"systems": ["x86_64-linux"]
},

{
"torchVersion": "2.15.0",
"cudaVersion": "13.4",
"systems": ["x86_64-linux"],
"torchNightly": "20260917"
}
]
21 changes: 15 additions & 6 deletions nix-builder/pkgs/python-modules/torch/binary/torch_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,28 @@ def generate_pytorch_url(
python_version: str,
system: str,
testing: bool = False,
nightly_version: str = None,
) -> str:
"""Generate PyTorch wheel download URL."""
platform = system_to_platform(system, framework_type, torch_version)
version_prefix = (
f"{torch_version}.dev{nightly_version}" if nightly_version else torch_version
)

if "darwin" in system:
framework_dir = "cpu"
version_part = torch_version
version_part = version_prefix
abi_tag = python_version
wheel_name = f"torch-{version_part}-{python_version}-{abi_tag}-{platform}.whl"
elif framework_type == "cpu":
framework_dir = "cpu"
version_part = f"{torch_version}%2Bcpu"
version_part = f"{version_prefix}%2Bcpu"
abi_tag = python_version
wheel_name = f"torch-{version_part}-{python_version}-{abi_tag}-{platform}.whl"
elif framework_type == "xpu":
framework = "xpu"
framework_dir = framework
version_part = f"{torch_version}%2B{framework}"
version_part = f"{version_prefix}%2B{framework}"
abi_tag = python_version
wheel_name = f"torch-{version_part}-{python_version}-{abi_tag}-{platform}.whl"
else:
Expand All @@ -75,12 +79,17 @@ def generate_pytorch_url(
raise ValueError(f"Unsupported framework type: {framework_type}")

framework_dir = framework
version_part = f"{torch_version}%2B{framework}"
version_part = f"{version_prefix}%2B{framework}"
abi_tag = python_version
wheel_name = f"torch-{version_part}-{python_version}-{abi_tag}-{platform}.whl"

test_prefix = "test/" if testing else ""
return f"https://download.pytorch.org/whl/{test_prefix}{framework_dir}/{wheel_name}"
if nightly_version:
path_prefix = "nightly/"
elif testing:
path_prefix = "test/"
else:
path_prefix = ""
return f"https://download.pytorch.org/whl/{path_prefix}{framework_dir}/{wheel_name}"


def generate_pytorch_rc_hf_url(
Expand Down
6 changes: 6 additions & 0 deletions nix-builder/pkgs/python-modules/triton/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ let
hash = "sha256-9NoIqNpk/evM/u16gz5HPPt8Zw9YWi/h+vjUm+qz4b0=";
};
};
"3.8.0-nightly" = {
x86_64-linux = {
url = "https://download-r2.pytorch.org/whl/nightly/triton-3.8.0%2Bgitc01b6774-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl";
hash = "sha256-QVRSf6iJiAPuPEQ8YRNTl9zRnqrmrxmbfx27mwIkixQ=";
};
};
};
generic = callPackage ./generic.nix { };
versionAttr = lib.replaceStrings [ "." ] [ "_" ];
Expand Down
22 changes: 10 additions & 12 deletions nix-builder/versions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,6 @@
];
bundleBuild = true;
}
# Since 13.4 is a prerelease, not yet available on:
# https://developer.download.nvidia.com/compute/cuda/redist/
#{
# torchVersion = "2.14";
# cudaVersion = "13.4";
# systems = [
# "x86_64-linux"
# "aarch64-linux"
# ];
# bundleBuild = true;
# tvmFfiVersion = "0.1";
#}
{
torchVersion = "2.14";
metal = true;
Expand All @@ -157,4 +145,14 @@
systems = [ "x86_64-linux" ];
bundleBuild = true;
}

# For CUDA 13.4 development work.
{
torchVersion = "2.15";
cudaVersion = "13.4";
systems = [
"x86_64-linux"
];
bundleBuild = false;
}
]
Loading