[PR #442] [CLOSED] hip: add community gfx1012 support with version-gated legacy compatibility #2642

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/442
Author: @CC-David-CC
Created: 10/2/2026
Status: ❌ Closed

Base: main ← Head: contrib/gfx1012-community


📝 Commits (7)

  • e3211a4 hip: add experimental gfx1012 support and legacy BLAS compatibility
  • 3efbdf2 docs: record isolated gfx1012 validation and ROCm7 test gap
  • be9edbd hip: preserve Q2_0 signed zero on gfx1012 with legacy HIP
  • 569bf78 hip: retain native wave synchronization on HIP 7
  • 2d241fe docs: record gfx1012 and modern HIP validation results
  • 861da63 docs: record 0.1.34 rebase and targeted regression checks
  • 8d39730 docs: clarify branch selection, activation and public evidence

📊 Changes

17 files changed (+3739 additions, -10 deletions)

View changed files

📝 CMakeLists.txt (+11 -3)
📝 README.md (+9 -0)
📝 cmake/hip_backend.cmake (+12 -1)
➕ docs/COMMUNITY_GFX1012_REVIEW.md (+138 -0)
➕ docs/FORK_BRANCHES.md (+61 -0)
➕ docs/benchmarks/2026-10-01-community-gfx1012.json (+2163 -0)
➕ docs/benchmarks/2026-10-01-community-gfx1012.md (+50 -0)
➕ docs/benchmarks/2026-10-02-upstream-sync-hardware.json (+971 -0)
➕ docs/benchmarks/2026-10-02-upstream-sync-hardware.md (+58 -0)
📝 include/strata/hip_compat/cublas_v2.h (+41 -0)
📝 include/strata/hip_compat/cuda_runtime.h (+11 -0)
📝 include/strata/hip_compat/intrinsics.hpp (+31 -1)
➕ include/strata/hip_compat/math_constants.h (+4 -0)
📝 src/kernels/cuda/iq_kernels.cu (+11 -0)
📝 tests/hip/intrinsics.cpp (+25 -5)
➕ tests/hip/prefill_gemm.cpp (+93 -0)
➕ tests/hip/q2_zero.cpp (+50 -0)

📄 Description

Updated to upstream 0.1.34 (1678de3). Fresh targeted builds and regressions passed; the full fleet/context performance numbers below remain measurements of the prior 0.1.33 source.

Rebase checks

This is the hardware-only split requested in #323, based on upstream
0.1.34 (1678de3). The tested card is the consumer AMD Radeon RX 5500 XT
8GB, gfx1012
. It remains in the community/unvalidated architecture list.

Changes

  • Admit gfx1012 for manual HIP builds.
  • Signed-byte dot via RDNA1 SDWA, adapted from pinned llama.cpp/ggml with MIT
    attribution preserved.
  • Version-gate legacy wave synchronization and host-allocation API names;
    HIP 7 retains its native operations and spellings.
  • For hipBLAS 0.x, use the real rocBLAS handle/workspace API. Newer hipBLAS
    retains its existing implementation.
  • Preserve Q2_0 FP16 signed zero on gfx1012/HIP below 7, with a regression test.

Shared serving and performance alternatives are separate contributions. The P4
tests worked using upstream's existing STRATA_EXPERIMENTAL_SM60; this branch
adds no SM61 flag, Pascal initializer or FP32 GEMM fallback.

Validation

Check RX 5500 XT / HIP 5.7.1 RX 7900 XTX / HIP 7.15
Committed-source build Pass Pass
Intrinsics and wave/shared-memory synchronization Pass Pass
BF16/F16 prefill GEMM against CPU reference Pass Pass
1024-value signed-zero regression Pass Pass
Real-weight expert parity, layers 0/3/20/47 Pass Pass
Upstream versus hardware-patch token/state identity Upstream does not admit gfx1012 Pass, 8 requests per arm

The independent hardware build completed an 8K-input short code request at
15.30 generation tok/s, with 106.17 s prefill and 114.34 s total for 125
output tokens. Short prose was 11.68 tok/s, 118.14 s total for 218 output tokens.

It also completed 8192 input / 2591 output with 131072
total context tokens allocated
, at 15.66 generation tok/s,
139.54 s prefill and 304.98 s total. This uses Q8 KV
streaming with 32768 resident cells. It is an allocation test, not a full
128K-input test
.

The combined hardware/serving tree completed full 8K, 32K and 64K input in both
MTP modes. These combined measurements are labelled separately. Full 32K/64K
input was not repeated on the hardware-only tree, and full 128K input on the
5500 XT remains untested.

Hardware, scope and reproduction
| Measured results
| Machine-readable evidence

GSQ-RCO IQ3_S, Q8 KV, text only. Other RDNA1 cards, Windows HIP, vision and
multi-GPU behavior are untested. The older-host journal contained a workqueue
CPU-time warning; no GPU reset or memory-fault entry appeared in that window.

Credit: Niko1221/Strata supplies the engine,
expert cache and MTP. The RDNA1 dot implementation is adapted from pinned
llama.cpp/ggml 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/442 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `contrib/gfx1012-community` --- ### 📝 Commits (7) - [`e3211a4`](https://github.com/Niko1221/Strata/commit/e3211a40a53f242a24e0dcf855264479d37e4c70) hip: add experimental gfx1012 support and legacy BLAS compatibility - [`3efbdf2`](https://github.com/Niko1221/Strata/commit/3efbdf2098c5e94e2501c4f985c744474a491c40) docs: record isolated gfx1012 validation and ROCm7 test gap - [`be9edbd`](https://github.com/Niko1221/Strata/commit/be9edbd4b95cd667ad6ad0f9e656d2cc3e894b65) hip: preserve Q2_0 signed zero on gfx1012 with legacy HIP - [`569bf78`](https://github.com/Niko1221/Strata/commit/569bf78ef632d918473f3bc5ac45551bb3c61473) hip: retain native wave synchronization on HIP 7 - [`2d241fe`](https://github.com/Niko1221/Strata/commit/2d241fee2a68c1729c56952efc5c89cc768fbec8) docs: record gfx1012 and modern HIP validation results - [`861da63`](https://github.com/Niko1221/Strata/commit/861da63e967e1e9239d7583580befb34b26cdb73) docs: record 0.1.34 rebase and targeted regression checks - [`8d39730`](https://github.com/Niko1221/Strata/commit/8d397303a3b81d9e9ca4eff438a09dae30a002fa) docs: clarify branch selection, activation and public evidence ### 📊 Changes **17 files changed** (+3739 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+11 -3) 📝 `README.md` (+9 -0) 📝 `cmake/hip_backend.cmake` (+12 -1) ➕ `docs/COMMUNITY_GFX1012_REVIEW.md` (+138 -0) ➕ `docs/FORK_BRANCHES.md` (+61 -0) ➕ `docs/benchmarks/2026-10-01-community-gfx1012.json` (+2163 -0) ➕ `docs/benchmarks/2026-10-01-community-gfx1012.md` (+50 -0) ➕ `docs/benchmarks/2026-10-02-upstream-sync-hardware.json` (+971 -0) ➕ `docs/benchmarks/2026-10-02-upstream-sync-hardware.md` (+58 -0) 📝 `include/strata/hip_compat/cublas_v2.h` (+41 -0) 📝 `include/strata/hip_compat/cuda_runtime.h` (+11 -0) 📝 `include/strata/hip_compat/intrinsics.hpp` (+31 -1) ➕ `include/strata/hip_compat/math_constants.h` (+4 -0) 📝 `src/kernels/cuda/iq_kernels.cu` (+11 -0) 📝 `tests/hip/intrinsics.cpp` (+25 -5) ➕ `tests/hip/prefill_gemm.cpp` (+93 -0) ➕ `tests/hip/q2_zero.cpp` (+50 -0) </details> ### 📄 Description Updated to upstream 0.1.34 (`1678de3`). Fresh targeted builds and regressions passed; the full fleet/context performance numbers below remain measurements of the prior 0.1.33 source. [Rebase checks](https://github.com/CC-David-CC/Strata-a5500/blob/contrib/gfx1012-community/docs/benchmarks/2026-10-02-upstream-sync-hardware.md) This is the hardware-only split requested in #323, based on upstream 0.1.34 (`1678de3`). The tested card is the **consumer AMD Radeon RX 5500 XT 8GB, gfx1012**. It remains in the community/unvalidated architecture list. ## Changes - Admit gfx1012 for manual HIP builds. - Signed-byte dot via RDNA1 SDWA, adapted from pinned llama.cpp/ggml with MIT attribution preserved. - Version-gate legacy wave synchronization and host-allocation API names; HIP 7 retains its native operations and spellings. - For hipBLAS 0.x, use the real rocBLAS handle/workspace API. Newer hipBLAS retains its existing implementation. - Preserve Q2_0 FP16 signed zero on gfx1012/HIP below 7, with a regression test. Shared serving and performance alternatives are separate contributions. The P4 tests worked using upstream's existing `STRATA_EXPERIMENTAL_SM60`; this branch adds no SM61 flag, Pascal initializer or FP32 GEMM fallback. ## Validation | Check | RX 5500 XT / HIP 5.7.1 | RX 7900 XTX / HIP 7.15 | |---|---|---| | Committed-source build | Pass | Pass | | Intrinsics and wave/shared-memory synchronization | Pass | Pass | | BF16/F16 prefill GEMM against CPU reference | Pass | Pass | | 1024-value signed-zero regression | Pass | Pass | | Real-weight expert parity, layers 0/3/20/47 | Pass | Pass | | Upstream versus hardware-patch token/state identity | Upstream does not admit gfx1012 | Pass, 8 requests per arm | The independent hardware build completed an 8K-input short code request at **15.30 generation tok/s**, with 106.17 s prefill and 114.34 s total for 125 output tokens. Short prose was 11.68 tok/s, 118.14 s total for 218 output tokens. It also completed **8192 input / 2591 output with 131072 total context tokens allocated**, at 15.66 generation tok/s, 139.54 s prefill and 304.98 s total. This uses Q8 KV streaming with 32768 resident cells. It is an allocation test, **not a full 128K-input test**. The combined hardware/serving tree completed full 8K, 32K and 64K input in both MTP modes. These combined measurements are labelled separately. Full 32K/64K input was not repeated on the hardware-only tree, and full 128K input on the 5500 XT remains untested. [Hardware, scope and reproduction](https://github.com/CC-David-CC/Strata-a5500/blob/contrib/gfx1012-community/docs/COMMUNITY_GFX1012_REVIEW.md) | [Measured results](https://github.com/CC-David-CC/Strata-a5500/blob/contrib/gfx1012-community/docs/benchmarks/2026-10-01-community-gfx1012.md) | [Machine-readable evidence](https://github.com/CC-David-CC/Strata-a5500/blob/contrib/gfx1012-community/docs/benchmarks/2026-10-01-community-gfx1012.json) GSQ-RCO IQ3_S, Q8 KV, text only. Other RDNA1 cards, Windows HIP, vision and multi-GPU behavior are untested. The older-host journal contained a workqueue CPU-time warning; no GPU reset or memory-fault entry appeared in that window. Credit: [Niko1221/Strata](https://github.com/Niko1221/Strata) supplies the engine, expert cache and MTP. The RDNA1 dot implementation is adapted from pinned llama.cpp/ggml code. --- <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: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#2642
No description provided.