[PR #247] [CLOSED] HIP: Windows and gfx1201 (RX 9070) #2527

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/247
Author: @jagsan-cyber
Created: 9/30/2026
Status: ❌ Closed

Base: main ← Head: win-hip-gfx1201


📝 Commits (5)

  • aea1ec1 HIP: run Qwen3.8-Flash-Next on Windows gfx1201
  • c7a15de Merge upstream 0.1.29 into the Windows gfx1201 branch
  • 9aafcc4 README: lead with the RX 9070 measurements
  • ca04118 README: rewrite the fork page around the RX 9070
  • b672e72 README: record the int8 KV streaming speed

📊 Changes

18 files changed (+538 additions, -303 deletions)

View changed files

📝 CMakeLists.txt (+1 -1)
📝 README.md (+61 -194)
📝 cmake/hip_backend.cmake (+25 -9)
📝 docs/AMD_HIP.md (+22 -14)
📝 include/strata/core/native_head.hpp (+1 -0)
📝 include/strata/hip_compat/cuda_runtime.h (+8 -0)
📝 include/strata/hip_compat/intrinsics.hpp (+4 -4)
📝 include/strata/kernels/cpu/expert_layout.hpp (+1 -1)
📝 setup.py (+241 -39)
📝 src/core/device.cu (+16 -4)
📝 src/core/device_main.cpp (+1 -1)
📝 src/core/expert_source.cpp (+14 -11)
📝 src/core/native_head.cpp (+20 -1)
📝 src/kernels/cpu/expert_layout.cpp (+12 -4)
📝 src/kernels/cuda/iq_kernels.cu (+36 -2)
📝 src/prefill/gemm.cu (+18 -0)
📝 src/program/generate.cpp (+45 -8)
📝 tools/iq_pack.py (+12 -10)

📄 Description

Summary

  • Opt-in HIP builds accept wave32 gfx1100, gfx1200, and gfx1201 on Linux or Windows. Windows setup uses an installed ROCm tree that contains the card's bitcode, preferring the ROCm 10 rocm-sdk over the HIP SDK when ROCM_PATH is unset.
  • The host compiler is ROCm clang. CMake rejects mixing MSVC with Clang HIP. The CUDA compatibility header is force-included with /FI for MSVC and -include otherwise.
  • A 3-shard Unsloth GGUF loads through the native pack: gate, up, and down may sit in different shards, Q8_0 expert and embedding rows have a GPU dot, and output.weight is accepted when general.architecture is only on the first shard.
  • On gfx1201, hipBLAS can return success and still leave hipErrorInvalidValue set. That sticky error is cleared after a successful GEMM. An F32 ple_conv1d is converted to FP16 at startup, because the convolution kernels read FP16.

Test

Windows 11, AMD Radeon RX 9070 (gfx1201, 16 GB), ROCm 10.0.0, Unsloth Qwen3.8-Flash-Next UD-Q3_K_XL. The engine probes the GPU and serves the model. Greedy short prompts return coherent answers (2, 7, 東京). A 4445-token prompt prefilled at about 238 tok/s and then decoded at about 23 tok/s with MTP. Context 131072 fits; the expert cache is then 2357 slots / 4.97 GiB. These rates are for this machine, not the published RTX 5070 or RX 7900 XTX numbers.

A prebuilt strata.exe for this commit is on the fork release below. It still needs the ROCm 10 runtime on PATH. It is not part of this diff.

https://github.com/jagsan-cyber/Strata/releases/tag/win-gfx1201-2026-09-30


🔄 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/247 **Author:** [@jagsan-cyber](https://github.com/jagsan-cyber) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `win-hip-gfx1201` --- ### 📝 Commits (5) - [`aea1ec1`](https://github.com/Niko1221/Strata/commit/aea1ec11ea1a7b4dcbf232a88fa23b85798ab682) HIP: run Qwen3.8-Flash-Next on Windows gfx1201 - [`c7a15de`](https://github.com/Niko1221/Strata/commit/c7a15de9d3e8f8a728aee7381b0f268e6194edd2) Merge upstream 0.1.29 into the Windows gfx1201 branch - [`9aafcc4`](https://github.com/Niko1221/Strata/commit/9aafcc492311801635774b0b37d155788db516c8) README: lead with the RX 9070 measurements - [`ca04118`](https://github.com/Niko1221/Strata/commit/ca041182c8e1b521119154c23a8f20accb28dd01) README: rewrite the fork page around the RX 9070 - [`b672e72`](https://github.com/Niko1221/Strata/commit/b672e725ad2842dd68c17521d793785df95d5da1) README: record the int8 KV streaming speed ### 📊 Changes **18 files changed** (+538 additions, -303 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+1 -1) 📝 `README.md` (+61 -194) 📝 `cmake/hip_backend.cmake` (+25 -9) 📝 `docs/AMD_HIP.md` (+22 -14) 📝 `include/strata/core/native_head.hpp` (+1 -0) 📝 `include/strata/hip_compat/cuda_runtime.h` (+8 -0) 📝 `include/strata/hip_compat/intrinsics.hpp` (+4 -4) 📝 `include/strata/kernels/cpu/expert_layout.hpp` (+1 -1) 📝 `setup.py` (+241 -39) 📝 `src/core/device.cu` (+16 -4) 📝 `src/core/device_main.cpp` (+1 -1) 📝 `src/core/expert_source.cpp` (+14 -11) 📝 `src/core/native_head.cpp` (+20 -1) 📝 `src/kernels/cpu/expert_layout.cpp` (+12 -4) 📝 `src/kernels/cuda/iq_kernels.cu` (+36 -2) 📝 `src/prefill/gemm.cu` (+18 -0) 📝 `src/program/generate.cpp` (+45 -8) 📝 `tools/iq_pack.py` (+12 -10) </details> ### 📄 Description ## Summary - Opt-in HIP builds accept wave32 `gfx1100`, `gfx1200`, and `gfx1201` on Linux or Windows. Windows setup uses an installed ROCm tree that contains the card's bitcode, preferring the ROCm 10 `rocm-sdk` over the HIP SDK when `ROCM_PATH` is unset. - The host compiler is ROCm clang. CMake rejects mixing MSVC with Clang HIP. The CUDA compatibility header is force-included with `/FI` for MSVC and `-include` otherwise. - A 3-shard Unsloth GGUF loads through the native pack: gate, up, and down may sit in different shards, Q8_0 expert and embedding rows have a GPU dot, and `output.weight` is accepted when `general.architecture` is only on the first shard. - On gfx1201, hipBLAS can return success and still leave `hipErrorInvalidValue` set. That sticky error is cleared after a successful GEMM. An F32 `ple_conv1d` is converted to FP16 at startup, because the convolution kernels read FP16. ## Test Windows 11, AMD Radeon RX 9070 (`gfx1201`, 16 GB), ROCm 10.0.0, Unsloth Qwen3.8-Flash-Next UD-Q3_K_XL. The engine probes the GPU and serves the model. Greedy short prompts return coherent answers (`2`, `7`, `東京`). A 4445-token prompt prefilled at about 238 tok/s and then decoded at about 23 tok/s with MTP. Context 131072 fits; the expert cache is then 2357 slots / 4.97 GiB. These rates are for this machine, not the published RTX 5070 or RX 7900 XTX numbers. A prebuilt `strata.exe` for this commit is on the fork release below. It still needs the ROCm 10 runtime on `PATH`. It is not part of this diff. https://github.com/jagsan-cyber/Strata/releases/tag/win-gfx1201-2026-09-30 --- <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:00 +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#2527
No description provided.