mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #311] [CLOSED] HIP: support RDNA2 gfx1030 working and gfx103X is untested. #2564
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2564
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/311
Author: @xendak
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:hip-gfx1030📝 Commits (1)
9b37223AMD HIP: RDNA2 gfx1030 (tested), gfx(1031, 1032) untested.📊 Changes
7 files changed (+63 additions, -17 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
README.md(+1 -1)📝
cmake/hip_backend.cmake(+6 -3)📝
docs/AMD_HIP.md(+40 -5)📝
include/strata/hip_compat/intrinsics.hpp(+5 -1)📝
setup.py(+9 -5)📝
src/kernels/cuda/verify_kernels.cu(+1 -1)📄 Description
What
The experimental HIP backend takes gfx1100 (RDNA3) and gfx1201 (RDNA4). This PR adds RDNA2 gfx1030 (RX 6800 / 6800 XT / 6900 XT / 6950 XT) as an unvalidated target:
include/strata/hip_compat/intrinsics.hpp:dp4aon gfx1030 / gfx1031 / gfx1032 goes through__builtin_amdgcn_sdot4, the plain signedv_dot4_i32_i8. RDNA2 has no sudot4 (that is gfx11+); the products are the same signed x signed bytes accumulated modulo 2^32, no clamp. The portable fallback stays for other targetscmake/hip_backend.cmake: gfx1030 joins the unvalidated list (the build warns), with a comment on the dot instruction differencesetup.py:AMD_ARCHS/AMD_NAMES/AMD_CARDSlist the RX 6800 / 6900 series, andROCM_INDEXESgets thegfx103X-allTheRock index (not checked to carry the pinned version: a system ROCm 7 is the tested path)docs/AMD_HIP.md: a RDNA2 (gfx1030) section with the hardware report;README.mdnames the cardsCMakeLists.txtandsrc/kernels/cuda/verify_kernels.cu: wording only (gfx10.3's wall_clock64 counter is also a constant 100 MHz, in ns)Why
gfx1030 is wave32 with the same 64 KiB LDS per workgroup that the kernels' tile sizes assume. The one hardware difference is the dot instruction: no
v_dot4_i32_iu8/ sudot4 before gfx11, but the plain signedv_dot4_i32_i8gives the same signed x signed byte products modulo 2^32. There is no WMMA, so the QSA scorer takes the same ordered FP32 fallback as gfx1100. ROCm's hipBLASLt ships no gfx1030 kernels, so there is no tuning table and the plain hipBLAS path runs. CMake keeps the arch unvalidated (the build warns) until a maintainer has run it, the same treatment as gfx1101 / gfx1102 / gfx1200.Testing
On a community machine: RX 6900 XT 16 GB (gfx1030), i7-13700KF (AVX2, no AVX-512), 63 GB RAM, NixOS, system ROCm 7.2.3 from nixpkgs (clang 22, hipBLAS 3.2):
clang++(the nixpkgs ROCm is not an/opt/rocmtree, so setup'sbuild_engine_hipwas not exercised; the binary was placed inengine/for setup to use)hip_device_selftest(on the 0.1.26 build; the speeds below are from an engine 0.1.30 build of this branch, run on the same card)--context 131072with--kv-resident 32768 --adapt-every 1 --vram-reserve-mib 1024, 200 greedy tokens): 38-42 tok/s decode with the default 15 CPU pool workers (8 workers: 35-37; 24 = every logical core: 26-28), consistent even with the 131,072-token context fullNot tested: gfx1031 / gfx1032 (the same
dp4apath, no hardware report), setup's own build path and thegfx103X-allwheels on gfx1030, images, answer-quality benchmarks.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.