[PR #192] [CLOSED] HIP: support RDNA3 gfx1101/gfx1102 (RX 7600/7700/7800), not only gfx1100 #2500

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

📋 Pull Request Information

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

Base: main ← Head: hip-rdna3-gfx1101-gfx1102


📝 Commits (1)

  • f08e3fa HIP: support RDNA3 gfx1101/gfx1102 (RX 7600/7700/7800), not only gfx1100

📊 Changes

6 files changed (+14 additions, -12 deletions)

View changed files

📝 CMakeLists.txt (+1 -1)
📝 cmake/hip_backend.cmake (+2 -2)
📝 include/strata/hip_compat/intrinsics.hpp (+1 -1)
📝 setup.py (+5 -4)
📝 src/core/device.cu (+4 -3)
📝 src/core/device_main.cpp (+1 -1)

📄 Description

What

The experimental HIP backend was locked to gfx1100 (RX 7900 XT/XTX) in four places. This PR widens those checks to also accept gfx1101 and gfx1102, the rest of the RDNA3 wave32 family:

  • cmake/hip_backend.cmake: accept CMAKE_HIP_ARCHITECTURES matching gfx110[012]
  • src/core/device.cu: the runtime device check accepts gfx1100/1101/1102 (still requires wave32)
  • include/strata/hip_compat/intrinsics.hpp: use __builtin_amdgcn_sudot4 for dp4a on gfx1101/gfx1102 too, not just the scalar fallback
  • setup.py: AMD_ARCHS / AMD_NAMES list the RX 7700/7800 (gfx1101) and RX 7600 (gfx1102), and the "not supported" messages are updated to match
  • src/core/device_main.cpp: strata-device prints "RDNA3 wave32" instead of a hard-coded gfx1100

Unrelated fix: CMakeLists.txt guards the native_mmvq_multi test target with EXISTS. bench/micro/native_mmvq_multi.cpp is missing from the repository, so configuring with STRATA_BUILD_TESTS=ON failed.

Why

gfx1101 and gfx1102 use the same RDNA3 wave32 ISA as gfx1100. They have the same 64 KiB LDS limit that fused_gr.cu's tile size assumes, and they also have the signed dot4 instruction. Nothing in the kernels depends on gfx1100 specifically. The one hardware difference is that gfx1102 has a smaller VGPR file, which affects occupancy, not correctness. The hipBLASLt tuning table in tools/hip is keyed by arch, so on these cards setup doesn't find a table and the engine falls back to hipBLASEx, as it already does when a table doesn't match.

Testing

Tested only on an RX 7600 (gfx1102, 8 GB) + Ryzen 5 5600 (AVX2, no AVX-512) + 64 GB RAM, Ubuntu 26.04, system ROCm in /opt/rocm:

  • strata builds with -DCMAKE_HIP_ARCHITECTURES=gfx1102, both by hand and through ./setup.sh --backend hip, which detects the card and compiles the engine
  • strata-device reports the card correctly and plans an automatically sized expert cache (about 4,100 slots in 8 GB)
  • ctest (excluding ple_parity and platform_memory_test, as in docs/AMD_HIP.md): 39/40 pass, including every HIP parity test (intrinsics, handoff, native QSA, GR, quantize_act, KV, MMQ prefill, ...). hip_prefill_hipblaslt_gemm was skipped
  • The one failure is expert_multi_test: it exercises the AVX-512 CPU expert kernel and exits on a CPU without AVX-512. That isn't related to this change; the engine chooses the AVX2 kernels on such CPUs

Not tested: gfx1101 (RX 7700/7800) on real hardware, and a full end-to-end model run on gfx1102. The model download for that is still in progress. I haven't touched docs/AMD_HIP.md; I can update it if you want these cards listed there.

🤖 Generated with Claude 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/192 **Author:** [@nexus2905](https://github.com/nexus2905) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `hip-rdna3-gfx1101-gfx1102` --- ### 📝 Commits (1) - [`f08e3fa`](https://github.com/Niko1221/Strata/commit/f08e3fa1f4e6e6d4790d53ba2a0e8e003c3798d0) HIP: support RDNA3 gfx1101/gfx1102 (RX 7600/7700/7800), not only gfx1100 ### 📊 Changes **6 files changed** (+14 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+1 -1) 📝 `cmake/hip_backend.cmake` (+2 -2) 📝 `include/strata/hip_compat/intrinsics.hpp` (+1 -1) 📝 `setup.py` (+5 -4) 📝 `src/core/device.cu` (+4 -3) 📝 `src/core/device_main.cpp` (+1 -1) </details> ### 📄 Description ## What The experimental HIP backend was locked to gfx1100 (RX 7900 XT/XTX) in four places. This PR widens those checks to also accept gfx1101 and gfx1102, the rest of the RDNA3 wave32 family: - `cmake/hip_backend.cmake`: accept `CMAKE_HIP_ARCHITECTURES` matching `gfx110[012]` - `src/core/device.cu`: the runtime device check accepts gfx1100/1101/1102 (still requires wave32) - `include/strata/hip_compat/intrinsics.hpp`: use `__builtin_amdgcn_sudot4` for `dp4a` on gfx1101/gfx1102 too, not just the scalar fallback - `setup.py`: `AMD_ARCHS` / `AMD_NAMES` list the RX 7700/7800 (gfx1101) and RX 7600 (gfx1102), and the "not supported" messages are updated to match - `src/core/device_main.cpp`: `strata-device` prints "RDNA3 wave32" instead of a hard-coded gfx1100 Unrelated fix: `CMakeLists.txt` guards the `native_mmvq_multi` test target with `EXISTS`. `bench/micro/native_mmvq_multi.cpp` is missing from the repository, so configuring with `STRATA_BUILD_TESTS=ON` failed. ## Why gfx1101 and gfx1102 use the same RDNA3 wave32 ISA as gfx1100. They have the same 64 KiB LDS limit that `fused_gr.cu`'s tile size assumes, and they also have the signed dot4 instruction. Nothing in the kernels depends on gfx1100 specifically. The one hardware difference is that gfx1102 has a smaller VGPR file, which affects occupancy, not correctness. The hipBLASLt tuning table in `tools/hip` is keyed by arch, so on these cards setup doesn't find a table and the engine falls back to hipBLASEx, as it already does when a table doesn't match. ## Testing Tested only on an **RX 7600 (gfx1102, 8 GB)** + Ryzen 5 5600 (AVX2, no AVX-512) + 64 GB RAM, Ubuntu 26.04, system ROCm in `/opt/rocm`: - `strata` builds with `-DCMAKE_HIP_ARCHITECTURES=gfx1102`, both by hand and through `./setup.sh --backend hip`, which detects the card and compiles the engine - `strata-device` reports the card correctly and plans an automatically sized expert cache (about 4,100 slots in 8 GB) - `ctest` (excluding `ple_parity` and `platform_memory_test`, as in docs/AMD_HIP.md): **39/40 pass**, including every HIP parity test (intrinsics, handoff, native QSA, GR, quantize_act, KV, MMQ prefill, ...). `hip_prefill_hipblaslt_gemm` was skipped - The one failure is `expert_multi_test`: it exercises the AVX-512 CPU expert kernel and exits on a CPU without AVX-512. That isn't related to this change; the engine chooses the AVX2 kernels on such CPUs **Not tested:** gfx1101 (RX 7700/7800) on real hardware, and a full end-to-end model run on gfx1102. The model download for that is still in progress. I haven't touched docs/AMD_HIP.md; I can update it if you want these cards listed there. 🤖 Generated with [Claude Code](https://claude.com/claude-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:00:45 +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#2500
No description provided.