Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Build Windows x86_64 prebuilt CUDA wheels for torch 2.10 (#13740)
Daniel Han13cda3c5b88c
diff --git a/.github/scripts/prebuilt_wheels.py b/.github/scripts/prebuilt_wheels.pyindex 89e33640a52..d89436c4c41 100644--- a/.github/scripts/prebuilt_wheels.py+++ b/.github/scripts/prebuilt_wheels.py@@ -80,9 +80,9 @@ PLATFORMS = {"abi": "TRUE","label": " / win_amd64","pytorch_nvcc": "C:/ccache/ccache.exe C:/cuda/bin/nvcc.exe",- # On top of TORCH_VERSIONS: Linux reuses upstream's torch2.10 wheels for 2.11, which have- # no Windows build.- "extra_torches": ("2.11.0",),+ # On top of TORCH_VERSIONS: upstream's torch2.10 wheels (which Linux also reuses for 2.11)+ # have no Windows build.+ "extra_torches": ("2.10.0", "2.11.0"),},# Upstream's aarch64 wheels stop at torch 2.10. ubuntu-22.04-arm keeps the glibc 2.35 floor# the x86_64 build has, and the build asserts it.@@ -130,9 +130,14 @@ def _platform(platform: str, key: str):return PLATFORMS[platform].get(key, _PLATFORM_DEFAULTS.get(key))-# torch 2.11 pins triton==3.6.0, 2.13 triton==3.7.1 and 2.14 triton~=3.8.0 (Linux-only+# torch 2.10 and 2.11 pin triton==3.6.0, 2.13 triton==3.7.1 and 2.14 triton~=3.8.0 (Linux-only# markers); exact pins keep the Windows smoke test reproducible.-TRITON_WINDOWS = {"2.11": "3.6.0.post26", "2.13": "3.7.1.post27", "2.14": "3.8.0.post29"}+TRITON_WINDOWS = {+ "2.10": "3.6.0.post26",+ "2.11": "3.6.0.post26",+ "2.13": "3.7.1.post27",+ "2.14": "3.8.0.post29",+}WINDOWS_SMOKE_EXCLUDE = ("triton", "tilelang", "apache-tvm-ffi", "quack-kernels")# Source revisions, pinned to a commit rather than a branch or a tag.@@ -222,7 +227,8 @@ def _platform_torches(platform: str) -> tuple[str, ...]:)-# Accepted from a dispatch; each platform builds only its own subset (2.11.0 is win_amd64 only).+# Accepted from a dispatch; each platform builds only its own subset (2.10.0 and 2.11.0 are+# win_amd64 only).ALLOWED_TORCH = tuple(sorted({torch for platform in PLATFORMS for torch in _platform_torches(platform)},@@ -396,8 +402,8 @@ def build_matrix(if not include:raise SystemExit("no cells: none of the chosen platforms builds that package / torch combination "- "(torch 2.11.0 is win_amd64 only; win_arm64 builds causal-conv1d and mamba-ssm for "- "torch 2.14.0 only)."+ "(torch 2.10.0 and 2.11.0 are win_amd64 only; win_arm64 builds causal-conv1d and "+ "mamba-ssm for torch 2.14.0 only).")return includediff --git a/.github/workflows/prebuilt-cuda-wheels.yml b/.github/workflows/prebuilt-cuda-wheels.ymlindex d4c6f1cf0a5..7a90cbe4afb 100644--- a/.github/workflows/prebuilt-cuda-wheels.yml+++ b/.github/workflows/prebuilt-cuda-wheels.yml@@ -29,7 +29,7 @@ on:workflow_dispatch:inputs:torch_versions:- description: 'torch versions to build for, comma separated (2.13.0, 2.14.0; 2.11.0 builds on win_amd64 only)'+ description: 'torch versions to build for, comma separated (2.13.0, 2.14.0; 2.10.0 and 2.11.0 build on win_amd64 only)'type: stringdefault: '2.13.0,2.14.0'python_versions:diff --git a/tests/python/test_prebuilt_cuda_wheels.py b/tests/python/test_prebuilt_cuda_wheels.pyindex 1a074106642..6f861e71468 100644--- a/tests/python/test_prebuilt_cuda_wheels.py+++ b/tests/python/test_prebuilt_cuda_wheels.py@@ -121,7 +121,7 @@ class TestWorkflowAndResolverAgree:assert wheel_utils._UNSLOTH_PREBUILT_VERSIONS[spec["dist"]] == spec["version"], packagedef test_every_extra_cell_the_workflow_builds_is_what_the_resolver_asks_for(self):- """win_amd64 torch 2.11: outside TORCH_VERSIONS, so the class above does not see it."""+ """win_amd64 torch 2.10 / 2.11: outside TORCH_VERSIONS, so the class above does not see them."""checked = 0for (platform, torch_mm), pythons in wheel_utils._UNSLOTH_PREBUILT_EXTRA_CELLS.items():built_torches = prebuilt_wheels._platform_torches(platform)@@ -153,7 +153,9 @@ class TestWorkflowAndResolverAgree:for v in prebuilt_wheels._platform_torches(platform)if v not in prebuilt_wheels.TORCH_VERSIONS}- assert extra == set(wheel_utils._UNSLOTH_PREBUILT_EXTRA_CELLS)+ # The resolver only asks for cells the workflow builds. A new cell is built and published+ # before the resolver asks for it, so users never get a 404 in between.+ assert set(wheel_utils._UNSLOTH_PREBUILT_EXTRA_CELLS) <= extradef test_the_two_torch_tables_are_the_same_set(self):built = {prebuilt_wheels.torch_minor(version) for version in prebuilt_wheels.TORCH_VERSIONS}diff --git a/tests/python/test_prebuilt_cuda_wheels_windows.py b/tests/python/test_prebuilt_cuda_wheels_windows.pyindex 7712e807b92..a3a4355012b 100644--- a/tests/python/test_prebuilt_cuda_wheels_windows.py+++ b/tests/python/test_prebuilt_cuda_wheels_windows.py@@ -142,7 +142,7 @@ class TestMatrix:assert cell["smoke_extra"] == cell["smoke_exclude"] == ""def test_every_torch_minor_has_a_triton_windows_pin(self):- """torch 2.11 pins triton 3.6.0, 2.13 3.7.1 and 2.14 3.8.x; triton-windows mirrors those."""+ """torch 2.10 and 2.11 pin triton 3.6.0, 2.13 3.7.1 and 2.14 3.8.x; triton-windows follows."""minors = {prebuilt_wheels.torch_minor(v)for platform, target in prebuilt_wheels.PLATFORMS.items()@@ -150,29 +150,32 @@ class TestMatrix:for v in prebuilt_wheels._platform_torches(platform)}assert set(prebuilt_wheels.TRITON_WINDOWS) == minors+ assert prebuilt_wheels.TRITON_WINDOWS["2.10"].startswith("3.6.0.post")assert prebuilt_wheels.TRITON_WINDOWS["2.11"].startswith("3.6.0.post")assert prebuilt_wheels.TRITON_WINDOWS["2.13"].startswith("3.7.1.post")assert prebuilt_wheels.TRITON_WINDOWS["2.14"].startswith("3.8.0.post")- def test_torch_211_is_win_amd64_only_and_opt_in(self):+ @pytest.mark.parametrize("torch_version", ["2.10.0", "2.11.0"])+ def test_win_amd64_only_torches_are_opt_in(self, torch_version):+ torch_mm = prebuilt_wheels.torch_minor(torch_version)cells = prebuilt_wheels.build_matrix(- torches = "2.11.0", platforms = "win_amd64", pythons = "3.11,3.12,3.13"+ torches = torch_version, platforms = "win_amd64", pythons = "3.11,3.12,3.13")assert len(cells) == 9assert {cell["python_tag"] for cell in cells} == {"cp311", "cp312", "cp313"}- assert {cell["torch_spec"] for cell in cells} == {"torch==2.11.0"}+ assert {cell["torch_spec"] for cell in cells} == {f"torch=={torch_version}"}for cell in cells:- assert "+cu13torch2.11cxx11abiTRUE-" in cell["wheel_name"]+ assert f"+cu13torch{torch_mm}cxx11abiTRUE-" in cell["wheel_name"]if cell["package"] == "mamba-ssm":assert cell["smoke_extra"] == "triton-windows==3.6.0.post26"for platform in ("linux_x86_64", "linux_aarch64", "win_arm64"):with pytest.raises(SystemExit):- prebuilt_wheels.build_matrix(torches = "2.11.0", platforms = platform)+ prebuilt_wheels.build_matrix(torches = torch_version, platforms = platform)# A default dispatch builds what it did before.- assert "2.11.0" not in {cell["torch"] for cell in prebuilt_wheels.build_matrix()}- both = prebuilt_wheels.build_matrix(torches = "2.11.0,2.13.0")+ assert torch_version not in {cell["torch"] for cell in prebuilt_wheels.build_matrix()}+ both = prebuilt_wheels.build_matrix(torches = f"{torch_version},2.13.0")assert {(c["platform"], c["torch"]) for c in both} == {- ("win_amd64", "2.11.0"),+ ("win_amd64", torch_version),("win_amd64", "2.13.0"),("linux_x86_64", "2.13.0"),}@@ -180,6 +183,7 @@ class TestMatrix:def test_win_amd64_inherits_a_new_global_torch(self, monkeypatch):monkeypatch.setattr(prebuilt_wheels, "TORCH_VERSIONS", ("2.13.0", "2.14.0", "2.15.0"))assert prebuilt_wheels._platform_torches("win_amd64") == (+ "2.10.0","2.11.0","2.13.0","2.14.0",@@ -350,7 +354,8 @@ class TestNotes:(f"{index:064x}", prebuilt_wheels.wheel_name(package, torch, python, "win_amd64"))for index, (package, torch, python) in enumerate([- (pkg, "2.11.0", py)+ (pkg, t, py)+ for t in ("2.10.0", "2.11.0")for py in ("3.11", "3.12", "3.13")for pkg in prebuilt_wheels.SPECS]@@ -359,8 +364,8 @@ class TestNotes:]notes = prebuilt_wheels.render_notes(entries, tag = "t", repo = "r")assert (- "built for PyTorch 2.11 on Python 3.11, 3.12 and 3.13; 2.13 and 2.14 on Python 3.13."- in notes+ "built for PyTorch 2.10 and 2.11 on Python 3.11, 3.12 and 3.13; 2.13 and 2.14 on "+ "Python 3.13." in notes)def test_platforms_with_different_coverage_are_not_merged(self):