Repository navigation
gpu, docs: run repeated lists after their previous execution - #51
Conversation
|
This pull request now conflicts with its base branch. Please rebase it on |
064782c to
3621791
Compare
simnJS
left a comment
There was a problem hiding this comment.
Thanks, this fixes more than the layer message. On main, a list named twice re-records its one prelude (allocator.Reset, list.Reset) before either run executes, so the first run executes the barriers computed for the second. A texture in COMMON that the list first uses as a render target and leaves as a shader resource gets PIXEL_SHADER_RESOURCE to RENDER_TARGET in both runs, wrong for the first. Splitting before the repeat, with the wait outside the submission lock, fixes that cleanly, and the shift test shows both order and visibility.
Before I approve:
-
Docs. docs/analysis/gpu-frame.md still describes the rule this removes: lines 380-382 ("a second decision there keeps the copy the first let run"), 392-393 (the test "copies in both runs") and the table row at 455 ("credited in the code", a credit this PR removes with its code). Please update them here.
-
A count of splits. Each repeat now makes the submitting thread wait for the GPU to finish everything before it, then leaves the GPU idle while the next part is prepared. That thread is already the bottleneck in
run_as(docs/analysis/30fps.md). Could you count split submissions (a counter on the frame line, or adebug!with the part sizes) so a world session can be measured before merging? -
Accounting (minor). Only the last part is
counted, so the frame line's list count and longest submission leave out the earlier parts' lists and GPU time. Either add them to the last part or say so in the comment.
Also, please drop the Co-Authored-By trailer; the description already states the AI assistance.
|
This pull request now conflicts with its base branch. Please rebase it on |
|
Rebased onto main (05db757) and pushed 4d17d66 on top, with follow-ups from an in-house review:
Parallel |
3621791 to
4d17d66
Compare
simnJS
left a comment
There was a problem hiding this comment.
Thanks for the rebase and the follow-ups. Point 3 is done well: earlier parts are tallied before the last one is submitted, and the new tests cover both the sums and the lock.
Still open before I approve:
docs/analysis/gpu-frame.mdis unchanged. Lines 380-382 describe a case that can no longer happen, and lines 392-393 say the test copies in both runs, while it now copies once (texture.rs:2377).- There is no split count yet. A held submission waits between parts inside
queue::run_line, under its line lock and underrelease_held's global lock, so other queues stall too: the comment athost.rs:1507-1509only holds for the host submission lock. A count from a world session would settle the cost. - Both commits still carry the
Co-Authored-Bytrailers. Please drop them (a force-push is fine); the AI line in the description is what CONTRIBUTING asks for. - The description still says that the predicate rule goes and that
timestamps.rsis gated, and thedecidecomment attexture.rs:1262-1266describes a branch that can no longer be reached.
The gpu-debug-layer failures are the three known message-1419 tests that also fail on main; we're fixing them there.
Split host submissions before repeated command lists so each run waits for its predecessor before rewriting its prelude and predicate words. Keep the reviewed frame tally and regression tests: the frame line counts all parts once, and other host submissions can proceed during a wait. Document the retained title-queue and held-release locks. Diagnostics report cumulative calls, split waits and wait microseconds for measuring whether those locks affect a title session. Update both predicate callers and the frame notes to match repeated-list execution. Part of #45.
4d17d66 to
a1367f5
Compare
|
Pushed a1367f5 on abe3f40 with the requested source/documentation changes:
I also restored the already-reviewed frame tally and its two regression tests, which had been omitted from a prepared local rebase. The final branch ran all three repeated-list/tally/lock tests. Strict WARP diagnostics passed 580 GPU unit tests plus 3 UMA integration tests, and all six full WARP PR-check steps passed. Independent source review found no blocker. The world measurement is the remaining evidence gap. |
simnJS
left a comment
There was a problem hiding this comment.
Thanks, all four points are addressed:
- gpu-frame.md is updated;
- the counters are on the Meter;
- the lock comment is accurate;
- the trailers are gone.
The split and the wait outside the lock look correct to me: the host queue never waits on title fences, and each part finishes before the next is prepared. One non-blocking nit for a follow-up: timestamps.rs:576/585 call the submission count diagnostics-only, but LateLists::open_for (texture.rs:774) uses it at run time.
We'll read submission split totals in our own Series S world sessions on main.
What and why
A title can submit the same command list more than once. Preparing every occurrence before executing the first rewrote its prelude and predicate memory while those earlier executions still needed it; D3D12 also reports message 553 when the list executes again before its preceding execution finishes.
Host::run_assplits before a repeated list and finishes the preceding part before preparing the next.execute,submit, and title queue submissions use this path. The frame meter counts the title submission once, including every part's lists and times. Each texture predicate can then decide its next run independently; the old same-submission exception is unnecessary.The wait releases the host submission mutex. The title queue's line lock, and the global held-release lock for held submissions, remain held and can delay other queues. Diagnostics emit cumulative
submission split totalswith calls, split waits, and wait microseconds to measure that cost. The frame-analysis notes now describe this behavior.Part of: #45
Depends on: none
Area
gpu,docs: submission, completion accounting, texture/decode predicate callers, timestamps, synthetic tests, anddocs/analysis/gpu-frame.md.Tests
cargo xtask pr-checkpasses on my machineVerified on base
abe3f40: strict WARP diagnostics suite passed 580 unit tests and 3 UMA integration tests; all six WARPpr-checksteps passed. The build recompiled this worktree's crate and ran the branch-specific tests.executeand three throughsubmit, with ordered GPU readbacks and no message 553.a_split_submission_waits_between_its_parts_outside_the_lockholds the first part on a GPU gate and checks an unrelated host submission returns before that gate opens.the_frame_line_counts_a_split_submission_oncechecks[a,b,a,c,a]counts once with all five lists and summed times.Runtime measurement: a bounded 240-second Series S WARP run produced 228 meter samples. The last sample reported 9,040 submission calls, zero split waits and zero microseconds in split waits. The autopilot did not reach the world predicates, so this is front-end evidence only. It does not answer the requested world-session cost; that remains outstanding. The counters remain available for that measurement. No real logs or title-derived data are attached.
Provenance
AI assistance: Claude Code drafted the original implementation and tests. Codex integrated the rebase and review changes, restored the reviewed tally/tests, updated callers and diagnostics, and verified the result. No external code was copied or translated. I answer for every line.
Checklist
<area>: <summary>; one topic; under 400 changed lines, or the reason is above