Tests: wait for every quarantine mark before draining sparse tiles #2765
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2775"
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?
Imported from ivall/xcl. Originally posted by sage-sage on 2026-11-26T11:48:08Z.
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
Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-26T13:37:55Z.
AMD run (listed as untested): the sparse tests pass on an RX 9070 XT in 5 parallel runs in a row.
Head
e5e456capplied onmainb49be18, debug, Windows 11 Pro 26200, RX 9070 XT (RDNA4, driver 32.0.32029.2010):cargo test -p xcl --lib -- d3d12x::sparse --nocapture --test-threads=4, 5 times: each run 17 passed, 0 failed, 1 ignored, no SKIPPED.The sparse tests make their device on the default adapter (
create_device(None, ..)/D3D12CreateDevice(None, ..)), which is the RX 9070 XT on this machine. One more run withXCL_ADAPTER=3060gave the same result, but it still used the default adapter, so it is not an NVIDIA run of these tests.I did not run
mainrepeatedly to see the flake this PR fixes, so this shows the PR's tests are stable here, not that they failed before.Not tested: Intel, #2638 together with this PR.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by rgroenewoudt on 2026-11-26T16:33:09Z.
Tested on AMD Radeon RX 9070 (RDNA4) at this PR's head
e5e456c: the sparse tests pass in every run.Tested
AMD Radeon RX 9070, driver 32.0.32029.2010; AMD Ryzen 9 5950X; Windows 11 Pro build 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17; debug build
cargo test --workspace --no-fail-fast -- --test-threads=4: 1433 passed, 2 failed, 47 ignored. The 2 failures arefuzz_validate_and_gpu_1(seed 722) and_3(seed 1599), the AMD ones from #2115, not touched here.cargo test -p xcl --lib -- --test-threads=12, 6 runs:a_tile_decommitted_and_committed_again_keeps_its_video_memory,flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flightandflush_parked_quarantines_tiles_until_title_queues_finishpassed every time; 1307 passed, 2 failed (the same two fuzz tests), 27 ignored each runSKIPPED (7): 6 × f16 / f32 per-lane forms refused (#1426);
heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Before the change, on this card:
cargo test -p xcl --lib -- hle:: --test-threads=12, 20 runs on #2700's head (baseb49be18, the same sparse code asmain):a_tile_decommitted_and_committed_again_keeps_its_video_memoryfailed 2/20Not tested
hle::loop on this PR's head; the 6 runs above were the whole libAI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:35:18Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:56:17Z.
Triage (#1607) – head
e5e456cNo other PR makes this test change. #2638 rewrites the quarantine but does not touch these tests. The diagnosis holds on main:
quarantine_tilesmarks every queue of the same device frompresent::known_queues.D3D12CreateDeviceon one adapter returns the same device, so queues from other tests count. The helper usesRetiredTiles::marks(Option<Vec<(ID3D12Fence, u64)>>), which still has this shape on main. main has since changed these tests (drained tiles now go to acoolingstage), so the branch conflicts. On rebase, the wait should go before everydrain_quarantined()assertion.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.