mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2831] [CLOSED] prefill: STRATA_PREFILL_STAGES (opt-in) prints where a prompt chunk's wall went #4288
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#4288
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2831
Author: @gopinath87607
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:prefill-stages-trace📝 Commits (1)
782433fprefill: STRATA_PREFILL_STAGES (opt-in) prints where a prompt chunk's wall went📊 Changes
2 files changed (+176 additions, -1 deletions)
View changed files
📝
docs/DETAILS.md(+9 -0)📝
src/prefill/prefill.cpp(+167 -1)📄 Description
What this changes
STRATA_PREFILL_STAGES=1(opt-in; unset is off) turns on the chunk's stage line: one line a stage a chunk withwhere the chunk's wall went — the chunk's wall, the copy lane's own span split into what ran before it (lead), the
lane itself and what ran behind it (tail), the bytes it moved and the bytes the chunk's consumers waited on (the
difference is the ring's read-ahead), the hand-off a later stage of a layer split paid, the GPU's own phases over the
chunk, and the experts and host time it spent. It also turns the phase timer on.
Without it a prefill change can only be judged by the prompt's ms/token, which mixes the chunk size, the copy lane,
the host and the phases. The line is what separates them.
From the Maya checkout (
project-maya), local commita34f57c, with its fixes04b8d65(the line's events aredestroyed with the prompt path) and
63b3690(the line reads only the events its chunk recorded). Its spellingSTRATA_GLM_PREFILL_STAGESis accepted as the same knob, so a config written for that checkout runs unchanged.What it leaves alone
Unset (the default),
stages_on()is false: no line is printed, the phase timer is not read for it, and no extrasync is taken for it. The syncs the line does add when on wait only on copies the compute stream has already waited
for (the issuer is joined when the chunk ends), so
STRATA_PREFILL_STAGES=0beside a--benchA/B is how you checkit costs nothing. The default path is unchanged by construction.
Measurements
This is a diagnostic; it makes no claim to speed anything up. Its own cost is what the set-vs-unset A/B under
--benchmeasures, and the design keeps that at zero by waiting only on work already joined.Checks
stages_on()reads the environment once and returns false).src/prefill/prefill.cppcompiles clean against this branch's headers with the build's own flags(
-fsyntax-only). The development branch that also carries the change built fully with ninja (CUDA 13.2).the same stream/event API the file already used, and the events are only created when the knob is on.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.