Repository navigation
Conversation
Two sparse tests failed now and then in parallel runs of the lib tests (a_tile_decommitted_and_committed_again_keeps_its_video_memory at `assert!(s.drain_quarantined())`, and flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flight at "completed unmap batch should drain after fence completion"). The tests wait for the sparse queue's fence and then expect the quarantined tiles to drain. But quarantine_tiles also signals a mark on every queue in present::known_queues, which keeps every queue that ever went through note_execute. In a parallel run those include other tests' queues, which can still have work in flight, so a batch can stay quarantined after the sparse queue is done. The runtime is right to wait; the tests now wait for every mark of the quarantined batches too (at most 30 s) before checking. Measured on an RTX 4080 SUPER, whole lib test binary at --test-threads=12: main 9 sparse failures in 450 runs, this change 0 in 300 (150 of them alternated with main runs). Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AMD run (listed as untested): the sparse tests pass on an RX 9070 XT in 5 parallel runs in a row. Head
The sparse tests make their device on the default adapter ( I did not run Not tested: Intel, #2638 together with this PR. |
|
Tested on AMD Radeon RX 9070 (RDNA4) at this PR's head Tested
Not tested
AI use
|
Two sparse tests fail now and then in parallel runs of the lib tests:
a_tile_decommitted_and_committed_again_keeps_its_video_memoryfails atassert!(s.drain_quarantined()).flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flightfails with "completed unmap batch should drain after fence completion".The tests wait for the sparse queue's fence and then expect the quarantined tiles to drain. But
quarantine_tilesalso puts a mark on every queue inpresent::known_queues, and that list keeps every queue that ever went throughnote_execute, including queues of other tests that can still have work in flight. So a batch can rightly stay quarantined after the sparse queue is done. The runtime is right to wait. Now the tests wait too, for every mark of the quarantined batches (at most 30 s), before they check. Test-only change.What is in it
crates/xcl/src/hle/d3d12x/sparse.rs(tests only): await_for_quarantinehelper, called afters.wait_for(s.value)in the three places that then expect the batches to drain.Tested
b49be18.cargo test --workspace -- --test-threads=4: 1435 passed, 0 failed, 47 ignored, 29 SKIPPED lines, the same asmainon this machine (wave64, debug layer, Developer Mode, heap windows).--test-threads=12,main's sparse code (main, ormainplus an unrelated test-only fix in another file):a_dispatch_with_a_pipeline_still_building_waits_at_the_submit,placed_title_textures_share_vram_and_preserve_pixelsandwrites_land_after_the_queueflakes.Regression run
#[cfg(test)] mod testsinsparse.rschanges).Not tested
quarantine_tiles_for). It still marks every queue fromknown_queues, so this helper should still apply there, but I have not tested the two together.AI use
🤖 Generated with Claude Code