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.12 (#13807)
Daniel Hand6fc96b9cda2
diff --git a/.github/scripts/prebuilt_wheels.py b/.github/scripts/prebuilt_wheels.pyindex d89436c4c41..89f61432a8a 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: upstream's torch2.10 wheels (which Linux also reuses for 2.11)- # have no Windows build.- "extra_torches": ("2.10.0", "2.11.0"),+ # On top of TORCH_VERSIONS: upstream's torch2.10 wheels (which Linux also reuses for 2.11+ # and 2.12) have no Windows build.+ "extra_torches": ("2.10.0", "2.11.0", "2.12.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,11 +130,12 @@ def _platform(platform: str, key: str):return PLATFORMS[platform].get(key, _PLATFORM_DEFAULTS.get(key))-# 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.+# torch 2.10 and 2.11 pin triton==3.6.0, 2.12.0 triton==3.7.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.10": "3.6.0.post26","2.11": "3.6.0.post26",+ "2.12": "3.7.0.post26","2.13": "3.7.1.post27","2.14": "3.8.0.post29",}@@ -227,8 +228,8 @@ def _platform_torches(platform: str) -> tuple[str, ...]:)-# Accepted from a dispatch; each platform builds only its own subset (2.10.0 and 2.11.0 are-# win_amd64 only).+# Accepted from a dispatch; each platform builds only its own subset (2.10.0, 2.11.0 and 2.12.0+# are win_amd64 only).ALLOWED_TORCH = tuple(sorted({torch for platform in PLATFORMS for torch in _platform_torches(platform)},@@ -402,7 +403,7 @@ def build_matrix(if not include:raise SystemExit("no cells: none of the chosen platforms builds that package / torch combination "- "(torch 2.10.0 and 2.11.0 are win_amd64 only; win_arm64 builds causal-conv1d and "+ "(torch 2.10.0 to 2.12.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 7a90cbe4afb..4b8eda42235 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.10.0 and 2.11.0 build on win_amd64 only)'+ description: 'torch versions to build for, comma separated (2.13.0, 2.14.0; 2.10.0, 2.11.0 and 2.12.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 fa147d06dc5..b52321e4261 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.10 / 2.11: outside TORCH_VERSIONS, so the class above does not see them."""+ """win_amd64 torch 2.10 to 2.12: 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)@@ -341,7 +341,7 @@ class TestMatrix:[{"packages": "flash-attn; rm -rf /"},{"packages": "torchvision"},- {"torches": "2.12.0"},+ {"torches": "2.9.0"},{"torches": "$(whoami)"},{"pythons": "3.9"},{"pythons": "3.13 && curl evil"},diff --git a/tests/python/test_prebuilt_cuda_wheels_windows.py b/tests/python/test_prebuilt_cuda_wheels_windows.pyindex a3a4355012b..4f4008ba754 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.10 and 2.11 pin triton 3.6.0, 2.13 3.7.1 and 2.14 3.8.x; triton-windows follows."""+ """torch 2.10 / 2.11 pin triton 3.6.0, 2.12 3.7.0, 2.13 3.7.1, 2.14 3.8.x; triton-windows follows."""minors = {prebuilt_wheels.torch_minor(v)for platform, target in prebuilt_wheels.PLATFORMS.items()@@ -152,10 +152,11 @@ class TestMatrix:assert set(prebuilt_wheels.TRITON_WINDOWS) == minorsassert 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.12"].startswith("3.7.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")- @pytest.mark.parametrize("torch_version", ["2.10.0", "2.11.0"])+ @pytest.mark.parametrize("torch_version", ["2.10.0", "2.11.0", "2.12.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(@@ -167,7 +168,8 @@ class TestMatrix:for cell in cells: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"+ triton = prebuilt_wheels.TRITON_WINDOWS[torch_mm]+ assert cell["smoke_extra"] == f"triton-windows=={triton}"for platform in ("linux_x86_64", "linux_aarch64", "win_arm64"):with pytest.raises(SystemExit):prebuilt_wheels.build_matrix(torches = torch_version, platforms = platform)@@ -185,6 +187,7 @@ class TestMatrix:assert prebuilt_wheels._platform_torches("win_amd64") == ("2.10.0","2.11.0",+ "2.12.0","2.13.0","2.14.0","2.15.0",@@ -355,7 +358,7 @@ class TestNotes:for index, (package, torch, python) in enumerate([(pkg, t, py)- for t in ("2.10.0", "2.11.0")+ for t in ("2.10.0", "2.11.0", "2.12.0")for py in ("3.11", "3.12", "3.13")for pkg in prebuilt_wheels.SPECS]@@ -364,8 +367,8 @@ class TestNotes:]notes = prebuilt_wheels.render_notes(entries, tag = "t", repo = "r")assert (- "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+ "built for PyTorch 2.10, 2.11 and 2.12 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):