Repository navigation
HIP: a measured tuning table for gfx1201, and the step that measures one - #1527
Conversation
|
Thanks @laudney. The new gfx1201 table differs from gfx1100's in one row, The changed default reaches more than the model you measured: gfx1200 too, and other routed MLX models, Flash Next and Nemotron among them. We have no RDNA4 card, so could you run these for each of them around the selector's new boundary?
If one of them comes out slower, keep the old selector for that one. Please also list the exact model revisions you ran. |
|
Thanks @ashhart. I ran both models I could fit on the one free R9700 (gfx1201) here: fresh server boots, Models:
(257 and 513 tokens run as 256 or 512 rows and one more.) Decode is within 2% either way for both. Nemotron's plans above 300 items get slower on the K-parallel tile, and its first count above 300 (320) sits below Qwen3.6's 329 and 401, so no single item bound gives Qwen3.6 its gain without the Nemotron loss. Following your rule, 1ce4440 puts the bound back to 300: Not run: Flash Next ( A bound on rows per item instead of items would separate Qwen3.6's 33 to 128-token plans from Nemotron's. That needs a new tuning field, so I'd open it as its own issue if you want it. |
…MLX affine prompt tiles RDNA4 shared gfx1100's table, so its prompt bounds could not be set for its dot2 tiles without changing RDNA3's. gfx1201.zon starts as gfx1100's rows, Kernels.tableFor maps RDNA4 to it, and the host tests take their table from tableFor, so the family-rule test covers gfx1201 as the runtime sees it. The opt-in step `hip-affine-tune` (built without a GPU by `hip-affine-tune-build`) times every prefill entry on dense rows and served routed tokens, refines where a table's choice changes, and proposes prompt rows no timed cell would lose against gfx1100's choice beyond its noise. Served on a Radeon AI PRO R9700 with fresh boots, a 545-item routed bound made Qwen3.6-35B-A3B's short prompts faster but Nemotron Lightning's 200 to 513-token prompts up to 1.7 times slower, so gfx1201's rows keep gfx1100's bounds and no choice changes today. Co-authored-by: laudney <[email protected]>
1ce4440 to
99302cf
Compare
|
Thanks @laudney: the gfx1201 tuning table and |
|
Ash, glad to contribute!! Amazing project and growing community.
…On Thu, 29 Oct 2026 at 11:02, Ash ***@***.***> wrote:
*ashhart* left a comment (ashhart/TensorFold#1527)
<#1527 (comment)>
Thanks @laudney <https://github.com/laudney>: the gfx1201 tuning table
and hip-affine-tune shipped in TensorFold 1.1.9
<https://github.com/ashhart/TensorFold/releases/tag/v1.1.9>.
—
Reply to this email directly, view it on GitHub
<#1527?email_source=notifications&email_token=AAAZ6INMFNQSPCJTIEGTJOD5WMPUFA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNBZGQ4TAMBZGA4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6494900908>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZ6IJBZOQEY6BUFVFU6KT5WMPUFAVCNFSNUABGKJSXA33TNF2G64TZHMYTENZUG4ZDGMZYGE5US43TOVSTWNRQG43TMNRXGQ3TTILWAI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What this changes
zig build hip-affine-tunetimes every MLX affine prompt tile the GPU has on the served shapes and proposes table rows;zig build hip-affine-tune-buildcompiles it without a GPU. Neither is part ofzig build test; both need-Dhip=true. RDNA4 now takes its own table,gfx1201.zon, with gfx1100's rows: the step proposed raisingmlx.routed.prefill.kp3to 545 items, but served checks on Qwen3.6 and Nemotron Lightning found Nemotron up to 1.7 times slower above 300 items, so 1ce4440 keeps 300 and no choice changes. gfx1200 takes the table unmeasured. Closes #1506.Update: the receipt below measured the 545-item row on an earlier base; it is superseded by the per-model results in the comments, which led to 1ce4440.
Receipt
mainat886cc717, Zig 0.17.0, HIP 7.16 (AMD clang 24.0.0git), one Radeon AI PRO R9700 (gfx1201) that nothing else was using, Linux. Checkpointmlx-community/Qwen3.6-35B-A3B-4bitat38740b84(MLX affine 4-bit, groups of 64; no MTP head). The tuner and the served benches ran on these three commits over an earliermain; the tests below were rerun on this branch's head.mlx.routed.prefill.kp3items 300 to 545 (12 timed cells change, none slower); 833 items (257 to 512 tokens) is refused because the 128-row tile wins at 512 tokens. Every other prompt bound keeps gfx1100's value: the per-cell veto refused each move, mostly on K-parallel cells whose noise passed 5%. Decode rows are gfx1100's, verbatim.token_shaof everytools/bench_openai.pyreply (temperatures 0 and 1.0, seeds 1234 to 1236) andtoken_sha256of everytools/bench_cache.pyreply, all cold.tools/bench_openai.py --tokens 128 --reps 3, tok/s per round in run order base, new, base, new, base, new, then a reversed pair new, base:The decode kernels are the same in both builds. The second process of a pair was a little slower in every pair, whichever build it ran, as the reversed pair shows.
ttft_sfromtools/bench_cache.py --require-cold --tokens 16 --repeats 3 --streams 1, server with--prompt-cache-gib 0, a fresh process each round, median ms per round in the same order:hip-kernel-test103 passed, 0 failed;hip-affine-test30 passed, 0 failed;tf-qwen35-test check42 passed, 0 failed, 5 skipped (the four drafted-equals-serial checks, as the checkpoint has no draft head, and radix memory, too few ids), all on the R9700.zig build test test-kernel-contract test-golden fuzz-cortheon,zig build test -Dhip=trueand a plainzig buildpass;hip-affine-tune-buildbuilds with no GPU visible; the lean check finds no new problem.SUMMARYchanges. Drafted equals"draft": falseis not checked here, as the checkpoint has no draft head. The changed row also serves Flash Next's and Nemotron's routed prompts, whose plans the step did not time and which I did not serve.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Resumed and concurrent pass intf-qwen35-test check; drafted is not checked, no draft head.)SUMMARYline is in the receipt. (No kernel changed.)The step's raw times: median us a launch (noise when above 5%), from its last run; U marks a cell whose table copies could not reach 512 MiB a rotation