d3d12: model the memory-value writers lists have besides ranks 71/72, read the waits' mask and engine (D3D12-LIST-VALUE-PRODUCERS) #3439
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
2 participants
Due date
No due date set.
Reference
leonida/mandy!3439
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/list-value-producers"
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 successfully merged and closed
Change
and by cause (no write seen at the address / a write seen that does not meet it / a write by a method not modelled
whose value would have met it / one whose value would not). One cumulative log line at most every 10 s, 30 a run, with
the waits recorded by engine. Addresses and counters only.
LEONIDA_LIST_VALUE_PRODUCERS, on by default,=0is the old behaviour):list has run, as 71/72 do; 64-bit clock flags are decoded (bottom of pipe 1 GPU / 2 system, top of pipe bit 4 / 8);
(address, comparison, reference, mask, engine)and applies the mask to the value read; the64-bit wait is
(address, comparison, reference, engine), no mask. The engine (0 ME, 1 PFP, 2 CE) is kept inthe wait, logged and counted. The compare stays unsigned;
never met, logged once). The wait calls' extra stack arguments follow console behaviour (hypothesis, not measured in Leonida).
d3d12/docs/findings.mdhas the note and the prediction;switches.mdregenerated.Tests
cargo test -p leonida-gpu --locked: 742 passed (CARGO_TARGET_DIR outside the repo). New: one test per producer(
newer_lists_write_the_values_of_ranks_90_to_92_137_and_138,every_producer_writes_its_value_and_clocks; withthe commit 1 tree those slots store nothing, the test asserts they do), mask/engine decoding
(
a_wait_applies_its_mask_to_the_value_only,the_engine_is_kept_and_counted), fence-address signal(
a_signal_meets_a_wait_at_the_fence_address), and the diagnostic book (cause, bounds, rate limit).LEONIDA_LIST_VALUE_PRODUCERS=0also run on the table test: nothing stored, as before.python -I tests/test_d3d12_switches.py,python -I scripts/check_no_game_data.pyon the touched files: pass.host::late_met_knownwith a real queued signal (it needs the global line); only itsmatching helper is tested.
In-game run
Game gate (
scripts/game-gate.ps1), switch on (default),-SeriesS, RTX 4060 8 GB, driver 32.0.16.1088, Windows 11,build with diagnostics: PASS, 322 s in the world, no device loss (VRAM peak 6 686 MB for a 6 709 MB budget, 0 s
over it; median 17.5 fps). One warning,
fault_after_stop: access violations in the runtime after the gate hadstopped the run (exit clean); not yet compared with a run of main, so not attributed to this change.
Not done yet: the A/B with
LEONIDA_LIST_VALUE_PRODUCERS=0on the same route, and a run on a card that loses itsdevice today (0x887A0005 reports). Volunteers with an 8 GB card are welcome: docs/game_gate.md.
AI-assisted
Written with Claude Opus 5.5 (Anthropic); reviewed by a separate Claude Opus 5.5 reviewer instance (not the author),
whose medium point (a global lock taken even with the switch off) is fixed in the last commit. Tested with
cargo testand the in-game gate above.🤖 Generated with Claude Code
Merged current main into the branch to clear the conflict (
983c7f6781):list.rskeeps main'sentryargument and#[inline(always)]plus this PR's mask and engine;findings.mdkeeps both notes.switches.mdregenerated.After the merge:
cargo test --locked -p leonida-gpu -p leonida746 + 60 + 5 passed, 0 failed;python -I tests/test_d3d12_switches.py22 OK;check_no_game_data.pyon the touched files: pass. The in-game gate in the description ran on1036522b82(before the merge); a second gate run with main's changes since then is still to do.AI-assisted (Claude Opus 5.5).
Thanks, here are the results.
scripts/game-gate.ps1 run ... -PlayArgs '-SeriesS', 300 s target, defaultLEONIDA_THIN=1(6 threads), RX 6800 XT, driver 32.0.21045.29003. Same data folder and caches for both runs, warmed first by a 60 s gate run on main withLEONIDA_THIN=0(PASS, 29.5 fps median).68427be7edevice_lost,world_not_reached)983c7f678device_lost,world_not_reached)Both are the same reset as in #3264:
0x887A0007(DEVICE_RESET), game exit0x887A0005,device-removed data; none. Removal context on #3439:the submitting thread was preparing a submission (3 submissions of ours started and not yet seen finished), of 27 lists, for 9.2 ms; on main:(11 submissions ...), of 35 lists, for 3.7 ms.On #3439, the log has no
memory-value waits passed without being metline at all, so no memory-value wait was passed unmet at a present before the reset.The gate run folders (
summary.json,run.json,events.jsonl,memory.csv,leonida.log), with the Windows user and PC names replaced:mandy-gate-main-rx6800xt.zip,mandy-gate-pr3439-rx6800xt.zip.AI-assisted: log analysis and write-up with Claude Opus 5.5 (High).
Merging, with Moon's written OK as maintainer (two maintainers only: the CONTRIBUTING rule against merging one's own PR is waived for this series). Second in-game gate on
983c7f6781(after the first main merge): PASS, 324 s in the world, no device loss, RTX 4060 8 GB,-SeriesS -PrecompileUsed. Branch updated with main1c3570a88a(bothfindings.mdnotes kept). The merged tree is the one tested locally:cargo test --locked -p leonida-gpu -p leonida -p leonida-hleall passed,tests/test_d3d12_switches.pyOK,check_no_game_data.pyclean. AI-assisted (Claude Opus 5.5).Thanks @MoonEyes, here are the results.
Same gate recipe as above (
-PlayArgs '-SeriesS', 300 s), this time with theLEONIDA_THIN=0workaround so the runs get past world entry. Same data folder and caches, one run per build.68427be7e983c7f678The mean fps is the gate's frame count divided by the time it covers (the world minus its first 60 s); the other columns are the gate's own. Both runs stopped cleanly on the target, cache saved, no crash, no
ERRORline, no missed pipeline wait, video memory under budget the whole time.Both runs are one each, and I played freely rather than on a fixed route, so I wouldn't read the fps gap as a gain from #3439. On main, the gate's
under_2_at_sis 200 s (one second with fewer than 2 frames; the longest gap with no frame was 1.4 s), against none on #3439.With
THIN=0, the log again has nomemory-value waits passed without being metline, over the whole run.So on this card #3439 does no harm, but it does not stop the device loss with the default
THIN=1(my results above, #3264). What avoids it here is #3031's pooled command allocators: the DONE on #3031.Logs:
mandy-gate-main-thin0-rx6800xt.zip,mandy-gate-pr3439-thin0-rx6800xt.zip(Windows user and PC names replaced).AI-assisted: log analysis and write-up with Claude Opus 5.5 (High).