Repository navigation
Conversation
sparse.rs previously stored free pool tiles in a flat Vec and popped the oldest cooled tile from cooling in FIFO order before checking free. When tiles freed across multiple 64 MiB pools cooled, reuse_tile handed out tiles from nearly-empty draining pools instead of packing fuller ones, keeping sparse pools pinned so retire_free_pools could not reclaim them and splitting UpdateTileMappings calls across more heaps. Partition free sparse pool tiles by heap in FreePools. reuse_tile drains cooled tiles into their heaps and takes from the fullest partially-used heap (fewest free tiles in 1..POOL_TILES, lowest heap index on ties), leaving nearly-empty and all-free heaps untouched for retirement unless no partially-used heap has a free tile. retire_free_pools drains cooling and checks heap counts in O(pools) instead of scanning all free tiles, and before_execute_on passes free.has_empty_heap() to retire_due so an all-free heap completed by take_tile's drain_cooling still retires even when cooling is empty. Measured on RTX 5080 (180 s Series S XCL_DEVICE_TYPE=lockhart A/B vs nvidia-dev af2cecc): peak commit 22042 -> 21818 MB (-224 MB), steady sparse pools 5440 -> 5376 MB (-64 MB), UpdateTileMappings calls 891 -> 736 (-17.4%) for 120k mapped tiles, 0 device removals, 0 crashes. sparse::tests: 61 passed, 0 failed, 1 ignored. Assisted-by: Antigravity (Gemini 4 Neon (High))
|
I compared Both revisions matched all 67,239,936 initial bytes and passed five full 65,536-byte tile readbacks across reuse and retirement. The difference came at allocation: the parent reused the draining heap and retained two active slots. The PR reused the denser heap, allowing the draining heap’s active slot to retire and leaving one. This checks data preservation and pool bookkeeping. I did not measure deferred heap destruction, physical VRAM savings, or a title workload. I used Codex GPT-6.2 Sol for the fixture and WARP runs. A separate GPT-6.2 Sol agent independently checked the fixture, artifacts, and recorded results. Codex GPT-6.2 Astra wrote this comment. |
|
AMD run for the Not tested line. Tested: pass, head
The sparse tests that need a device make it with Not tested: Series X/S sweeps in a title, stacking with #2630, Intel, Linux / Wine. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report. |
|
Ran the sparse-pool reuse tests at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. The new Not tested: the release smoke and A/B frame times from the description, a paired 60 s smoke run, the full workspace suite and its seven known failures, AMD and Intel GPUs, native wave64 hosts, Wine, game data. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
|
Independent desktop NVIDIA (natural 8 GB VRAM) verification of PR #2898 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1648 filtered out × 3 (0.00s, 0.00s, 0.00s) |
cargo test --release -p xcl --lib hle::d3d12x::sparse:: (3 consecutive runs) |
61 passed; 0 failed; 1 ignored; 1587 filtered out × 3 (2.32s, 2.30s, 2.19s; early_commit_timing is #[ignore]) |
cargo build --release -p xcl --bin xcl |
Clean build (1m 25s, exit 0) |
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base on nvidia-dev (af2cecc40886a8682ecf3267f5328c6dc4b66ad7, cached baseline on the same machine):
xcl-smoke v1
commit: af2cecc40886a8682ecf3267f5328c6dc4b66ad7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1547 (PresentX 1547)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16342 MB
PR #2898 (8cf249e55603a3e6dc4c34aa9e1b4fec5077d997):
xcl-smoke v1
commit: 8cf249e55603a3e6dc4c34aa9e1b4fec5077d997
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15014 MB
Runtime log observations (xcl.log)
9384log lines,0[ERROR]/ device-removal / panic lines.- Active sparse uploads observed: last
sparse windows timing:entrywrite-watch 468 ms (528988 dirty pages), lock wait 10 ms, chunk scan 48 ms, upload 193 ms (39181 runs, 30367 of them in 235 dispatches). - Final draw/memory telemetry in log:
19099 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14925 MB committed by the process; video memory 6181 MB local, 4778 MB non-local; sparse pools 896 MB (838 MB mapped); video memory budget 7022 MB.
Limits of coverage
- Fullest-heap tile packing (
reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire, 3/3) and the fullhle::d3d12x::sparse::suite (61/0/1, 3/3,early_commit_timingremained#[ignore]) passed on RTX 4060. - The 60 s menu capture on
title: 29640639stayed atsparse pools 896 MB (838 MB mapped)and confirms clean steady-state behavior onnvidia-devwithout exercising multi-minute world streaming churn or measuring long-run sparse pool retirement counts; frame-count and peak-commit deltas vs. the cachedaf2cecc4baseline reflect normal single-run startup/worker variance and are not attributed to this PR.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
Tested: Clean Not tested: Two-heap packing on Arc, physical VRAM savings, deferred heap destruction, full suite or retail smoke. AI use: T3 Code / Codex ( |
Part of #2688.
sparse.rsstored free sparse pool tiles in a flatVec<(u32, u32)>and poppedcoolingFIFO beforefree, scattering reuse across nearly-empty draining 64 MiB pools soretire_free_poolscould not reclaim them and splittingUpdateTileMappingsacross more heaps.This partitions free tiles by heap (
FreePools):reuse_tiledrains cooled tiles into their heaps and packs the fullest partially-used heap (1..POOL_TILES, lowest index on ties), leaving nearly-empty and all-free heaps untouched for retirement unless no partial heap has space.retire_free_poolschecks heap counts in O(pools), andbefore_execute_onpassesfree.has_empty_heap()toretire_dueso an all-free heap completed duringdrain_coolingretires even whencoolingis empty. Orthogonal to #2630.What is in it
crates/xcl/src/hle/d3d12x/sparse.rs(+190/-29): per-heapFreePools, fullest-heapreuse_tile,free_heaps/retire_free_pools/retire_dueupdates, and unit testreuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire.Tested
32.0.16.1088), Ryzen 7 9800X3D, 32 GB RAM, Win11 26200,rustc 1.97.0(stable-x86_64-pc-windows-msvc), DXC1.9.2609.5, debug (release for smoke & A/B):cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1748 passed, 7 failed, 48 ignored, 27SKIPPED(21 no wave64, 3 wave32 per-lane f16/cvt refused, 2 no heap windows, 1pso_measurementdriver cache; all 7 pre-existing onaf2cecc4:texture_upload::testsx2,d3d12_mesh_stream,gpu_compute_e2e,gpu_two_pass_cache_e2ex2, intermittente2edriver log write).hle::d3d12x::sparse::tests: 61 passed, 0 failed, 1 ignored.XCL_ADAPTER=warp XCL_TEST_WARP=1):reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire1 passed, 0 failed.XCL_DEVICE_TYPE=lockhart XCL_PREPARE=0 XCL_NETWORK=0 XCL_ACTIVITY=1, warm cache,af2cecc4vs8cf249e5): peak commit22042 -> 21818 MB(-224 MB), final commit20250 -> 20144 MB(-106 MB), final local VRAM8159 -> 8093 MB(-66 MB), steady sparse pools5440 -> 5376 MB(-64 MB, slack855 -> 791 MB),UpdateTileMappings891 -> 736(-17.4%for 120k mapped tiles), frames5173 -> 5237,0removals/crashes.32.0.16.1088), Ryzen 5 5600X, 16 GB RAM, Win11 26200,rustc 1.99.1(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11, debug:cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1749 passed, 6 failed, 48 ignored, 30SKIPPED(same 6 pre-existingaf2cecc4failures; 0 new failures).XCL_ADAPTER=warp XCL_TEST_WARP=1):reuse_tile_packs_fuller_heaps_so_nearly_empty_pools_retire1 passed, 0 failed.Regression run
Not tested
AI use
Ran via Samaritan:
FreePoolsand its unit test, ran the paired RTX 5080 A/B measurement, dual-PC test suites, WARP checks, smoke run, and initial PR prep/coordination.sparse.rs(PASS), live upstream duplicate and mergeability audit againstnvidia-dev(eae01502), andscripts/pr_check.py/URL verification.