Repository navigation
hip: 4096-row prompt chunks by default on the RDNA 3.5 iGPUs - #1651
Conversation
2858e0c to
e21c110
Compare
|
Thanks @gilby, the receipts answer what we asked: the same tokens at 1024 and 4096, decode level, the fallback keeping 8 streams at 131K, and the startup line saying which chunk it took and why. Decoding streams don't wait longer either, since Flash Next takes |
e21c110 to
9938cd8
Compare
|
Thanks @ashhart. Done the first way: the GPU's larger default applies only at one rank, and a group keeps the plain 1024-row step unless On the rebased head, gfx1151: |
9938cd8 to
b776578
Compare
|
Thanks @gilby, your 12:21 change answers what we asked: the larger default applies only at one rank, and a group keeps the 1,024-row step unless |
On the gfx115x iGPUs a 4096-row prompt step reads the weights a quarter as often per prompt and measured faster cold prefill with unchanged tokens and decode. Policy.forCaps gives those chips prefill_step 4096; other chips keep 1024, and --policy and TF_POLICY still override. The larger chunk's scratch takes about 4.6 GiB more device memory. When the step is the GPU's default (not asked for) and one rank serves, Flash Next measures the scratch of both chunks once the weights are resident and takes the plain 1024-row chunk if the larger one would admit fewer of the streams the server asks for. The startup line names the chunk it took and, after a fallback, why. Fixes ashhart#1649
The larger default chunk's scratch has a fallback only on one rank, so a group now keeps the plain 1024-row step; --policy and TF_POLICY still choose any step.
b776578 to
a1d8168
Compare
|
Thank you @gilby. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
|
Thanks @gilby! This is in TensorFold 1.2.2, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.2 |
Scope and figures corrected to the PRs (#2700, #2670, #2338, #2491, #2680, #2557, #2597, #2760's load time, #2753's verify-row wait, #2681's ledger row), #2831's and #2682's lines rewritten to what the code does, #2709 given its own line above #2609's, the duplicate #2404, #2576, #2597 and #2699 entries and the copy of #2609's line under 1.2.6 removed, entries spaced one blank line apart, and the released sections restored to the v1.2.6 tag's text (#1651's 1.2.2 line and six blank lines in 1.2.5 and older).
What this changes
The RDNA 3.5 iGPUs (gfx1150 to gfx1153) default to a 4096-row prompt step instead of 1024 (
Policy.forCaps, applied in the HIP server's policy resolution); other chips keep 1024, and--policy prefill_step=NandTF_POLICYstill override. Fixes #1649.The larger chunk's scratch takes about 4.6 GiB more device memory. When the step is the GPU's default (no
prefill_stepin--policyorTF_POLICY) and one rank serves, Flash Next counts the scratch of both chunks on its dry run once the weights are resident (Engine.fittedScratch) and takes 1024 if 4096 would admit fewer of the streams the server asks for (narrows). A step the user asks for is kept as before. The policy line notes that the default can fall back, and the startup line names the chunk taken and, after a fallback, why:Receipt
d377fcc6plus this change,zig build native-hip -Dhip-arch=gfx1151, Ubuntu archive HIP 7.1 (clang 21), AMD Ryzen AI MAX+ 395 with Radeon 8060Sgfx1151(128 GB unified memory). CheckpointTensorFold/Qwen3.8-Flash-Next-MLX-4bit-MTPrevision2b170fa6, MTP 3 drafts,--prompt-cache-gib 0, base and candidate on the same machine.--policy prefill_step=1024,--parallel 1 --context 131072, give the sametoken_sha256set acrosstools/bench_openai.py,tools/bench_concurrent.pyand bothtools/bench_cache.py --require-coldprompts;bench_concurrent --alone --serialevery cellalone3/3 and 12/12 equal,serialequal, 0 failed, in all three.tools/bench_openai.py --tokens 256 --reps 3 --temperatures 0, median tok/s code / chat: main 50.08 / 44.05, this change at 4096 49.77 / 43.77, this change at 1024 49.93 / 43.93 (within 0.6%).tools/bench_cache.py --require-cold --tokens 16, first cold request on public 7,377- and 29,364-token arrays: main 44.9 / 96.5 s, this change at 4096 43.6 / 92.3 s (-3.1% / -4.4%; the earlier receipt's -7.6% / -7.0% measured the cold requests after the first).--parallel--policy prefill_step=4096The most streams at each window, from the refusal of
--parallel 64: 131,072 tokens main 8, default 8, forced 4096 7; 262,144 tokens 4 in all three.zig build test -Dhip=true --summary all476/476 steps, 0 failed. Host tests: gfx1151 resolves to 4096, gfx1100 keeps 1024,--policy prefill_step=1024andTF_POLICYstill override;narrowstakes the smaller chunk only when the larger one costs a stream asked for (a planted wrong expectation fails the step). Both need the new functions, so they fail to build before the change.python3 tools/zig/lean_check.py424 on main and change.zig fmt --checkandgit diff --checkclean.--tp(it is offered for one rank only; ranks keep the resolved step); other gfx115x parts with less memory; Metal and CUDA (HIP policy only). An oQ4e checkpoint with an 8-bit shared expert loads only with hip: load a shared expert wider than the routed experts beside the stack #1612, so it is not in this receipt.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.SUMMARYline is in the receipt. (No kernel change.)