Skip to content

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.

Studio: install the Vulkan or CPU llama.cpp bundle on Windows NVIDIA drivers older than CUDA 12 (#13671)

oobaboogac155cd70ddfb
diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py
index 4af087fdc13..0f7acf7658b 100644
--- a/studio/install_llama_prebuilt.py
+++ b/studio/install_llama_prebuilt.py
@@ -4221,13 +4221,9 @@ def resolve_release_asset_choice(
)
if host.is_windows and host.is_x86_64 and (host.has_usable_nvidia or masked_host is not None):
selection_host = masked_host or host
- if (
- driver_below_cuda_prebuilt_floor(selection_host)
- and selection_host.driver_cuda_version[0] >= _MIN_CUDA_MAJOR
- ):
- # #12842: the Windows source fallback needs a toolkit this driver runs, which
- # winget rarely offers, so setup would fail. Vulkan still runs on the NVIDIA
- # GPU (the reporter's Vulkan build worked); CPU only after it. Not under a CUDA
+ if driver_below_cuda_prebuilt_floor(selection_host):
+ # #12842, #13662: the source fallback needs a toolkit this driver runs, which winget
+ # rarely offers. Vulkan still runs on the NVIDIA GPU; CPU after it. Not under a CUDA
# mask: Vulkan ignores it, so it could take a card the caller hid.
vulkan_choice = (
published_asset_choice_for_kind(release, "windows-vulkan", host = host)
diff --git a/studio/setup.ps1 b/studio/setup.ps1
index cc3befcda23..11c87852a99 100644
--- a/studio/setup.ps1
+++ b/studio/setup.ps1
@@ -10606,7 +10606,10 @@ if ($NeedLlamaSourceBuild -and -not $script:LlamaBuildToolsDeclined) {
substep "installing OpenSSL dev (for HTTPS in llama-server)..."
$HasWinget = $null -ne (Get-Command winget -ErrorAction SilentlyContinue)
if ($HasWinget) {
- winget install -e --id ShiningLight.OpenSSL.Dev --source winget --accept-package-agreements --accept-source-agreements
+ # Optional: a winget that cannot launch (#13662) must not abort setup under EAP Stop.
+ try {
+ Invoke-SetupCommand { winget install -e --id ShiningLight.OpenSSL.Dev --source winget --accept-package-agreements --accept-source-agreements } | Out-Null
+ } catch { }
# Re-check after install
foreach ($root in $OpenSslRoots) {
if (Test-Path (Join-Path $root 'include\openssl\ssl.h')) {
diff --git a/tests/studio/install/test_cuda_driver_floor_12842.py b/tests/studio/install/test_cuda_driver_floor_12842.py
index 513535bcb29..d665fec61a8 100644
--- a/tests/studio/install/test_cuda_driver_floor_12842.py
+++ b/tests/studio/install/test_cuda_driver_floor_12842.py
@@ -248,8 +248,18 @@ class TestWindowsBelowTheFloorGetsTheVulkanBundle:
host("Windows", driver), "b11443", _release_with(*kinds), None
)
- def test_a_12_2_driver_gets_vulkan_then_cpu(self, monkeypatch):
- choices = self._choices(monkeypatch, (12, 2))
+ # (10, 1) on sm_30 is #13662's GT 650M; a pre-12 driver used to source-build.
+ @pytest.mark.parametrize(
+ "driver, caps", [((12, 2), ("86",)), ((11, 8), ("61",)), ((10, 1), ("30",))]
+ )
+ def test_a_driver_below_the_floor_gets_vulkan_then_cpu(self, monkeypatch, driver, caps):
+ monkeypatch.setattr(m, "apply_approved_hashes", lambda attempts, _checksums: attempts)
+ choices = m.resolve_release_asset_choice(
+ host("Windows", driver, caps),
+ "b11443",
+ _release_with("windows-vulkan", "windows-cpu"),
+ None,
+ )
assert [c.install_kind for c in choices] == ["windows-vulkan", "windows-cpu"]
assert choices[0].name == f"app-{TAG}-windows-x64-vulkan.zip"
@@ -267,8 +277,9 @@ class TestWindowsBelowTheFloorGetsTheVulkanBundle:
)
assert [c.install_kind for c in choices] == ["windows-cpu"]
- def test_without_a_vulkan_bundle_it_gets_the_cpu_bundle(self, monkeypatch):
- choices = self._choices(monkeypatch, (12, 2), kinds = ("windows-cpu",))
+ @pytest.mark.parametrize("driver", [(12, 2), (10, 1)])
+ def test_without_a_vulkan_bundle_it_gets_the_cpu_bundle(self, monkeypatch, driver):
+ choices = self._choices(monkeypatch, driver, kinds = ("windows-cpu",))
assert [c.install_kind for c in choices] == ["windows-cpu"]
@pytest.mark.parametrize("driver", [(12, 4), (13, 0)])
@@ -276,10 +287,9 @@ class TestWindowsBelowTheFloorGetsTheVulkanBundle:
choices = self._choices(monkeypatch, driver)
assert choices and all(c.install_kind == "windows-cuda" for c in choices)
- def test_a_cuda_11_driver_keeps_its_old_route(self, monkeypatch):
- # No fork bundle covers it; the caller turned main's empty list into this same fallback.
+ def test_without_either_bundle_a_pre_12_driver_still_source_builds(self, monkeypatch):
with pytest.raises(m.PrebuiltFallback, match = "no published Windows CUDA bundle"):
- self._choices(monkeypatch, (11, 8))
+ self._choices(monkeypatch, (11, 8), kinds = ())
class TestTheSourceStageDoesNotKeepABrokenCudaPrebuilt:
diff --git a/tests/studio_setup_ps1/Studio.Setup.BuildToolsConsent.Tests.ps1 b/tests/studio_setup_ps1/Studio.Setup.BuildToolsConsent.Tests.ps1
index c43af7622f4..6cfab6fd058 100644
--- a/tests/studio_setup_ps1/Studio.Setup.BuildToolsConsent.Tests.ps1
+++ b/tests/studio_setup_ps1/Studio.Setup.BuildToolsConsent.Tests.ps1
@@ -166,6 +166,11 @@ Describe 'only the automatic fallback is gated' {
$script:SetupText.Substring($skip, $install - $skip) | Should -Match 'building without HTTPS'
}
+ It 'a winget that cannot launch does not abort setup at the optional OpenSSL install' {
+ # #13662: under ErrorActionPreference Stop a bare call aborted the whole install.
+ $script:SetupText | Should -Match ([regex]::Escape('try {') + '\s+' + [regex]::Escape('Invoke-SetupCommand { winget install -e --id ShiningLight.OpenSSL.Dev'))
+ }
+
It 'the gate checks the fallback flag before asking' {
$script:SetupText | Should -Match ([regex]::Escape('$script:LlamaSourceBuildIsFallback -and (Test-LlamaBuildToolsMissing) -and'))
}