Replies: 4 comments
|
@doplxyz — following up here since this is the "what we'd like to contribute" thread, and after the last week (your CK #3759 review + mutation matrix, the EA request-size work on #6613) it's clear you're the right person to ask. Would you be willing to look through our two trees and carry upstream whatever you judge upstream-worthy — as author or co-author, entirely your call? I care that the fixes land, not whose name is on them. Concretely:
Low-effort starting points if you want them: the We can support with anything you need: repro runs on the two R9700s, perplexity/correctness gates, benchmarks under the DPM/profiling constraints we've mapped. No obligation and no timeline — take whatever interests you and ignore the rest. |
|
@The-Monk — thank you, and I want to give you a straight answer rather than a polite one. I am not going to carry the trees. Not because of the work, and not because of authorship — What I can do is the thing that has actually worked twice now: when an individual PR or issue On the llama.cpp side specifically: Three technical notes. The first two are about how my #6613 numbers are being used in the message 1. 2. The boundary double-fetch and my excess counts: please do not treat those as agreeing. 3. One correction to the opening post: CK does have the gfx12 iu4 intrinsic. In the ISA Where your bullet does match what I found is above that layer. On the two paths I looked at, I did
Those two paths and that grep are the whole of what I checked. The grep is a content search, not |
|
@doplxyz — that is the right answer, and the reasoning is one I'd rather have than a yes. Vouching for a change means having built it, measured it, and tried to break it; a submitter who can't answer the first reviewer question does the work more harm than no submitter at all. Understood on all three counts, and the open-door framing is noted as exactly that — I'll point at individual items sparingly, and only where a gfx1201 measurement is genuinely the missing piece, not as a queue. Multi-GPU is ours to carry; I won't send you anything that needs two cards. Your three technical notes, in order. 1. WRREQ intercept — audited, and you were right to flag it. I went through the current decode roofline calculator looking for exactly the error you describe. The result is that it never computes write bytes at all: the numerator is executed GEMV weight bytes (per-format traffic factor applied to tensor sizes) plus a mandatory non-GEMV term that is itself entirely reads — GDN state, ssm_conv, flash-attn KV, embedding row, quantize reads. So the read relation is not carried to the write side anywhere in it, and the 24,578-request gap doesn't reach us. That is luck as much as design: the calculator is read-only because decode is read-bound, not because we had your write fit when it was written. Two things worth stating precisely rather than leaving implied. We use I'll also take the range caveat seriously: read fit established 16–256 MiB, write fit 16–512 MiB, neither assumed outside its own range, and no guess about how the two intercepts combine when a kernel does both. 2. The double-fetch pairing — withdrawn, and the problem is on my side too. You're right that your excess can't carry it. But it's worse than unsupported from where I'm sitting, and you've asked the two questions that make it obvious. What we map to a "row": the mechanism isn't geometric rows, it's block-size against the 256 B line. The only row-boundary effect our tooling measures is a per-format traffic factor, and it is non-trivial for exactly one format — f8e4m3, at 1.03–1.05, because its 34-byte blocks leave rows unaligned to line boundaries. Q2_0 measures 1.001 and q6_k 1.000, because those align. How many rows the model predicts at 256 MiB and 512 MiB for your kernel: So I was matching a number that our model predicts shouldn't exist, against a number yours can't reproduce. It was wrong to cite as agreement and I've stopped citing it — not "unproven pending better data," just wrong. I'm not asking you for a 512 MiB repeat set on that basis; the pairing doesn't deserve one. 3. CK gfx12 iu4 — the correction is accepted, and thank you for the precision. You're right, and the hedge in my bullet doesn't save it: Your narrower finding is the interesting one and matches what I'd expect from the CK side: the intrinsics exist, and nothing above them reaches. No int4 warp-GEMM attribute in On filing it: I'm happy to open the issue against composable_kernel with the inventory and that asymmetry laid out, referencing your line numbers and commit. Say the word if you'd rather file it yourself — you found it, and I don't want to take the write-up out from under you. Either way I'll leave the "full rate" half of my original bullet alone, since neither of us has measured it. Thanks for taking the time to be exact about all three. It cost you more effort than a decline needed to. |
|
@The-Monk — go ahead and file it yourself. You found the gap and did the write-up; no reason to hand that off. If it turns into something that needs a gfx1201 measurement, point me at it and I'll take a look, same as everything else in this thread. |
Uh oh!
There was an error while loading. Please reload this page.
Context: our AMD hackathon entry (Hyperloom Track 2, July 2026 — currently in judging) is built on a heavily tuned llama.cpp HIP backend for RDNA4 (2× Radeon AI PRO R9700, gfx1201), plus supporting profiling and benchmarking tooling. The submission is frozen while judging runs, but afterwards we would rather upstream what is generally useful than leave it in a fork. Before opening PRs, we would like maintainer direction on what is welcome and where it should land.
What we have
HIP kernel work (llama.cpp backend, RDNA4) — likely belongs in llama.cpp/ggml rather than ROCm proper; listed for visibility since it is all-AMD:
v_cmp/v_cndmaskchains and the HIP__byte_permemulation tax: on mainline llama.cpp HIP, Q1_0 tg128 29.5 → 64.6 t/s (+119%), pp2048 +30%, bit-exact (branch: The-Monk/llama.cpphip-q1q2-swar).ds_bpermutebutterflies in SSM kernels — zero LDS-pipe traffic.ISA-level findings (documentation candidates):
__byte_permsemantics divergence HIP vs CUDA for selectors ≥ 8 (mode-less wrap vs sign-replicate) — probe and details already posted on [Documentation]: ROCm Documentation Gap: WMMA Output Lane Mapping for gfx12 (RDNA4) #6025.v_wmma_i32_16x16x32_iu4is genuinely full-rate (measured 305 vs 148 Tmac/s iu8 = 2.07×), swmmac iu4 variants present,sdot8(i4×i4) absent, no 2-bit dot/wmma variants exist at all. Rate microbenches included. As far as we can tell nothing upstream (composable_kernel included) wires the gfx12 16x16x32_iu4 shape yet — int4 matrix looks like an RDNA-exclusive lineage worth documenting.rocprofiler-sdk / rocprofv3 gaps on gfx1201 (bug reports with repros ready):
power_dpm_force_performance_level=profile_standard; the size-split EA variants (GL2C_EA_RDREQ_32B/64B/128B) are all-zero regardless of powerplay mask; base values under-report by a roughly constant ~4× (partial instance sampling suspected) — ratios are usable, absolutes are not.host_trapworks on gfx1201 (stochastic unsupported), minimum interval 512, occasional segfault at teardown.FETCH_SIZE-class derived counters all-zero.Host tuning + benchmarking methodology (documentation candidates): recommended amdgpu kernel args for inference hosts (
gpu_recovery,lockup_timeoutrationale), clock-pinning discipline (rocm-smi --setperflevel highis 10–12% slower than auto for inference on R9700 but ~3× tighter variance — pin only for A/B discrimination, publish auto numbers), NUMA/topology discipline, GPU heat-soak effects on back-to-back runs, and a benchmark-provenance tool (per-run commit + config + counter capture) we would be happy to contribute.Questions for maintainers
Everything stays frozen until judging concludes — this post is only to get direction so contributions land where you want them.
All reactions