Repository navigation
flashnext hip: the chunk fallback measures room after the window plan slots - #3419
Conversation
|
CI on |
|
Thanks @gilby. The slot subtraction matches the later allocation, the host fallback tests pass, and CI is reported green at The remaining device cell is a start that actually takes the changed fallback; both recorded launches leave enough room to avoid it. Please use a valid reduced HIP memory budget to cross that decision and post the old/new fallback and allocation lines, peak memory, and equal full token hashes with the same checkpoint and requests. We have no HIP device to reproduce that cell here.
|
|
Here is the reduced-memory-budget device cell crossing the fallback decision on one Strix Halo iGPU ( 1. Fallback and allocation lines ( At
2. Device and host memory (
3. Equal full
4. Fixed
|
|
Thanks @gilby. This answers the missing device check: the reduced budget makes the new code choose 1,024-row chunks and admit four streams where the old code kept 4,096-row chunks and admitted three. The memory measurements and complete token hashes cover the changed path, including prompts across several chunks. HIP is hardware we do not run, so your posted runs are the device evidence for both boundaries; on our side we check that the CUDA and Metal paths stay unchanged. No further code change is requested from this follow-up.
|
|
Thanks @gilby. The reduced-memory-budget run crosses the changed fallback and shows the new code choosing the smaller chunks and admitting the extra stream, with the memory measurements and full token hashes covering that path. The host test fails when the slots are left out and passes with the change. CI is green at this head, and the change stays inside HIP startup. No further code change is requested. We will check the CUDA and Metal paths on our side.
|
3554434 to
4c25139
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. |
What this changes
Follow-up to #2728. On Flash Next HIP, the chunk fallback decides whether a smaller prompt chunk would admit more streams by comparing the room left on the device with the two scratch sizes. It measured that room before the window plan's slots were allocated, so the slots' bytes were counted as free. With little room left, the fallback could keep the larger chunk although fewer streams then fit than it had worked out.
The fallback now takes the slots' bytes off the room first.
narrowsgets the slots' bytes as an argument, andfittedScratchpassesgdn.Slots.bytesfor the wanted stream count when the model has a window plan, and 0 otherwise. One file,zig/src/families/flashnext/hip/engine.zig.atc overlap --jsonon base2ba55ec7d: incomplete (it stopped at its pull-request, file and time limits). It returned no row for this tree's one changed file against another contributor's open PR; the rows it did return belong to my older PRs dsv41 metal: the vision tower's kernels under the kernel contract #1721 and dsv41 metal: image prompts #1722.Checks on this head
python3 tools/zig/lean_check.py, on the base and on this head: 341 and 341, 0 new findings.zig build test -Dhip=true: 482 of 504 passed, 20 skipped, 2 failed. The 2 failures are the Flash Nexthip.tablesgather-pool tests, which fail the same way on the base.python3 tools/pr_check.py --base origin/main: 0 errors.Receipt
One Strix Halo (gfx1151, 128 GB, 115 GiB GTT), HIP 7.1 toolchain, Flash Next oQ4e, main
2ba55ec7dagainst this head, a fresh server for each start. The point of the receipt is that the default configurations are unchanged.--context 131072 --parallel 4--context 262144 --parallel 3 --policy prefill_step=2048No fallback line was printed in any of the four starts. One greedy 64-token request per start gave the same reply hash in all four (17 rounds, 46 of 46 drafts accepted). No speed cells: the change runs once at start and touches no kernel or round.
Checklist