Tests: the sparse VRAM test no longer depends on what ran before it #614
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!614
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/614/head"
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?
@LucasHoepfner on GitHub · 2026-11-24 02:31 UTC · original
LucasHoepfner:tests-sparse-vram-independent→main· +5 −5 · 1 files · 2 commits · merged 2026-11-25 02:04 UTCgpu_sparse_vram_descriptors_buffers_and_xmemfailed beside the title-texture tests for two reasons, both in the test. Fixes #343 (analysis: https://github.com/ivall/xcl/issues/343#issuecomment-7119667197). Fixes #1727: the second reason is also what hangs the GPU in parallel test runs on NVIDIA 32-lane cards, not the direct translator's group barrier (bisected by IgorAntunes66, #1727).S_LOAD_DWORD*instructions leftSOFFSETunset. The field is then 0, which iss0, so every load added the low half ofarg_table's address (t1_a = (s0 + 0x0 + s0) & ~3uin the translated HLSL). That is 0 only whilearg_tableis the first allocation in the coherent window. After an earlieruma.alloc(the placed-texture test takes 16 MiB) the descriptor loads read past the heap andout_bufstayed 0.gpu_uma_import_check_at_initcalledreal::init()directly. Two first calls at once open the UMA windows twice, and the second replaces the sparse state in use. This is also how the suite reaches #344.What is in it
Tests: the sparse VRAM test's scalar loads take no register offset:("SOFFSET", 125)on the three loads, as the other SMEM tests pass it (crates/xcl/src/gpu/recomp/tests.rs).Tests: the sparse VRAM and UMA import tests take the backend's device: both go throughd3d12x::backend(), which initialises once (same file). The change was first described by @CryingLaughing in #343.Tested
stable-x86_64-pc-windows-msvc; DXC 1.8.2502.11; debug.cargo test --workspace --no-fail-fast -- --test-threads=4on this head (0fb9f4a, onmaincb868b2): 685 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).--test-threads=45/5.main9ce2070(lib test binary, each run in its own process):main--exact)--exact)title_textures gpu_sparse_vram_descriptors_buffers_and_xmem --test-threads=4--test-threads=4submit 1 lane 0 mismatch(left 0, right 1077). Every run with both commits logged onesparse window(s)line; every mirror run without the second logged two.main, one extrau.alloc(0x1_0000, 256)beforearg_table(local edit) makes the sparse test fail alone, every time.mainae0518cagainst the same with0fb9f4amerged (clean merge, local). The whole lib test binary withXCL_DIRECT_DXIL=1and--test-threads=4, each run in its own process, the two builds alternating, 35 runs each:mainae0518c0fb9f4a0x887a0006)nvlddmkm153 events for that time, all inside the 5 hung runs. Without the variable nothing hung or failed on either build (10 runs each, 1037 passed, 0 failed, 26 ignored).XCL_DIRECT_DXIL=1both builds also failgpu_fmt_encode_int_sat_and_f16_rtzandgpu_image_get_resinfo_1d_arrayin every run. They came with #1929 and #1266, which change the HLSL path only, and are not part of this.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4on that merge: 1086 passed, 0 failed, 46 ignored. SKIPPED: 19 ×no wave64,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(Developer Mode is off), 3 per-lane programs with f16 instructions (refused (unsupported …)).Regression run
crates/xcl/src/gpu/recomp/tests.rschanges.Not tested
gpu_unified_memory_arenaandgpu_memory_windows_above_4_gibalso leaveSOFFSETunset on SMEM loads. I did not check whats0holds there and did not change them.XCL_DIRECT_DXIL=1. Thegpu::recomp::tests::gpu_filter on the HLSL path, where the RTX 5060 Ti report saw hangs, was not run here.AI use
@ghost on GitHub · 2026-11-24 02:40 UTC · original
Verified with the pairings from #343 (each the sparse test plus one title-texture test in one process, default threads, 6 runs each). AMD Radeon RX 9060 XT (RDNA4), Windows 11 26200, Rust 1.100.0, debug:
main3db536e0fb9f4a)placed_title_textures_share_vram_and_preserve_pixels+ sparsegpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes+ sparsetitle_textures gpu_sparse_vram_descriptors_buffers_and_xmem).\scripts\test.ps1with the PR merged: 686 passed, 0 failed, 41 ignored.AI use
@MesshM on GitHub · 2026-11-24 02:46 UTC · original
Test run of
0fb9f4a11948234945715726ffd035fdf624e597on AMD RDNA4; the PR was tested on NVIDIA only. I merged it onto currentmain3db536elocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 686 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 646 passed, 0 failed, 21 ignoredSKIPPED;gpu_sparse_vram_descriptors_buffers_and_xmemandgpu_uma_import_check_at_initpass in the full suite, next to the title-texture tests (#343's setting).Review:
SOFFSET 125is GFX10's SGPR_NULL, so the threeS_LOADs no longer adds0to their address. Replacingreal::init()withbackend() == Realis what stops the double init:d3d12x::backend()runsreal::init()once inside itsOnceLock, so tests that start together wait for one init instead of opening the UMA windows twice (gpu_ready()itself does not init the backend, so the assert does the init). I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@CryingLaughing on GitHub · 2026-11-24 02:49 UTC · original
Tested
XCL_ADAPTER=4080,XCL_REQUIRE_GPU=1, allXCL_SAMPLE_*variables unset.cargo test -p xcl --lib --locked -j 4 --no-run --message-format=json. For each cell, ran the resulting executable in three fresh processes with two fully qualified test names followed by--exact --test-threads=2 --nocapture. Each run pairedgpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmemwith one of the twohle::d3d12x::title_textures::testsfixtures below. Each passing process ran two tests with zero skips.cb868b200517d7b11bbfcb0146bf0c787ce632b69461cf727ab94c30dfc864adc83efe898a6946a10fb9f4a11948234945715726ffd035fdf624e597placed_title_textures_share_vram_and_preserve_pixelsgpu_mirror_upload_follows_cpu_writes_and_later_mapping_changesAll five failures were
submit 1 lane 0 mismatch, actual0, expected1077. All nine placed runs logged one sparse-window initialization. All six mirror runs before the backend change logged two, and all three on the PR head logged one. On this machine the scalar-offset change alone fixed the placed case, and the full change fixed both pairings. The PR head passed all 12 test executions across the six fresh processes.Not tested
AI use
@Kalmarv on GitHub · 2026-11-24 02:50 UTC · original
Test report for
0fb9f4amerged ontomain3db536e(local merge commit8e8c100, clean tree). Both pairings that failed in #343 pass with it, and the whole suite passes.Tested
xcllib test binary, each run in its own process, 6 runs per row,mainand the PR alternating:main3db536e3db536e+0fb9f4a--exactplaced_title_textures_share_vram_and_preserve_pixels+gpu_sparse_vram_descriptors_buffers_and_xmemsubmit 1 lane 0 mismatch(left 0, right 1077)--exactgpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes+ the sparse test0x887a0006)title_textures gpu_sparse_vram_descriptors_buffers_and_xmem --test-threads=4main, the placed pair fails with the UMA windows set up once (onesparse window(s) for the title's own memoryline per run), so the register offset is enough on its own.mainrun, and once in every PR run.arg_tableis at0x701000000(s0=0x01000000, not 0). Submit 1 still reads[1077, 1078], and both tests pass 3 of 3. In my earlier runs ona6f5f7athat failed,arg_tablewas at0x700000000(s0= 0), and those failures came from the double set-up. So each change fixes a different one of the two.cargo build --workspace && cargo test --workspace -- --test-threads=4on8e8c100, under a watchdog for the #344 hang (none happened): 686 passed, 0 failed, 41 ignored (thexcllibrary: 646 passed, 21 ignored). SKIPPED GPU tests: 2, bothno wave64(gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware). The lib binary set up the UMA windows once.Not tested
3db536e).gpu_unified_memory_arenaandgpu_memory_windows_above_4_gib, which also leaveSOFFSETunset on scalar loads (per the #343 comment that found the cause).🤖 Claude Opus 5.5
@fladit123 on GitHub · 2026-11-24 03:08 UTC · original
@LucasHoepfner, following up on my earlier investigation in #343, I tested your exact PR head in release mode on my RTX 4060. Both previously failing pairings now pass consistently.
Tested
0fb9f4a11948234945715726ffd035fdf624e597XCL_ADAPTER=4060Each exact pairing was executed in six fresh processes, totaling 24 successful test executions with no explicit skips.
All 12 paired runs logged exactly one
UMA openedmessage. No recurrence of the original mismatch or hang was observed.Commands
The full workspace run exited with code 0. The worktree remained clean.
Two explicit capability skips in the full suite, included in the passed count:
gpu_geometry_wave32_prefix_count_over_a_maskgpu_wave32_program_in_wave64_hardwareNot tested: native wave64, AMD/Intel GPUs, retail titles, optional external samples, or a fresh baseline comparison in this run.
No blocking findings within the tested scope. Nice work tracking down both root causes!
AI use: ChatGPT (GPT-6.2) assisted with test planning, log analysis and report preparation. All commands were executed locally by me.
@anes66 on GitHub · 2026-11-24 15:54 UTC · original
Native NVIDIA check of these two commits ported onto current
main930e8b49c1c2ec683d22c724a398b39111cd0e56.Integration head e0f2c3b preserves your authorship and both patches unchanged (
git range-diffmarks both equal). No runtime changes or new upstream PR.Tested
XCL_SAMPLE_*unset.cargo build --locked --workspace -j 4andcargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output: main 751 passed / 0 failed / 41 ignored; main + your two commits 751 / 0 / 41. Each printed two native-wave64 skips (gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware). Sample-gated passes are not title coverage.sparse-full-name=gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem; pair names are underhle::d3d12x::title_textures::tests.gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes+ sparsesubmit 1 lane 0 mismatch, left 0 / right 1077; two sparse initializations per runplaced_title_textures_share_vram_and_preserve_pixels+ sparseThe placed-pair skips exposed a separate test setup issue. The placed test creates a device through inbox
D3D12CreateDevicebefore the sibling selects Agility. On this Windows 10 setup the subsequentApplyToGlobalStatefails with0x887E0003; the sparse test then has no SM 6.6, and the placed test skips its reserved-cube probe. These counted passes do not cover the pairing.ead19fb is an optional two-line test-only follow-up on the integration tree: initialize
gpu::agility::state()before the placed test creates a device. With it, placed + sparse 3/3 executed and passed, no skips, and mirror + sparse 3/3 executed and passed, no skips, with one sparse initialization each. The test assertions and capability skip conditions are unchanged.Final build passed. The full workspace with that follow-up finished 751 passed / 0 failed / 41 ignored, with the same two wave64 skips. An earlier run of the same tree was 749 / 2 / 41, plus a third skip (
placed...: no D3D12 device):rotating_queue_self_deadlock_and_non_monotonic_rescue_do_not_hangandmid_list_write64_wait64_split_avoids_cycle_and_reuses_sparesfailed creating queues withDXGI_ERROR_DEVICE_REMOVED(0x887A0005). Both pass individually. Their cause is not established here; the later green run does not erase that result.Not tested: your exact head on its old base, release, AMD/Intel/native wave64, retail title smoke or optional samples. The added lines are inside the existing test; runtime code is unchanged.
AI use: Codex (GPT-6; exact variant unavailable) ported the commits, ran these checks, wrote the small test setup change, and prepared this report.
@PHeitor1 on GitHub · 2026-11-24 17:22 UTC · original
Tested
0fb9f4amerged ontomain9e3831eon Blackwell, against thatmainas the control: both pairs are fixed here.RTX 5060 Ti 8 GB (32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300, rustc 1.100.0 MSVC, debug, no
XCL_SAMPLE_*.Each run is its own process:
--exact <title-texture test> gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem --test-threads=2 --nocapture, 10 runs per cell. No SKIPPED line in any of them.placed_title_textures_…+ sparsegpu_mirror_upload_…+ sparsemain9e3831eAll 13 failures on
mainarelane 0 mismatch; no device removal this time.cargo test --workspace --no-fail-fast -- --test-threads=4with the PR: 776 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Not tested: AMD / Intel GPUs, a release build, a title, each of the two changes on its own.
Run and written with Claude Code (Claude Opus 5.5).
@Kalmarv on GitHub · 2026-11-24 17:31 UTC · original
Test report for this PR's exact head
0fb9f4aagainst its own basecb868b2, which our earlier report left out (that one tested the merge onto3db536e). The combinations of #343 fail on the base and pass on the head, 5 of 5 each, and the lib suite passes at the head.Tested
XCL_DXC_DIR).xcllib test binary ofcb868b2and of0fb9f4a(cargo test -p xcl --lib --no-run, clean trees), each run in its own process, base and head alternating, 5 runs per cell:cb868b20fb9f4atitle_textures gpu_sparse_vram_descriptors_buffers_and_xmem(default threads)submit 1 lane 0 mismatch(left 0, right 1077)--exactplaced_title_textures_share_vram_and_preserve_pixels+ the sparse test--exactgpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes+ the sparse test0x887a0006) that also failed the mirror testsparse window(s) for the title's own memorylines per run:0fb9f4a,<exe> --test-threads=4, once: 645 passed, 0 failed, 21 ignored. SKIPPED: 2, bothno wave64(gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware). One sparse-window set-up line in the run.Not tested
cargo test --workspace.main(it is 2 commits oncb868b2).gpu_unified_memory_arenaandgpu_memory_windows_above_4_gib, which the description says also leaveSOFFSETunset.AI use: Claude Code (Claude Fable 5.2, Claude Opus 5.5)
@IgorAntunes66 on GitHub · 2026-11-24 20:22 UTC · original
Test report: on an RTX 5070 (driver 621.24, Windows 11 26H2), main
85e3826withXCL_DIRECT_DXIL=1hangs the GPU(0x887a0006) in 9 of 15 runs of
cargo test -p xcl --lib -- gpu::recomp::tests::gpu_ --test-threads=4, and in 11 of 25runs of the whole lib. With this PR applied: 0 of 12 and 0 of 10. #1456 alone does not stop it (8 of 12), so the
backend()change matters. Details in #1727.AI use: Claude Code (claude-opus-5-5) ran the measurements and drafted this comment; I reviewed it.
@PHeitor1 on GitHub · 2026-11-24 21:21 UTC · original
Second report for
0fb9f4a, on today'smain, for #1727: the GPU hang reproduces here, and it goes away with this PR. It also hangs on the HLSL path here, so it does not needXCL_DIRECT_DXIL=1.Tested
XCL_SAMPLE_*.main4178e88against the samemain+0fb9f4a(clean merge). Thexcllib test binary,--test-threads=4, each run its own process, the two builds alternating. "Hung" =nvlddmkm153 in the System log during the run.XCL_DIRECT_DXILmain: hungmain: failed, no hanggpu::recomp::tests::gpu_gpu::recomp::tests::gpu_gpu_sparse_vram_descriptors_buffers_and_xmemalone,submit 1 lane 0 mismatch. That test also fails in every hung run. All 23 hung runs returned (no timeout); other tests fail in them too.Not tested: other drivers on this GPU (so nothing here says whether the rate depends on the driver), the whole lib on the HLSL path, each of the two commits alone, AMD / Intel, release, the debug layer / DRED, a title.
Run and written with Claude Code (Claude Opus 5.5).
@Filip722 on GitHub · 2026-11-25 01:47 UTC · original
Confirmed the first commit's scalar-offset fix on an RTX 5060 Laptop GPU under Proton. In a private variant of
gpu_sparse_vram_descriptors_buffers_and_xmem, placing the argument table after another coherent allocation reproduced the lane-0 failure (0, expected 1077) in both heap-routing modes. The routing assertions had already passed.I changed only the three synthetic
ENC_SMEMinstructions toSOFFSET=0x7Dand repeated both runs. Each passed all 64 output lanes on both GPU submissions, including the descriptor and CPU-data changes before the second submission. One run used coherent inputs and one routed the 2 MiB and 2 MiB + 64 KiB inputs into sparse VRAM. The 64 KiB output stayed coherent.Windows MSVC release tests under Proton Experimental 11.0-20261112, Bazzite 44, NVIDIA 615.78.08, vkd3d-proton 3.1.0 with local dxil-spirv compatibility changes. The underlying tree was
bf9eebd+ #1993 + #2009. This check covers the instruction encoding; I haven't measured the parallel initialization change here.OpenAI Codex (GPT-6.2-Sol) prepared the synthetic probe, ran it and wrote this report.