[PR #262] [CLOSED] HIP: gfx1201 (Radeon AI PRO R9700) support, faster packed byte intrinsics, and a gfx1201 hipBLASLt table #2534

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/262
Author: @ttio2tech
Created: 9/30/2026
Status: ❌ Closed

Base: main ← Head: hip-gfx1201


📝 Commits (1)

  • b235c16 HIP: gfx1201 (Radeon AI PRO R9700) support; dp4a, __byte_perm and the packed byte ops as single instructions on HIP (Q2_0 decode 58 -> 104 tok/s on the R9700); a gfx1201 hipBLASLt table

📊 Changes

6 files changed (+118 additions, -39 deletions)

View changed files

📝 cmake/hip_backend.cmake (+2 -2)
📝 include/strata/hip_compat/intrinsics.hpp (+34 -32)
📝 setup.py (+3 -2)
📝 src/core/device.cu (+3 -2)
📝 tests/hip/intrinsics.cpp (+50 -1)
➕ tools/hip/gfx1201-hipblaslt-100401.txt (+26 -0)

📄 Description

Adds support for gfx1201 (RDNA4, wave32) alongside gfx1100 and speeds up the HIP packed-byte paths.

  • The build, setup and device check accept gfx1201 wave32 beside gfx1100.
  • __dp4a used v_dot4 only on gfx1100; gfx1201 fell back to a per-byte loop in every decode GEMV.
  • HIP's __byte_perm indexes a byte array in scratch memory; the IQ4_XS/Q2_0 table lookups now use v_perm_b32 (IQ4_XS attn_qkv 229 -> 34 us, Q2_0 attn_q 95 -> 23 us on the R9700).
  • __vsub4, __vsubss4 and __vcmpne4 work on all four lanes at once instead of a per-lane loop (Q3_K 14-24%).
  • tests/hip/intrinsics checks __byte_perm and the packed byte ops on 1,024 random operands.
  • tools/hip/gfx1201-hipblaslt-100401.txt: dense prompt GEMM solutions measured on the R9700.

Q2_0 decode: 58 -> 104 tok/s on the R9700. The output of a greedy CLI run is bit-identical before and after the intrinsic changes.


🔄 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/262 **Author:** [@ttio2tech](https://github.com/ttio2tech) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `hip-gfx1201` --- ### 📝 Commits (1) - [`b235c16`](https://github.com/Niko1221/Strata/commit/b235c16a7123b3987a6fe9317c29b11c2a720bb8) HIP: gfx1201 (Radeon AI PRO R9700) support; dp4a, __byte_perm and the packed byte ops as single instructions on HIP (Q2_0 decode 58 -> 104 tok/s on the R9700); a gfx1201 hipBLASLt table ### 📊 Changes **6 files changed** (+118 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `cmake/hip_backend.cmake` (+2 -2) 📝 `include/strata/hip_compat/intrinsics.hpp` (+34 -32) 📝 `setup.py` (+3 -2) 📝 `src/core/device.cu` (+3 -2) 📝 `tests/hip/intrinsics.cpp` (+50 -1) ➕ `tools/hip/gfx1201-hipblaslt-100401.txt` (+26 -0) </details> ### 📄 Description Adds support for gfx1201 (RDNA4, wave32) alongside gfx1100 and speeds up the HIP packed-byte paths. - The build, setup and device check accept gfx1201 wave32 beside gfx1100. - `__dp4a` used `v_dot4` only on gfx1100; gfx1201 fell back to a per-byte loop in every decode GEMV. - HIP's `__byte_perm` indexes a byte array in scratch memory; the IQ4_XS/Q2_0 table lookups now use `v_perm_b32` (IQ4_XS attn_qkv 229 -> 34 us, Q2_0 attn_q 95 -> 23 us on the R9700). - `__vsub4`, `__vsubss4` and `__vcmpne4` work on all four lanes at once instead of a per-lane loop (Q3_K 14-24%). - `tests/hip/intrinsics` checks `__byte_perm` and the packed byte ops on 1,024 random operands. - `tools/hip/gfx1201-hipblaslt-100401.txt`: dense prompt GEMM solutions measured on the R9700. Q2_0 decode: 58 -> 104 tok/s on the R9700. The output of a greedy CLI run is bit-identical before and after the intrinsic changes. --- <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:06 +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#2534
No description provided.