perf(rt): opt-in VICTORY_RT_STAMPS dispatch timestamp profiler #299
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!299
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-299"
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?
@Vladimir-Human on GitHub · 2026-11-27 14:40 UTC · original
Vladimir-Human:perf/opt-in-port-rt-and-stamps→main· +336 −0 · 3 files · 1 commits · openSummary
Narrowed per
@TaynanGT's review to only the opt-in GPU compute dispatch timestamp profiler (VICTORY_RT_STAMPS=1,diagnosticsbuilds), with all forward-fill /VICTORY_PORT_RTchanges removed now that#344(VICTORY_PLACED_FILL_REDIRECT=1) covers the forward-fill path cleanly:crates/victory-gpu/src/host/rtstamps.rs: Allocates the D3D12 timestamp query heap + readback ring lazily only whenVICTORY_RT_STAMPS=1, bracketing direct and indirect compute dispatches (Kind::Builder,Kind::Walks,Kind::Other) and reporting per-frame / top-pipeline timings inlate_line. WhenVICTORY_RT_STAMPSis off or unset,before()returnsNoneimmediately so zeroEndQuery/ResolveQueryDatacalls or heap allocations enter submissions.crates/victory-gpu/src/host.rs&crates/victory-gpu/src/draw.rs: Minimal#[cfg(feature = "diagnostics")]hooks around directDispatchand indirectExecuteIndirect(..., DISPATCH, ...)calls pluslate_linereporting.Verification
cargo xtask policy:asset policy: 323 files okcargo clippy -p victory-gpu --all-targets -- -D warnings(both default &--features diagnostics): 0 warningscargo test -p victory-gpu --lib --no-run: builds cleanly withoutdiagnosticscargo test -p victory-gpu --features diagnostics --lib rtstamps -- --test-threads=1on both hardware D3D12 (VICTORY_D3D12_DEBUG=1) andVICTORY_D3D12_WARP=1: 2 passed, 0 failed (parse_on_defaults_off_and_accepts_one,disabled_profiler_leaves_ring_and_sums_unallocated)Ports `avatarmanz`'s opt-in `VICTORY_PORT_RT=1` submission-stall fix (off by default; A/B-able in `diagnostics` builds) and diagnostics-gated `VICTORY_RT_STAMPS=1` compute-dispatch profiler onto a clean standalone PR separate from the VRAM arena budget/spill work: 1. Opt-in `VICTORY_PORT_RT=1` (`port_rt.rs`, `host/card_steps.rs`, `host/place.rs`, `host.rs`, `lib.rs`): - Enables placed-copy ordering (`placed_order`) and tracks `cut_for` split counters when `VICTORY_PORT_RT=1`, eliminating submission stalls caused by fills behind unrelated placed copies. - Carries `from_upload: bool` on `Does::Placed` (populated from `Placed::uses_upload()`) so an earlier card-taken copy writing `src` of an upload-backed placed copy is still safely refused (`BEHIND_PLACED`). - Adds `HostList::forward_fill` (for `defer_fill`, `defer_constants`, and `defer_fill_buffer`) forwarding same-list fills covered by an upload-backed placed copy directly to the copy's source across exact `Copy`, `GpuWrite`, and `RawCopy` ranges. 2. Diagnostics `VICTORY_RT_STAMPS=1` (`host/rtstamps.rs`, `draw.rs`, `host.rs`): - Brackets direct and indirect compute dispatches with GPU timestamp queries grouped by structure builder, structure walkers, and other dispatches, with a zero-frequency guard in `make_rt_ring`.@TaynanGT on GitHub · 2026-11-27 14:49 UTC · original
@Vladimir-Human The forward-fill experiment has a useful control now. I’m looking at lists with more than one prior copy, including a second copy that overlaps part of the first. With the switch enabled, the fill should use the latest bytes over the overlap and preserve the first copy’s non-overlapping range. The stamps option gives us a way to measure the wait in the same route.
@Vladimir-Human on GitHub · 2026-11-27 19:51 UTC · original
@TaynanGT Thanks for reviewing
#299. Since merged#344(df01b38,VICTORY_PLACED_FILL_REDIRECT=1) now handles redirectingStep::Fillreads behind card-sourced placed copies with overlap/intervening-write checks inhost/card_steps.rs(superseding#299'sVICTORY_PORT_RT=1forward-fill path), would you prefer that I close#299or rebase & narrow#299strictly to the standalone opt-inVICTORY_RT_STAMPS=1(host/rtstamps.rs) dispatch timestamp profiler?@TaynanGT on GitHub · 2026-11-27 19:59 UTC · original
@Vladimir-Human Please keep #299 open and narrow it to the dispatch profiler under
VICTORY_RT_STAMPS=1. #344 covers the forward-fill part. Keep timestamp queries and resolves out of submissions when the profiler is off.perf(rt): opt-in VICTORY_PORT_RT forward-fill submission path and VICTORY_RT_STAMPS diagnosticsto perf(rt): opt-in VICTORY_RT_STAMPS dispatch timestamp profilerb031d15ebcto581a861b0e@Vladimir-Human on GitHub · 2026-11-27 20:41 UTC · original
@TaynanGT Done — rebased onto
main(2a577f8) and narrowed#299strictly to theVICTORY_RT_STAMPS=1(diagnostics) compute dispatch timestamp profiler:port_rt.rs,forward_fill, and allhost/card_steps.rs/host/place.rs/lib.rschanges (leaving#344as the sole forward-fill path).before()returnsNonebefore touchingring()whenVICTORY_RT_STAMPSis off or unset, so no query heap/readback ring is created and zeroEndQuery/ResolveQueryDatacalls enter command lists.host::rtstamps::tests::{parse_on_defaults_off_and_accepts_one, disabled_profiler_leaves_ring_and_sums_unallocated}, verifiedxtask policy(323 files ok),clippy(default +diagnostics, 0 warnings), andrtstamps2/2 passing on bothVICTORY_D3D12_DEBUG=1(RTX 4070 SUPER) andVICTORY_D3D12_WARP=1.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.