[PR #121] [CLOSED] Add gfx1100 HIP support with tuned prefill and bounded expert uploads #2468

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/121
Author: @2jztricks
Created: 9/29/2026
Status: ❌ Closed

Base: main ← Head: feat/hip-gfx1100-prefill


📝 Commits (8)

  • 8b575c4 Add experimental gfx1100 HIP backend and native mmap support
  • ea2a87b Add tuned gfx1100 prefill and resident expert serving support
  • 3a1dca6 Load supported native Orca PLE keys and verify real-matrix replay
  • b90591e Bound HIP expert uploads with reusable pinned staging
  • 014d9fc Record fresh gfx1100 throughput and validation results
  • 9568e78 Account for clean reclaimable cache in cgroup resident budgets
  • d797787 docs: record final guarded HIP runtime measurements
  • 49d0a4b docs: keep throughput evidence distinct from task correctness

📊 Changes

51 files changed (+5207 additions, -187 deletions)

View changed files

📝 CMakeLists.txt (+255 -102)
📝 README.md (+3 -0)
➕ cmake/hip_backend.cmake (+58 -0)
➕ docs/AMD_HIP.md (+138 -0)
➕ docs/AMD_HIP_PERFORMANCE.md (+144 -0)
➕ docs/benchmarks/2026-09-29-gfx1100.json (+299 -0)
📝 include/strata/core/expert_cache.hpp (+6 -0)
📝 include/strata/core/expert_source.hpp (+62 -2)
➕ include/strata/hip_compat/cublas_v2.h (+19 -0)
➕ include/strata/hip_compat/cuda_fp16.h (+2 -0)
➕ include/strata/hip_compat/cuda_runtime.h (+100 -0)
➕ include/strata/hip_compat/cuda_runtime_api.h (+2 -0)
➕ include/strata/hip_compat/intrinsics.hpp (+125 -0)
📝 include/strata/kernels/bf16_bits.hpp (+9 -1)
📝 include/strata/kernels/f16_bits.hpp (+9 -1)
📝 include/strata/kernels/mrope.hpp (+1 -1)
📝 include/strata/kernels/native_qsa_indexer.hpp (+6 -0)
📝 include/strata/kernels/rope.hpp (+1 -1)
📝 include/strata/platform/direct_file.hpp (+1 -1)
📝 include/strata/prefill/gemm.hpp (+2 -0)

...and 31 more files

📄 Description

RX 7900 XTX users need a native HIP path and bounded host-memory transfers to serve Flash Next reliably. This replaces #94 with the complete opt-in gfx1100 backend rebased onto current main, adds tuned prefill, and includes fresh performance evidence.

  • Retains HIP runtime/wave32 compatibility, native mmap layout validation, MTP and numerical handoff checks.
  • Enables pinned-GGML MMQ on HIP and guarded hipBLASLt tuning for gfx1100/version 100100. Adds opt-in native embedding/QSA batching, selectively adapted from #108 (acd4872), preserving upstream borrowing and CUDA paths.
  • Adds static CPU-resident expert complements with available-RAM/cgroup guards, a POSIX PLE read pool, and reusable pinned HIP expert-upload staging. The staging fix is used for both startup and borrowed-cache refills; an intermediate package without it stalled and was rejected.

Fresh 2026-09-29 measurements on RX 7900 XTX at the unchanged 272 W cap, Orca Flash Next IQ3_XXS, MTP 4, configured 262144 context, 8192 prefill batch:

Request Prefill tokens/s Output tokens/s Total request time
4210 tokens, first use 447.5 55.5 11.729 s
8830 tokens, first use at this size 873.7 55.7 12.420 s
4210 tokens, warmed 901.1 56.7 6.937 s
8830 tokens, warmed 966.5 59.2 11.314 s

Each fresh prompt reused zero KV tokens and generated the intentional 128-token cap. All four fresh prompts and four cached follow-ups completed. A newly measured same-session existing HIP runtime control gives 1.80–2.02x prefill and 40–46% lower fresh-request wall time. This is not a comparison against unmodified upstream, and configured 262K capacity is not a full-context benchmark.

Validation: HIP and CUDA executable builds; 29/29 selected HIP CTests; three real IQ3_XXS PLE matrix graph replays; POSIX direct-file queued reads/short EOF/wake/close/reopen test. The two excluded CTests and all measurement conditions, exact source/binary identifiers and sanitized raw timings are documented in docs/AMD_HIP_PERFORMANCE.md. CUDA has compile validation here, not a new CUDA throughput run. These numerical and capped-throughput tests do not establish coding quality, full-context/vision behavior or mixed-vendor execution.

Supersedes #94. Related: #48. No model weights or personal serving/gateway configuration are included.


🔄 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/121 **Author:** [@2jztricks](https://github.com/2jztricks) **Created:** 9/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/hip-gfx1100-prefill` --- ### 📝 Commits (8) - [`8b575c4`](https://github.com/Niko1221/Strata/commit/8b575c46dcb69e7cab59c92a633a4dc26cfeede5) Add experimental gfx1100 HIP backend and native mmap support - [`ea2a87b`](https://github.com/Niko1221/Strata/commit/ea2a87b91728f6dfc512b697dda5c0307752ec8e) Add tuned gfx1100 prefill and resident expert serving support - [`3a1dca6`](https://github.com/Niko1221/Strata/commit/3a1dca623e771cc36cbacac72295916ca4a2e7d9) Load supported native Orca PLE keys and verify real-matrix replay - [`b90591e`](https://github.com/Niko1221/Strata/commit/b90591e88ce806da6e6966d2e5d45b444d040190) Bound HIP expert uploads with reusable pinned staging - [`014d9fc`](https://github.com/Niko1221/Strata/commit/014d9fca2da5d45d2829a74b593cb755e8e8fbc0) Record fresh gfx1100 throughput and validation results - [`9568e78`](https://github.com/Niko1221/Strata/commit/9568e78da663e6b224ab96d57baf450717b36e73) Account for clean reclaimable cache in cgroup resident budgets - [`d797787`](https://github.com/Niko1221/Strata/commit/d797787b4e388aac89933d6e26286294da3adb78) docs: record final guarded HIP runtime measurements - [`49d0a4b`](https://github.com/Niko1221/Strata/commit/49d0a4bfaea4a6b6fe433c44b2b255e318216814) docs: keep throughput evidence distinct from task correctness ### 📊 Changes **51 files changed** (+5207 additions, -187 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+255 -102) 📝 `README.md` (+3 -0) ➕ `cmake/hip_backend.cmake` (+58 -0) ➕ `docs/AMD_HIP.md` (+138 -0) ➕ `docs/AMD_HIP_PERFORMANCE.md` (+144 -0) ➕ `docs/benchmarks/2026-09-29-gfx1100.json` (+299 -0) 📝 `include/strata/core/expert_cache.hpp` (+6 -0) 📝 `include/strata/core/expert_source.hpp` (+62 -2) ➕ `include/strata/hip_compat/cublas_v2.h` (+19 -0) ➕ `include/strata/hip_compat/cuda_fp16.h` (+2 -0) ➕ `include/strata/hip_compat/cuda_runtime.h` (+100 -0) ➕ `include/strata/hip_compat/cuda_runtime_api.h` (+2 -0) ➕ `include/strata/hip_compat/intrinsics.hpp` (+125 -0) 📝 `include/strata/kernels/bf16_bits.hpp` (+9 -1) 📝 `include/strata/kernels/f16_bits.hpp` (+9 -1) 📝 `include/strata/kernels/mrope.hpp` (+1 -1) 📝 `include/strata/kernels/native_qsa_indexer.hpp` (+6 -0) 📝 `include/strata/kernels/rope.hpp` (+1 -1) 📝 `include/strata/platform/direct_file.hpp` (+1 -1) 📝 `include/strata/prefill/gemm.hpp` (+2 -0) _...and 31 more files_ </details> ### 📄 Description RX 7900 XTX users need a native HIP path and bounded host-memory transfers to serve Flash Next reliably. This replaces #94 with the complete opt-in gfx1100 backend rebased onto current main, adds tuned prefill, and includes fresh performance evidence. - Retains HIP runtime/wave32 compatibility, native mmap layout validation, MTP and numerical handoff checks. - Enables pinned-GGML MMQ on HIP and guarded hipBLASLt tuning for gfx1100/version 100100. Adds opt-in native embedding/QSA batching, selectively adapted from #108 (acd4872), preserving upstream borrowing and CUDA paths. - Adds static CPU-resident expert complements with available-RAM/cgroup guards, a POSIX PLE read pool, and reusable pinned HIP expert-upload staging. The staging fix is used for both startup and borrowed-cache refills; an intermediate package without it stalled and was rejected. Fresh 2026-09-29 measurements on RX 7900 XTX at the unchanged 272 W cap, Orca Flash Next IQ3_XXS, MTP 4, configured 262144 context, 8192 prefill batch: | Request | Prefill tokens/s | Output tokens/s | Total request time | | --- | ---: | ---: | ---: | | 4210 tokens, first use | 447.5 | 55.5 | 11.729 s | | 8830 tokens, first use at this size | 873.7 | 55.7 | 12.420 s | | 4210 tokens, warmed | 901.1 | 56.7 | 6.937 s | | 8830 tokens, warmed | 966.5 | 59.2 | 11.314 s | Each fresh prompt reused zero KV tokens and generated the intentional 128-token cap. All four fresh prompts and four cached follow-ups completed. A newly measured same-session existing HIP runtime control gives 1.80–2.02x prefill and 40–46% lower fresh-request wall time. This is not a comparison against unmodified upstream, and configured 262K capacity is not a full-context benchmark. Validation: HIP and CUDA executable builds; 29/29 selected HIP CTests; three real IQ3_XXS PLE matrix graph replays; POSIX direct-file queued reads/short EOF/wake/close/reopen test. The two excluded CTests and all measurement conditions, exact source/binary identifiers and sanitized raw timings are documented in `docs/AMD_HIP_PERFORMANCE.md`. CUDA has compile validation here, not a new CUDA throughput run. These numerical and capped-throughput tests do not establish coding quality, full-context/vision behavior or mixed-vendor execution. Supersedes #94. Related: #48. No model weights or personal serving/gateway configuration are included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:00:25 +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#2468
No description provided.