Skip to content

feat(hip): a caps table from RDNA2 to RDNA4, keyed by exact gfx name - #609

Merged
ashhart merged 2 commits into
ashhart:mainfrom
BlivionIaG:hip-caps
Oct 10, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
BlivionIaG:hip-caps

Conversation

@BlivionIaG

@BlivionIaG BlivionIaG commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

A caps table from RDNA2 to RDNA4 (zig/src/hip/caps.zig), the caps-table slice tracked in #491. One row a generation lists its parts by exact gfx name and the instructions kernels test: dot2 f16/bf16, sdot4/8, the WMMA layout (none, gfx11, gfx12) and the activation type. Kernels will read these, never the GPU's name.

generation parts dot2 f16 / bf16 WMMA activations
RDNA2 gfx1030-gfx1036 yes / no none fp16
RDNA3 gfx1100-gfx1103 yes / yes gfx11 bf16
RDNA3.5 gfx1150-gfx1153 yes / yes gfx11 bf16
RDNA4 gfx1200, gfx1201 yes / yes gfx12 bf16

All are wave32 with sdot4/sdot8.

  • -Dhip-arch takes any exact name in the table; a name outside it, or with target features (gfx1151:xnack-), stops the build with a pointer to the table.
  • The GPU test checks the device's own name is in the table.

Stacks on #607 (its one commit is included here until it lands); review the last commit.

Receipt

  • Environment: base main at c37d0a4 (+ build(hip): -Dhip-arch accepts gfx1030 (RDNA2) and gfx1100 (RDNA3) #607), head 5d2bb92. Zig 0.17.0, HIP 7.14.60850 (TheRock), Linux 7.1.7.
  • Exactness: the table changes no arithmetic; hip-affine-test passes unchanged on both GPUs below.
  • Decode and prompt speed: not applicable (no model path).
  • Tests run, fresh Zig cache:
    • Radeon PRO W7800 (gfx1100): hip-host-test 30/30, hip-gpu-test 19/19 (Add model-free Zig HIP runtime and GPU qualification #463's 16 and the table's 3), hip-affine-test 22/22.
    • Radeon PRO V620 (gfx1030): hip-gpu-test 19/19, hip-affine-test 22/22.
    • Build refusals checked: gfx1037 and gfx1151:xnack- stop the build; gfx1101 builds.
    • macOS: zig build test test-golden -Dcpu=apple_m1 133/133 steps; Linux zig build test 31/31 steps, 297/297 tests. zig fmt --check clean. lean_check.py: 544 problems, the same as main.
  • Not run, and why: RDNA3.5 and RDNA4 rows on hardware (none here; their names and instructions follow Add model-free Zig HIP runtime and GPU qualification #463's gfx1150/gfx1151/gfx1201 runs and the ISA docs); Metal and CUDA (sources untouched).

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off. (No model path touched.)
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (No model path touched.)
  • No precision traded for speed. No bits change.
  • Prompt processing is no slower than the last release. (No prompt path touched.)
  • The description says which platforms I ran and which I could not.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. The table's tests are host tests.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

The runtime and the affine row kernel need no change: the reduction is 32 lanes wide on any wave size, and the
loader takes only the device's exact object. On a Radeon PRO W7800 (gfx1100), hip-gpu-test passes 16/16 and
hip-affine-test 22/22; a gfx1151 object on it is refused with UnsupportedArchitecture.
Each generation's row lists its parts and the instructions kernels test (dot2 f16/bf16, sdot4/8, the WMMA
layout, the activation type); kernels will read these, never the GPU's name. -Dhip-arch now takes any exact
name in the table, and the GPU test checks the device's own name is in it. On a W7800 (gfx1100): hip-gpu-test
19/19, hip-affine-test 22/22 with its bits unchanged.
@ashhart

ashhart commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thank you, @BlivionIaG. The caps table is merged into main (8ca6046) on top of #607, your commit as it was, and it ships in 1.0.6. Kernels reading what a card can do from one table keyed by exact gfx name, with target-feature suffixes refused at build time, is the right footing for the next slices of #491. The GPU test that checks the device's own name against the table will catch a missing row on its first run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants