Skip to content

Tests: the UMA import check test skips where D3D12 has no heaps over process memory - #1024

Open
vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/uma-import-check-skip
Open

vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/uma-import-check-skip

Conversation

@vakaobr

@vakaobr vakaobr commented Nov 24, 2026 •

Copy link
Copy Markdown

gpu_uma_import_check_at_init fails on the Macs in #258 (CrossOver + D3DMetal) with an empty message. D3DMetal answers E_NOTIMPL (0x80004001) for OpenExistingHeapFromAddress, so open_uma records it in uma_error and returns before check_uma_import: the check's result stays empty ("not run"), also with XCL_UMA_CHECK=0. The runtime is right (it reports the windows as unavailable in uma_error); the test assumed host-memory heaps. Part of #258.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: when uma_error is E_NOTIMPL from OpenExistingHeapFromAddress, the test asserts the check did not report "ok" and skips with no GPU UMA. Any other UMA error, and every host that opens the windows, gets the unchanged assertion, whose message now includes uma_error.

Tested

Regression run

Test-only change in tests.rs: no xcl-smoke blocks.

Not tested

AI use

  • Claude Code with Claude Opus 5.5 found the cause with a temporary probe, wrote the test change and this description, and ran the tests and mutations above on this machine.

…process memory

gpu_uma_import_check_at_init failed on the Macs in xcl-dev#258 (CrossOver +
D3DMetal) with an empty message. D3DMetal answers E_NOTIMPL
(0x80004001) for OpenExistingHeapFromAddress, so open_uma records it in
uma_error and returns before check_uma_import: the check's result stays
"" ("not run"), also with XCL_UMA_CHECK=0. The runtime is right; the
test assumed host-memory heaps.

For exactly that error the test now asserts the check did not report
"ok" and skips with "no GPU UMA". Any other UMA error, and every host
that opens the windows, gets the unchanged assertion, whose message now
includes uma_error. Measured with mutations in real.rs: the check
reporting that the GPU does not see CPU writes (xcl-dev#175), the open failing
with 0x8007000E, and the check claiming "ok" with no window imported
each still fail the test.

Assisted-by: Claude Code (Claude Opus 5.5)
@mikebuckets171

Copy link
Copy Markdown

Verified on a second Apple silicon host, and on the gnullvm target rather than the GNU one. Same shape as the description's result, from a different toolchain - which matters because #783 is proposing CI for exactly this target and Linux Wine hosts use it too.

Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal (the adapter reports "AMD Compatibility Mode"), Rosetta 2. Rust 1.100.0, x86_64-pc-windows-gnullvm cross with LLVM-MinGW 20261117 (clang 23.1.6 + lld + UCRT), --release --locked, test binaries run under Wine. Each test in its own process, --exact <full test path> --nocapture --test-threads=1; the lib test binary reports 706 tests on both sides (705 filtered out).

test 6efdabc (this PR's base) 699975b (head)
gpu::recomp::tests::gpu_uma_import_check_at_init FAILED at crates/xcl/src/gpu/recomp/tests.rs:3371, and the panic message is empty - the bare assert!(s.starts_with("ok") || s.starts_with("off"), "{s}") with s empty, which is the "fails with an empty message" the description names SKIPPED …gpu_uma_import_check_at_init: no GPU UMA, test result: ok. 1 passed; 0 failed
gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem FAILED at tests.rs:3397, assertion left == right failed FAILED at tests.rs:3407 (the same assert, moved by the patch), same message

Both runs print, before the test body's own result:

xcl: UMA: 3 sparse VRAM window(s) (12 GiB VA) + 512 MB coherent window at 0x400000000
xcl: D3D12.X: UMA not available to the GPU: OpenExistingHeapFromAddress (window 3): Not implemented. (0x80004001)

so this host reaches the skip through the same door the description describes: OpenExistingHeapFromAddress → E_NOTIMPL, recorded in uma_error, the import check never runs. gpu_sparse_vram_descriptors_buffers_and_xmem failing on both sides, unchanged, matches the description's second host too - so on this host as well that one is a separate issue, not this PR's.

Two things this pair adds: the skip is not specific to the mingw-w64 GCC build the description tested with (this is the gnullvm/LLVM-MinGW route), and the head here is the PR as it stands on today's main (6efdabc), so the result describes the PR against current main rather than against 9aec53d.

Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; bench scripts cross-build with LLVM-MinGW and run the test binaries under Wine, with the game stopped and local inference unloaded for each run. AI use: GPT-6 Luna built both trees, ran the tests and drafted this comment; the counts and codes are from those runs.

@DavidM1911

Copy link
Copy Markdown
Contributor

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib gpu_uma_import_check_at_init: 1 passed — the UMA check reports ok, 1 window(s) on this adapter, so the new skip branch is correctly not taken (the s.starts_with("ok") path still asserts). The E_NOTIMPL/D3DMetal branch could not be exercised here (no such adapter), but the guard is narrow and the happy path is unchanged.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

@shortside

Copy link
Copy Markdown

Test report from a second Mac, head 699975b against its merge base 6efdabc.

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2; CrossOver 26.3 (Wine 11.0), Windows 10 bottle, D3DMetal; DXC 1.9.2609. Cross-built for x86_64-pc-windows-msvc with clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (--exact --nocapture, 60 s cap).
  • gpu_uma_import_check_at_init: base failed; head passed with SKIPPED … no GPU UMA.

Not tested

  • Windows (where the test should still run, not skip), the rest of the suite.

AI use

  • Claude Code with Claude Fable 5.2 built both commits, ran the tests and wrote this report.

@bjarngard

Copy link
Copy Markdown

Test report for head 699975b (AMD, native wave64, and RTX 5080)

Tested

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 727 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: gpu_uma_import_check_at_init passed
  • RTX 5080 (Blackwell, wave32), driver 621.24: full suite 727 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • gpu_uma_import_check_at_init ran and passed on both adapters; the new skip did not fire on either

Not tested: Intel.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

@JoaoPauluu

Copy link
Copy Markdown

A Linux data point with vkd3d-proton, for the hosts where this skip must not fire.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 699975b as it is (merge base 6efdabc), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact, 90 s cap).
  • gpu_uma_import_check_at_init: ok, no SKIPPED. vkd3d-proton opens the heaps over process memory: UMA import check: ok, 1 window(s), 3241 µs, UMA opened (3 sparse VRAM window(s), 512 MB coherent window). So the new skip branch is not taken here and the test still asserts the check.

Not tested

  • the other lib tests on this head; native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built the commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants