[PR #381] [CLOSED] Add HIP image encoder support and Linux AMD GPU telemetry #2610

Closed
opened 2026-11-04 02:01:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/381
Author: @Wesleyvdk
Created: 10/1/2026
Status: ❌ Closed

Base: main ← Head: pr/amd-vision-linux-monitor


📝 Commits (1)

  • 8065a25 Add HIP image encoder support and Linux AMD GPU telemetry

📊 Changes

10 files changed (+394 additions, -51 deletions)

View changed files

📝 README.md (+3 -1)
📝 docs/AMD_HIP.md (+37 -3)
📝 serve/server.py (+10 -8)
📝 serve/telemetry.py (+126 -3)
📝 serve/web/app.js (+4 -2)
📝 setup.py (+52 -29)
📝 tools/iq_pack.py (+4 -4)
📝 tools/test_iq_pack.py (+26 -1)
➕ tools/test_setup_hip.py (+122 -0)
📝 tools/vision/CMakeLists.txt (+10 -0)

📄 Description

Summary

Enable the existing image encoder on Linux AMD HIP installations, restore AMD GPU readings in the Monitor, and fix compatibility packing for native IQ PLE keys.

HIP image input

  • Add STRATA_VISION_HIP to the vision helper's CMake build, forwarding GGML_HIP and enabling PIC for ROCm linking. Reject simultaneous CUDA/HIP helper builds.
  • Honor --vision gpu, --vision cpu, and --vision none with the HIP backend. Use the existing projector download, GPU selection, and VRAM reservation paths.
  • Cache the engine and encoder independently, track encoder mode/source/architectures, and preserve the saved mode during updates.
  • Include CMake helper sources in engine cache invalidation.

Native IQ PLE packing

Keep IQ3_XXS and IQ4_XS PLE keys in the source GGUF, matching the formats already supported by NativeDense. Previously, --compat-bf16 converted these keys and an OrcaRouter IQ3_XXS pack failed at startup with native dense: incompatible matrix blk.1.ple_key.weight.

Linux AMD Monitor

Read amdgpu sysfs/hwmon for GPU utilization, VRAM, temperature, power/cap, and PCIe link information. Map HIP indices through KFD topology to DRM render nodes, so integrated graphics do not select the wrong card. Pass the configured backend through telemetry and the image request VRAM check.

Keep missing sensors unavailable. Read PCIe traffic only when the driver exposes pcie_bw; the tested RX 9070 XT reports Gen5 x16 but does not expose traffic counters. The UI labels this as “Throughput unavailable.”

Validation already performed

Native Omarchy/Arch Linux, RX 9070 XT 16 GB (gfx1201), Ryzen 9 9900X, 64 GB RAM, system ROCm 7.2.4, Strata 0.1.31, and the repository's pinned llama.cpp revision. Model: OrcaRouter Qwen3.8-Flash-Next IQ3_XXS with matching BF16 image projector.

For the image and packer changes, before the Monitor patch:

  • Installer checks: 47 passed, including the HIP helper build/cache checks included here.
  • Server checks: 98 passed, 2 Windows-only checks skipped.
  • Packer checks: 23 passed, including native IQ PLE indexing checks.
  • Focused HIP checks: 7 passed, 1 skipped because no gfx1201 hipBLASLt tuning table is shipped.
  • Native device allocation self-test passed; real IQ3 PLE parity passed three graph replays.
  • HIP image helper produced finite, distinct red/blue embeddings (49 tokens, width 2560).
  • Live OpenAI and Anthropic image requests recognized colors, OCR strata42, and a blue circle in separate prompts. Browser attachment input worked. A combined OCR/shape prompt returned only the OCR result.

After the Monitor patch, a manual live /metrics check reported the correct discrete GPU and populated load, VRAM, temperature, power/cap, and PCIe Gen5 x16. Traffic stayed unavailable as expected. The regression suites were not rerun after that patch.

Scope and remaining validation

Image checks used a 32K configuration. A later 128K configuration started successfully; this does not establish successful full-window inference. Sustained vision workloads, other AMD GPUs, image encoding across several GPUs, and controlled performance/quality comparisons remain untested.

Ready for maintainer review. Hardware validation covers the RX 9070 XT available to the contributor; additional cards remain outside the reported validation scope.


🔄 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/381 **Author:** [@Wesleyvdk](https://github.com/Wesleyvdk) **Created:** 10/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/amd-vision-linux-monitor` --- ### 📝 Commits (1) - [`8065a25`](https://github.com/Niko1221/Strata/commit/8065a25ddba5175833eb55af6d9e6ab772c0e0fc) Add HIP image encoder support and Linux AMD GPU telemetry ### 📊 Changes **10 files changed** (+394 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -1) 📝 `docs/AMD_HIP.md` (+37 -3) 📝 `serve/server.py` (+10 -8) 📝 `serve/telemetry.py` (+126 -3) 📝 `serve/web/app.js` (+4 -2) 📝 `setup.py` (+52 -29) 📝 `tools/iq_pack.py` (+4 -4) 📝 `tools/test_iq_pack.py` (+26 -1) ➕ `tools/test_setup_hip.py` (+122 -0) 📝 `tools/vision/CMakeLists.txt` (+10 -0) </details> ### 📄 Description ## Summary Enable the existing image encoder on Linux AMD HIP installations, restore AMD GPU readings in the Monitor, and fix compatibility packing for native IQ PLE keys. ### HIP image input - Add `STRATA_VISION_HIP` to the vision helper's CMake build, forwarding `GGML_HIP` and enabling PIC for ROCm linking. Reject simultaneous CUDA/HIP helper builds. - Honor `--vision gpu`, `--vision cpu`, and `--vision none` with the HIP backend. Use the existing projector download, GPU selection, and VRAM reservation paths. - Cache the engine and encoder independently, track encoder mode/source/architectures, and preserve the saved mode during updates. - Include CMake helper sources in engine cache invalidation. ### Native IQ PLE packing Keep IQ3_XXS and IQ4_XS PLE keys in the source GGUF, matching the formats already supported by `NativeDense`. Previously, `--compat-bf16` converted these keys and an OrcaRouter IQ3_XXS pack failed at startup with `native dense: incompatible matrix blk.1.ple_key.weight`. ### Linux AMD Monitor Read amdgpu sysfs/hwmon for GPU utilization, VRAM, temperature, power/cap, and PCIe link information. Map HIP indices through KFD topology to DRM render nodes, so integrated graphics do not select the wrong card. Pass the configured backend through telemetry and the image request VRAM check. Keep missing sensors unavailable. Read PCIe traffic only when the driver exposes `pcie_bw`; the tested RX 9070 XT reports Gen5 x16 but does not expose traffic counters. The UI labels this as “Throughput unavailable.” ## Validation already performed Native Omarchy/Arch Linux, RX 9070 XT 16 GB (gfx1201), Ryzen 9 9900X, 64 GB RAM, system ROCm 7.2.4, Strata 0.1.31, and the repository's pinned llama.cpp revision. Model: OrcaRouter Qwen3.8-Flash-Next IQ3_XXS with matching BF16 image projector. For the image and packer changes, before the Monitor patch: - Installer checks: 47 passed, including the HIP helper build/cache checks included here. - Server checks: 98 passed, 2 Windows-only checks skipped. - Packer checks: 23 passed, including native IQ PLE indexing checks. - Focused HIP checks: 7 passed, 1 skipped because no gfx1201 hipBLASLt tuning table is shipped. - Native device allocation self-test passed; real IQ3 PLE parity passed three graph replays. - HIP image helper produced finite, distinct red/blue embeddings (49 tokens, width 2560). - Live OpenAI and Anthropic image requests recognized colors, OCR `strata42`, and a blue circle in separate prompts. Browser attachment input worked. A combined OCR/shape prompt returned only the OCR result. After the Monitor patch, a manual live `/metrics` check reported the correct discrete GPU and populated load, VRAM, temperature, power/cap, and PCIe Gen5 x16. Traffic stayed unavailable as expected. The regression suites were not rerun after that patch. ## Scope and remaining validation Image checks used a 32K configuration. A later 128K configuration started successfully; this does not establish successful full-window inference. Sustained vision workloads, other AMD GPUs, image encoding across several GPUs, and controlled performance/quality comparisons remain untested. Ready for maintainer review. Hardware validation covers the RX 9070 XT available to the contributor; additional cards remain outside the reported validation scope. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:44 +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#2610
No description provided.