[PR #1789] [CLOSED] setup: images on Windows AMD with a hand-built encoder, CPU or Vulkan (#1155) #3677

Closed
opened 2026-11-07 15:29:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1789
Author: @gt50
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: rentlens-fixes


📝 Commits (2)

  • 98ab5d2 setup: images on Windows AMD with a hand-built encoder, CPU or Vulkan (#1155)
  • 7a4783e docs/AMD_HIP.md: SPIRV-Headers_DIR for older Vulkan SDKs, and the encoder's device on laptops with two GPUs (Hugua700, #1789)

📊 Changes

3 files changed (+163 additions, -9 deletions)

View changed files

📝 docs/AMD_HIP.md (+68 -2)
📝 setup.py (+54 -6)
📝 tools/test_setup_amd.py (+41 -1)

📄 Description

Title

Issue: Resolves #1155

Summary

Images on Windows AMD with an image encoder built from tools/vision. The CPU build is used for --vision cpu. A Vulkan build (-DGGML_VULKAN=ON) runs on the Radeon and is used for --vision gpu. The ready-made zip still carries no encoder (shipping one in the zip is a separate step). Measured on a Ryzen AI Max+ 395 / Radeon 8060S, Windows 11.

This PR now carries only this part. The other changes it had are in their own PRs: #1803, #1804, #1805, #1806, #1807.

What changed

  • setup.py:
    • hip_vision() accepts --vision cpu on Windows when a hand-built encoder exists (engine\, build-vision\bin, engine\.previous or build-vision-vulkan\bin), and yes/gpu when the Vulkan build exists.
    • After the engine step, place_windows_encoder() puts the right build beside the engine, including after an engine update replaces the folder.
    • Without an encoder, images stay off as before, with a message pointing to the docs.
  • docs/AMD_HIP.md: a new "Images on Windows" section with both builds and the measurements below; the "Differences" line no longer says images are Linux-only.
  • tools/test_setup_amd.py:
    • a hand-built encoder in each place is used;
    • the Vulkan build gives gpu and replaces a CPU build beside the engine;
    • no encoder anywhere leaves images off.

Measured (UD-IQ4_XS, 1224 x 1584 phone photos of documents, 1024 image tokens, first read of each picture):

Photo CPU encoder Vulkan encoder
5-column settlement statement 31.7 s, 44/44 amounts 9.8 s, 44/44
permit list 27.7 s, permit number exact 6.2 s, exact

At the CPU default of 300 tokens, the same statement photo read only 32/44 amounts in the right column, and misread the year.

Extra Notes

  • Defaults: without a hand-built encoder setup does exactly what it did before; images are still refused for Windows AMD. Setup-only: no engine, server or CUDA/HIP/SYCL code changes.
  • Related: #1792 (Hugua700) makes find_vcvars() see Visual Studio 2026 for non-CUDA builds; the CPU encoder build needs it on such machines. #1156 was closed in favour of this PR.
  • Tests: all serve and tools/test_setup_* test files pass on main fb58e0d.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1789 **Author:** [@gt50](https://github.com/gt50) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `rentlens-fixes` --- ### 📝 Commits (2) - [`98ab5d2`](https://github.com/Niko1221/Strata/commit/98ab5d25d28e261a45a56f9f387982b04ffb3a76) setup: images on Windows AMD with a hand-built encoder, CPU or Vulkan (#1155) - [`7a4783e`](https://github.com/Niko1221/Strata/commit/7a4783ef777bc3a8c17a52c67c82ff09dcc2c06e) docs/AMD_HIP.md: SPIRV-Headers_DIR for older Vulkan SDKs, and the encoder's device on laptops with two GPUs (Hugua700, #1789) ### 📊 Changes **3 files changed** (+163 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/AMD_HIP.md` (+68 -2) 📝 `setup.py` (+54 -6) 📝 `tools/test_setup_amd.py` (+41 -1) </details> ### 📄 Description ## Title Issue: Resolves #1155 ## Summary Images on Windows AMD with an image encoder built from `tools/vision`. The CPU build is used for `--vision cpu`. A Vulkan build (`-DGGML_VULKAN=ON`) runs on the Radeon and is used for `--vision gpu`. The ready-made zip still carries no encoder (shipping one in the zip is a separate step). Measured on a Ryzen AI Max+ 395 / Radeon 8060S, Windows 11. This PR now carries only this part. The other changes it had are in their own PRs: #1803, #1804, #1805, #1806, #1807. ## What changed - **`setup.py`:** - `hip_vision()` accepts `--vision cpu` on Windows when a hand-built encoder exists (`engine\`, `build-vision\bin`, `engine\.previous` or `build-vision-vulkan\bin`), and `yes`/`gpu` when the Vulkan build exists. - After the engine step, `place_windows_encoder()` puts the right build beside the engine, including after an engine update replaces the folder. - Without an encoder, images stay off as before, with a message pointing to the docs. - **`docs/AMD_HIP.md`:** a new "Images on Windows" section with both builds and the measurements below; the "Differences" line no longer says images are Linux-only. - **`tools/test_setup_amd.py`:** - a hand-built encoder in each place is used; - the Vulkan build gives `gpu` and replaces a CPU build beside the engine; - no encoder anywhere leaves images off. Measured (UD-IQ4_XS, 1224 x 1584 phone photos of documents, 1024 image tokens, first read of each picture): | Photo | CPU encoder | Vulkan encoder | | --- | --- | --- | | 5-column settlement statement | 31.7 s, 44/44 amounts | 9.8 s, 44/44 | | permit list | 27.7 s, permit number exact | 6.2 s, exact | At the CPU default of 300 tokens, the same statement photo read only 32/44 amounts in the right column, and misread the year. ## Extra Notes - **Defaults:** without a hand-built encoder setup does exactly what it did before; images are still refused for Windows AMD. Setup-only: no engine, server or CUDA/HIP/SYCL code changes. - **Related:** #1792 (Hugua700) makes `find_vcvars()` see Visual Studio 2026 for non-CUDA builds; the CPU encoder build needs it on such machines. #1156 was closed in favour of this PR. - **Tests:** all `serve` and `tools/test_setup_*` test files pass on `main` fb58e0d. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:59 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3677
No description provided.