diff --git a/nix-builder/overlay.nix b/nix-builder/overlay.nix index 53419ca9..bb0065ed 100644 --- a/nix-builder/overlay.nix +++ b/nix-builder/overlay.nix @@ -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) @@ -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 { diff --git a/nix-builder/pkgs/python-modules/cuda-bindings/default.nix b/nix-builder/pkgs/python-modules/cuda-bindings/default.nix index 4a5d2257..cc8ef99f 100644 --- a/nix-builder/pkgs/python-modules/cuda-bindings/default.nix +++ b/nix-builder/pkgs/python-modules/cuda-bindings/default.nix @@ -38,6 +38,7 @@ let "13.0" = cuda_13; "13.1" = cuda_13; "13.2" = cuda_13; + "13.4" = cuda_13; }; versionHash = diff --git a/nix-builder/pkgs/python-modules/torch/binary/download_torch_versions.py b/nix-builder/pkgs/python-modules/torch/binary/download_torch_versions.py index ae39e5ec..be79722d 100755 --- a/nix-builder/pkgs/python-modules/torch/binary/download_torch_versions.py +++ b/nix-builder/pkgs/python-modules/torch/binary/download_torch_versions.py @@ -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): @@ -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") @@ -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 @@ -130,6 +138,7 @@ def main(): PYTHON_VERSION, system, testing=torch_testing is not None, + nightly_version=torch_nightly, ) filename = url.split("/")[-1] diff --git a/nix-builder/pkgs/python-modules/torch/binary/generate_torch_versions.py b/nix-builder/pkgs/python-modules/torch/binary/generate_torch_versions.py index aa4458db..096a74a6 100755 --- a/nix-builder/pkgs/python-modules/torch/binary/generate_torch_versions.py +++ b/nix-builder/pkgs/python-modules/torch/binary/generate_torch_versions.py @@ -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") @@ -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}" @@ -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, diff --git a/nix-builder/pkgs/python-modules/torch/binary/torch-versions-hash.json b/nix-builder/pkgs/python-modules/torch/binary/torch-versions-hash.json index 0f4c6912..4eb1826c 100644 --- a/nix-builder/pkgs/python-modules/torch/binary/torch-versions-hash.json +++ b/nix-builder/pkgs/python-modules/torch/binary/torch-versions-hash.json @@ -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": { @@ -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=", @@ -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": { @@ -98,9 +98,9 @@ "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": { @@ -108,9 +108,9 @@ "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" } }, @@ -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": { @@ -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" + } + } } } \ No newline at end of file diff --git a/nix-builder/pkgs/python-modules/torch/binary/torch-versions.json b/nix-builder/pkgs/python-modules/torch/binary/torch-versions.json index 9961627f..bb70059c 100644 --- a/nix-builder/pkgs/python-modules/torch/binary/torch-versions.json +++ b/nix-builder/pkgs/python-modules/torch/binary/torch-versions.json @@ -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" } ] diff --git a/nix-builder/pkgs/python-modules/torch/binary/torch_versions.py b/nix-builder/pkgs/python-modules/torch/binary/torch_versions.py index f851a060..572bad08 100644 --- a/nix-builder/pkgs/python-modules/torch/binary/torch_versions.py +++ b/nix-builder/pkgs/python-modules/torch/binary/torch_versions.py @@ -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: @@ -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( diff --git a/nix-builder/pkgs/python-modules/triton/default.nix b/nix-builder/pkgs/python-modules/triton/default.nix index 91a0f0aa..8c5a2bea 100644 --- a/nix-builder/pkgs/python-modules/triton/default.nix +++ b/nix-builder/pkgs/python-modules/triton/default.nix @@ -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 [ "." ] [ "_" ]; diff --git a/nix-builder/versions.nix b/nix-builder/versions.nix index 8e416ed0..de43cd67 100644 --- a/nix-builder/versions.nix +++ b/nix-builder/versions.nix @@ -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; @@ -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; + } ]