Skip to content

feat(amd): first-class R9700 (gfx1201/RDNA4) support for Qwen3.6-27B#2

Closed
DeanoC wants to merge 1 commit into
mainfrom
feat/r9700-gfx1201
Closed

feat(amd): first-class R9700 (gfx1201/RDNA4) support for Qwen3.6-27B#2
DeanoC wants to merge 1 commit into
mainfrom
feat/r9700-gfx1201

Conversation

@DeanoC

@DeanoC DeanoC commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Makes the AMD Radeon AI PRO R9700 (gfx1201, RDNA4 / Navi 48) a first-class AMD target for the DFlash Qwen3.6-27B stack.

The HIP build pipeline compiled RDNA4 as gfx1200 (Navi 44, RX 9060-class) and mislabeled it "RX 9070". The R9700 is gfx1201, which is not code-object compatible with gfx1200 — so the published :rocm image and the documented build produced no native R9700 kernels (ggml-hip fails to load / falls back badly on the R9700).

Changes

  • Build matrix: add gfx1201 to the default fat-binary HIP arch list in docker-bake.hcl, Dockerfile.rocm, and the CI main/release matrix (.github/workflows/docker.yml). PR builds stay gfx1151-only for fast CI. Corrected the RDNA4 labels (gfx1200 = RX 9060, gfx1201 = RX 9070 / R9700) and noted the code-object incompatibility.
  • rocWMMA validation on AMD: test_flashprefill_kernels (the Phase 2 flashprefill numerics test) now builds under HIP too — it was CUDA-only, so there was previously no way to validate the rocWMMA path on AMD. The CUDA-spelled test compiles via the existing hip_compat/ shim.
  • Docs: R9700 row in the README "Tested Machines" table; gfx1201 build + --ddtree-budget=22 tuning, the new HIP numerics test, and multi-GPU / Fedora-PIE build notes in server/README.md.

No kernel changes: ROCm 7.1's rocWMMA handles the gfx12 WMMA operand-format change internally.

Validation — real R9700 (gfx1201, ROCm 7.1.1)

Native gfx1201 build (Phase 1 + Phase 2 rocWMMA); the built libggml-hip.so contains native hipv4-amdgcn-amd-amdhsa--gfx1201 code objects.

Check Result
test_server_unit 1984 assertions, 0 failures
test_flashprefill_kernels (rocWMMA) PASS — max diff 5e-4; e2e flash_prefill_forward_bf16 @ S=8192 = 10.7 ms/iter
Qwen3.6-27B Q4_K_M + DFlash, --ddtree-budget=22 54.65 tok/s mean decode (bench_he.py --n-gen 256, AL 7.14, range 36.9–93.0 tok/s)
16K-context generation coherent

Notes

  • Validated on a box with the R9700 (gfx1201);
  • Fedora's system ROCm lives under /usr and links PIE by default; the local build used -DCMAKE_HIP_COMPILER_ROCM_ROOT=/usr -DROCM_PATH=/usr -DCMAKE_EXE_LINKER_FLAGS=-no-pie (documented in server/README.md). The Ubuntu-based Dockerfile.rocm is unaffected.

@DeanoC
DeanoC force-pushed the feat/r9700-gfx1201 branch from a37511d to 476291b Compare June 22, 2026 15:55
@DeanoC
DeanoC requested a review from pramodith June 22, 2026 16:39
The HIP build pipeline compiled RDNA4 as gfx1200 (Navi 44, RX 9060) and
mislabeled it 'RX 9070'. The Radeon AI PRO R9700 is gfx1201 (Navi 48), which
is NOT code-object compatible with gfx1200 — so the published :rocm image and
the documented build shipped no native R9700 kernels.

- Add gfx1201 to the default fat-binary HIP arch list (docker-bake.hcl,
  Dockerfile.rocm, CI main/release matrix) and correct the RDNA4 labels.
- Build the rocWMMA flashprefill numerics test (test_flashprefill_kernels)
  under HIP too, not just CUDA, so the Phase 2 path can be validated on AMD.
- Document the R9700: gfx1201 build, --ddtree-budget=22, the multi-GPU /
  Fedora-PIE build notes, and benchmark numbers.

Validated on a real R9700 (gfx1201, ROCm 7.1.1):
- test_server_unit: 1984 assertions, 0 failures
- test_flashprefill_kernels (rocWMMA): PASS, max diff 5e-4
- Qwen3.6-27B Q4_K_M + DFlash, budget=22: 54.65 tok/s mean decode (AL 7.14)
- coherent 16K-context generation

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DeanoC
DeanoC force-pushed the feat/r9700-gfx1201 branch from 476291b to 0093de3 Compare June 25, 2026 05:40
@DeanoC

DeanoC commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as obsolete: the equivalent upstream PR Luce-Org#435 was merged, and this fork main has now been synced with upstream main.

@DeanoC DeanoC closed this Jun 26, 2026
@DeanoC
DeanoC deleted the feat/r9700-gfx1201 branch June 26, 2026 08:00
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.

1 participant