mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1768] [CLOSED] Windows AMD: image input on the CPU and on the GPU through Vulkan, te… #3661
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3661
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1768
Author: @WeisTekEng
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:windows-amd-vision📝 Commits (8)
66df2afWindows AMD: image input on the CPU and on the GPU through Vulkan, tested on RX9070xt Nitro+7c110d8Windows AMD vision: review fixes (AVX2 encoder build, cmake lookup, keep images on re-run)4d282b2Merge branch 'main' into windows-amd-visione0555d3Merge branch 'main' into windows-amd-vision4de6502Merge branch 'main' into windows-amd-vision4b7d090Merge remote-tracking branch 'origin/windows-amd-vision' into windows-amd-vision886f322Test: switching the AMD encoder mode (cpu to gpu) compiles the other encoderbaddd77gitignore: the generated build-vision-vk.bat and build-vision-cpu.bat📊 Changes
8 files changed (+258 additions, -53 deletions)
View changed files
📝
.gitignore(+2 -0)📝
docs/AMD_HIP.md(+2 -2)📝
setup.py(+109 -21)📝
tools/strata_mcp.py(+0 -10)📝
tools/test_setup_amd.py(+124 -6)📝
tools/test_setup_choices.py(+3 -5)📝
tools/test_strata_mcp.py(+6 -9)📝
tools/vision/CMakeLists.txt(+12 -0)📄 Description
Title
Windows AMD: image input on the CPU and on the GPU through Vulkan (tested on RX 9070 XT Nitro+)
Issue: N/A (AMD on Windows had no way to enable images)
Summary
AMD cards on Windows could not use images: setup refused
--vision cpu, never asked the "Images?" question, and the ready-made HIP engine ships nostrata-vision.exe. The encoder was also CUDA-only, so there was no GPU option on AMD. This PR lets AMD users on Windows (and Linux) choose no images, the CPU encoder, or a GPU encoder built with Vulkan, compiled locally once.Tested on an RX 9070 XT Nitro+ (gfx1201), Windows, Ryzen 9 5900X, 80 GB RAM, Swift 1.5 IQ3_XXS, Visual Studio 2026 and the Vulkan SDK. Setup with
--vision gpucompiled the encoder and the server started with images on. The model correctly readTS20 CP77andQUADRAfrom a test picture. Text speed stayed at about 50 tok/s with a 70-76% expert-cache hit rate, with and without images. Unit tests pass (102 intest_setup_amd,test_setup_choices,test_strata_mcp).What changed
setup.pyhip_vision()now acceptscpuon Windows and returnsgpuforgpu/yes(Vulkan encoder) instead of refusing.win_hip_vision(): compiles the encoder once beside the ready-made AMD engine. If the Visual Studio C++ tools or the Vulkan SDK are missing it warns and continues with images off.build_vision_vulkan()andfind_vulkan_sdk().build_engine_hip()dispatches to the CPU or Vulkan encoder build, and its readiness check compares the encoder mode so switching cpu to gpu rebuilds it.find_vcvars((13, 3)), because the Visual Studio version cap exists for CUDA and doesn't apply here. This lets Visual Studio 2026 work.tools/vision/CMakeLists.txt: newSTRATA_VISION_VULKANoption (builds ggml-vulkan).tools/strata_mcp.py: removed the check that rejected--visionchoices for the AMD backend.tools/test_setup_amd.py,tools/test_setup_choices.py,tools/test_strata_mcp.py: updated and added tests.docs/AMD_HIP.md: images are now supported on Windows AMD..gitignore: added the generatedbuild-vision-vk.bat.Extra Notes
--vision cpuneeds no SDK.GGML_VK_VISIBLE_DEVICESmay help, but I haven't verified that.strata_mcp.pystill rejects AMD on Windows. I left that out of this PR.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.