mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2305] HIP (R9700, gfx1201): the MTP draft is fast or slow depending on the engine start; GPU_MAX_HW_QUEUES=2 makes every start the fast one #926
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#926
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @i-Vladimir-i on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2305
What we see. With
STRATA_DECODE_TIMING=1(server, UD-IQ4_XS, every expert in RAM,--spec 4 --spec-min-p 0.5 --mtp,STRATA_HIP_WMMA=1 STRATA_ROUTE_RESIDENT=1, greedy, 512-token answers) thedraftpart of a window is one of two values,fixed for the life of an engine and different from one start to the next with the same binary, flags and requests:
The verify part does not change (24-26 ms/window on x16, 27-29 on x4), so a slow start costs ~6% of decode on x16 and up
to ~25% on x4.
What changes it.
GPU_MAX_HW_QUEUES(HIP's limit on hardware queues per process, default 4), same binary, 2-3 requestsper start, alternating:
Our reading, not proven from the runtime's side: HIP maps the process's streams onto its hardware queues round-robin
in creation order. When the drafter's
cs_shares a hardware queue with the verify window's stream, the hand-offsbetween them stay in one queue; when it lands on another one, every hand-off crosses queues and costs more - more so
through a chipset link. With 16 queues every stream has its own (always slow); with 1 the drafter also waits behind the
adaptive tier's copies (slow on x4); with 2 the drafter and the verify window always share one. #1240 (a side stream that
cost an R9700 prompt speed) looks like the same family; #2245 is about hangs on gfx103x, not this.
Workaround that works here:
GPU_MAX_HW_QUEUES=2in the run config'senv. A fix in the engine would not depend onthe runtime's mapping, for example drafting on the verify window's stream on HIP, or creating the streams in an order
that puts the two together. Happy to test a change on both cards.
Not tested: other RDNA4 / RDNA3 cards, NVIDIA (no hardware-queue mapping of this kind), sampled requests over many
starts (under temperature 1.0 the draft part is smaller and the difference less visible), layer splits.
Related, same setup (separate finding).
arch_defaults.cppkeeps the decode half of the gfx1151 table off on gfx12("measured slower on that card", #1478). With every expert in RAM,
STRATA_ROUTE_RESIDENT=1and two hardware queues,the exact ones together -
STRATA_LFUSE EXPERT_V2 TSUM MMVF_ROWS QFUSE GDN_SPLIT ATTN_LANECELL PLE_BATCH- were fasteron the R9700 x16: verify 25.8 -> 24.8 ms/window, the whole window -3.7%, two starts per arm interleaved, 12 of 12
answers byte-identical. One at a time each moved less than the run-to-run spread.
STRATA_Q8_PACKED/Q6_PACKEDchanged the output here, so they are left out. Not measured: the budget (complement) mode #1478 may have used.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.