mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#822
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 @did-technomancer on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2055
On an RX 6800 (gfx1030) under Windows, prompts have read 16–20% slower since 0.1.40.2, and still do on 0.1.43.
git bisectpoints atac52c2c7(#1240, "HIP does not create the draft's unused shared-expert branch stream and twoevents"). With those three lines reverted, 0.1.42 and 0.1.43 read 34–45% faster.
Versions (one session, one server per row; the prompts are
serve/server.py's code, temperature 0):ac52c2c7(twice)ac52c2c7(twice)Bisect between
v0.1.40.1andv0.1.40.2: at each step a build, a cold start and two reads of the same 7.9K-tokenprompt (first / second, tok/s). The same two reads on the builds above: 0.1.40 gives 697 / 779 and 688 / 780;
0.1.40.2 gives 564 / 614 and 570 / 616.
471303d96d69cd50423f5893b56d6e3a3b499f17e01cbf0d48d2e6caac52c2c7ac52c2c7stops HIP from creatingside_,sh_fork_andsh_join_inMtpDrafter::load, because nothing uses themand on an R9700 they slowed prompts after the first request. On this card it is the other way round.
Which of the three (0.1.43 + a local switch in
MtpDrafter::load, one server per row):side_stream onlyThe stream alone is enough, though nothing uses it; the events change nothing.
Where the time goes (
STRATA_PREFILL_TIMING=1, the same two prompts; phases that did not move are left out):All of the difference is in
wait copy: without a second non-blocking stream a quarter of the prompt's time is spentwaiting for copies. I don't know why the stream's existence removes that; this is a measurement, not an explanation.
Still open: short prompts (~850 tokens) have been about 10% slower since 0.1.40.2, and reverting
ac52c2c7barelychanges them, so that has another cause, which I did not look for.
Separately, on 0.1.43:
STRATA_ROUTE_TAIL_SKIP=7set by hand on this card (it is not the default on gfx103x) givesdecode 52.7 / 61.6 / 63.2 tok/s against 47.0–50.3 / 52.8–56.9 / 52.3–55.6 without it; on 0.1.42 the quality suite
with it (22 tasks: 12 hard Python, 4 JS, 3 SQL, 3 regex) was 22/22.
Fix: #2056 — the stream is created on gfx103x only,
STRATA_MTP_SIDE_STREAM=0/1overrides it, and other HIP cardsstay as they are.
@Niko1221 commented on GitHub (Oct 12, 2026):
Thanks for the bisect and for the fix in #2056. The change is right and scoped: HIP creates the drafter's side stream only when the arch starts with gfx103, STRATA_MTP_SIDE_STREAM=1/0 overrides, CUDA is untouched. I checked a gfx1201 (R9700) with and without it: 8K and 30K prompts 1352/1649 tok/s without the stream, 1347/1648 with the patch, so gfx12 is unchanged. As a side measurement, creating extra spare streams at that spot on the R9700 moves prompt speed up and down (one extra: 0%, two: +0.7%/+3.7%, three: -11%/-6.5%), which fits your finding that the stream's existence matters: the number of streams created before the prompt path probably decides which hardware queue its copy and compute streams share. So the gfx103 gate is a good fix for now; the real cure is to pick that stream layout on purpose. It is ported on our 0.1.43.1 branch with your authorship.