mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4334] [Engine] STRATA_HOST_TIMELINE host-timeline split + summary-time draft-profiler flush (opt-in, measurement only) #5014
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#5014
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/4334
Author: @xyzzing
Created: 10/27/2026
Status: 🔄 Open
Base:
main← Head:pr/host-timeline📝 Commits (3)
6c8b43everify: STRATA_HOST_TIMELINE=1 - split the host's per-round timeline (adapt/slot/pool/remote/flags/bal per layer, capture/stage/launch per window, ring-spin histogram+max); report under the verify-window block, zero-cost when off (step 0)d991db5mtp: flush the draft profilers at the summary site (STRATA_DRAFT_TIMING=1 wall=round+steps+gaps+tail + host split; STRATA_MTP_PROFILE=1 16-stage) - they auto-reported only every 300 rounds, so one-shot runs never saw themad1c3afmtp: (fix) the profile_flush definition actually lands this time - outside the anonymous namespace; the prior commit's write_text was never called📊 Changes
5 files changed (+98 additions, -2 deletions)
View changed files
📝
include/strata/core/mtp.hpp(+3 -0)📝
include/strata/core/verify.hpp(+10 -0)📝
src/core/mtp.cpp(+6 -0)📝
src/core/verify.cpp(+70 -2)📝
src/program/generate.cpp(+9 -0)📄 Description
Problem and result
Two measurement gaps on the decode path, both hit during a real investigation of "where do 24 ms/round of ring waits go" on gfx1100:
STRATA_DRAFT_TIMING,STRATA_MTP_PROFILE) auto-report only every 300 rounds, so a one-shot run (one workload, ~100 rounds) never prints them — the per-round draft cost was invisible in every one-shot cell.After: with
STRATA_HOST_TIMELINE=1the verify-window block carries a per-layer host-phase split (adapt/slot/pool/remote/flags/bal), window-level capture/stage/launch times, and a ring-spin count + histogram + max. With the summary-time flush, the draft profilers print on every run that ends, not just every 300th round. Both are opt-in and zero-cost when off.Related discussion
none — no existing issue covers the one-shot profiler visibility or the host-timeline split; the numbers below come from our measurement campaign.
Approach
STRATA_HOST_TIMELINE=1(default off): staticgetenv, branch-guardedClock::now()calls around the host phases and the window stages; the report prints under the existing verify-window block. Measured cost when ON against the production binary on our lineage: −0.6% (inside the ±6% single-run noise floor), i.e. the instrument does not move what it measures.profile_flush()called at the one-shot summary site, next to the existing GPU stage report; the 300-round auto-report stays for long runs.Compatibility: opt-in diagnostics only; no flag, config, or output changes when the env vars are unset.
Validation
Passed:
ninja -C build-pr -k 0 -j 6on this branch (HIP, gfx1100, ROCm 10.2 nightly SDK, upstream main5e8a4cca+ the three commits): builds clean, binary links.STRATA_HOST_TIMELINE=1 STRATA_DRAFT_TIMING=1 STRATA_MTP_PROFILE=1the run prints the host-timeline block under the verify-window report and flushes both draft profilers at summary (exact lines in the run log); with the env unset the same binary prints none of them and the output matches the pre-branch binary's sections.Failed: none observed.
Not run: SYCL and Metal builds — no SYCL toolchain on this AMD-only box and Metal is macOS-only (per-PR CI here builds neither; our fork CI compiles CUDA and HIP in vendor containers, see the run linked in the thread). CUDA is now compile-validated on this branch head (run 40592368748, both containers green). The paired zero-cost measurement was rerun on our lineage, not on upstream main (the smoke above covers function, not the cost number).
Limits
STRATA_VERIFY_PROFILE) is what confirms what the GPU does during the spins. The two together are the complete picture.STRATA_HOST_TIMELINEstays opt-in default-off by design; we offer it as a measurement instrument, not a default.2026-11-06: rebased onto main (
9f7d977d2) — force-pushed. Three keep-both conflict resolutions (upstream's STRIX-TDR probe block and dispatch-stats call, and the prompt-room API block in mtp.hpp, all retained; the timeline additions re-anchored beside them). The rebased tree builds fully on main: 549 targets, rc=0, gfx1100 HIP. Series note: the middle commit's tree alone does not compile (theprofile_flushdeclaration rides in the third commit, completing it) — the tip is the reviewable state. The CUDA compile-validation run cited below was on the previous head; the fork CI re-runs on this push. The smoke and zero-cost measurement remain from the 0.1.48-era lineage as stated.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.