Skip to content

Studio: keep AMD integrated GPUs on ROCm on Windows, Vulkan prefill is far slower there - #13428

Open
danielhanchen wants to merge 5 commits into
mainfrom
studio-windows-amd-igpu-keep-rocm
Open

danielhanchen wants to merge 5 commits into
mainfrom
studio-windows-amd-igpu-keep-rocm

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

On Windows, AMD integrated GPUs (gfx1150, gfx1151) go back to the ROCm llama.cpp prebuilt. Linux keeps the Vulkan preference from #10381.

Fixes #10656

Why

#10381 based the Vulkan preference on one Linux llama-bench at pp512 and depth 0. With the AMD Windows driver, prefill on longer prompts is much slower. I measured the reporter's model (unsloth/gemma-4-26B-A4B-it-qat-GGUF UD-Q4_K_XL) with our own prebuilts, both arms in one job on the same machine.

Windows 11 Pro 26200, Radeon 8060S (gfx1151), AMD driver 32.0.31041.3013, pin b11541-mix, -ngl 99 -fa 1, t/s:

test ROCm (2 runs) Vulkan (2 runs) Vulkan over ROCm
pp512 @ d0 1314.5, 1307.9 1844.4, 1830.3 +40%
pp4096 @ d0 1235.0, 1233.2 998.0, 990.9 -19%
pp512 @ d16384 774.4, 775.5 224.7, 224.1 -71% (3.4x slower)
pp4096 @ d16384 734.6, 731.0 206.4, 205.8 -72% (3.6x slower)
tg128 @ d0 61.7, 61.2 69.7, 69.5 +13%
tg128 @ d16384 48.4, 48.9 54.1, 53.9 +11%

Same runner, llama-server -c 262144 -fa on --jinja, a 9,318-token tool and system prompt, then follow-up turns:

ROCm Vulkan
first turn prefill, b11541 (current pin) 9.2 s 18.6 s
follow-up turn prefill, b11541 0.22 s 0.22 s
first turn prefill, b10840 (reporter's build) 9.8 s 23.8 s
follow-up turn prefill, b10840 0.21 s 3.36 s

The b10840 follow-up cost is the upstream iGPU checkpoint-read bug (ggml-org/llama.cpp#30049), which the current pin already includes. The fresh-prefill gap remains on every build.

Linux, same model and pin, a gfx1151 runner on RADV:

test ROCm Vulkan
pp512 @ d0 1515.6, 1543.8 1633.3, 1665.7
pp4096 @ d0 1408.0, 1408.1 1458.8, 1460.7
pp512 @ d16384 942.9, 943.5 962.4, 953.3
pp4096 @ d16384 890.7, 891.4 885.5, 894.0
tg128 @ d0 61.8, 65.5 71.7, 73.8

On Linux, Vulkan ties or wins at every depth, so the preference stays there.

What changes

_should_prefer_vulkan_for_amd_igpu returns False on Windows, so routing there is exactly what it was before #10381. Nothing else changes:

Existing Windows installs that #10381 moved to Vulkan were recorded as auto, so they come back on their own:

  • A newer llama.cpp release re-detects and installs ROCm.
  • On an install already at the current release, the existing backend-migration banner offers the switch.

A deliberate Vulkan choice records vulkan, so it is never undone. A GPU pin saved in Vulkan's index space is dropped on the switch back, through the same namespace check #10381 added.

Tests

  • The preference's guard and plan tests now run on a Linux host, so each guard is still exercised on a platform where the preference can fire.
  • test_integrated_amd_keeps_rocm_on_windows is the regression test for this issue. It fails on main for gfx1150 and gfx1151 and passes here.
  • test_install_resolve_prebuilt.py and tests/studio/install/test_pr10648_host_matrix.py: 466 passed, 16 skipped.
  • The eleven backend suites Studio: route AMD integrated GPUs to the Vulkan llama.cpp prebuilt #10381 listed: 1257 passed. 5 failed, the same 5 test_openai_auto_switch.py MCP token-count cases that also fail on main.

@danielhanchen danielhanchen self-assigned this Oct 12, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-12T15:57:20.595830Z 298a46c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 12, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 230cd4955e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@LeoBorcherding

Copy link
Copy Markdown
Collaborator

Merged main (c4f9de9c05) into this branch on a mirror (LeoBorcherding/unsloth#620). Both conflicts were comment trims: VULKAN_PREFERRED_GFX_TARGETS's comment now says Linux only, and the test file keeps this PR's Linux-only test_integrated_amd_prefers_vulkan_on_linux over main's both-platforms version. Codex is clean at the merged head e7ba3fa0fb.

test_integrated_amd_keeps_rocm_on_windows fails 2/2 against main's install_llama_prebuilt.py and passes with this change. The 238 routing tests matching integrated_amd or vulkan pass. These tests use mocked hosts, and we have no Windows Strix Point/Halo machine, so the Windows numbers in the body are the hardware evidence. The merged branch is night-shift-tester/13428 on the fork if you want to take it as-is.

@LeoBorcherding

Copy link
Copy Markdown
Collaborator

This conflicts with main again, so I merged main (77ecead09a) into it on the mirror: LeoBorcherding/unsloth#620, head 94daf93082. The merge was clean, with no conflicts to resolve. Codex is clean at that head. test_install_resolve_prebuilt.py -k "integrated_amd or vulkan" passes 238/238, including test_integrated_amd_keeps_rocm_on_windows.

The merged branch is night-shift-tester/13428 on LeoBorcherding/unsloth if you want to pull it in as is. These tests use mocked hosts, and we still have no Windows Strix Point/Halo machine, so your Windows numbers in the body remain the hardware evidence.

@LeoBorcherding

Copy link
Copy Markdown
Collaborator

CI on the merged mirror head 94daf93082 (LeoBorcherding/unsloth#620): 71 checks pass. None of the 4 reds comes from this PR: a diffusion test that fails the same way on main, a page-load timeout, a Windows updater test where only Python packages changed, and a parity check that compared against an older base. The Core training jobs are still running on the fork.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] AMD: Unsloth Desktop on Strix Halo (Windows) now defaults to Vulkan, where prefill is very slow

2 participants