Skip to content

[upstream #1060] Tests: GPU UMA tests skip where D3D12 has no heaps over process memory - #90

Closed
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1060
Closed

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1060

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

On Apple's D3DMetal (macOS, CrossOver) OpenExistingHeapFromAddress answers E_NOTIMPL (0x80004001), so there are no GPU heaps over process memory. Six GPU tests that need them fail there instead of skipping: five unwrap runner::run_in_arena and panic on that error, and gpu_sparse_vram_descriptors_buffers_and_xmem finds no window VAs after real::init(). Part of #258.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: no_host_heaps() skips with no GPU UMA only when the error is E_NOTIMPL from OpenExistingHeapFromAddress. run_in_arena_or_skip() wraps run_in_arena with it, used by gpu_unified_memory_arena, gpu_mesh_mode_reads_memory_windows (its positions closure now returns an Option), gpu_memory_windows_above_4_gib, gpu_memory_windows_reject_out_of_uma_aliasing and gpu_bvh64_intersect_ray_across_memory_windows_and_grazing. gpu_sparse_vram_descriptors_buffers_and_xmem checks the runtime's uma_error the same way before reading the window VAs. Any other error still fails the tests.

Tested

  • MacBook Pro M5 Pro (20-core GPU), 48 GB, macOS 27.2.1, CrossOver 26.3.0.39832, D3DMetal 3.0 ("AMD Compatibility Mode"), Rosetta 2. Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<lib test exe> --exact <test> --test-threads=1 --nocapture).
  • On main 9aec53d (full per-test run): all six fail, five with called Result::unwrap() on an Err value: "OpenExistingHeapFromAddress: Not implemented. (0x80004001)" and the sparse test with no valid window VAs.
  • At this PR's head b22e57c (on main 384f7f7): 6 passed, all six SKIPPED …: no GPU UMA.
  • Mutation: with the check looking for another code (0x8007000E), all six fail again.

Regression run

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

Not tested

  • Windows and any host with heaps over process memory: there OpenExistingHeapFromAddress succeeds, nothing should skip, and the tests run as before, but I have not run it.
  • XCL_REQUIRE_GPU=wave64 / mesh turns these skips into failures, as for every reason but "no mesh shaders".
  • Not in this PR: list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu fails the same way but lives in list_x.rs (a runtime file for PR checks), and gpu::shader::tests::readable_answers_from_the_working_set_without_touching_pages fails for another reason (Wine's QueryWorkingSetEx).
  • Tests: the UMA import check test skips where D3D12 has no heaps over process memory xcl-dev/xcl#1024 handles gpu_uma_import_check_at_init the same way in another part of the file; the two do not overlap. Tests: the sparse VRAM test no longer depends on what ran before it xcl-dev/xcl#614 edits the real::init() line above the sparse test's new check and still applies on top of this change.

AI use

  • Claude Code with Claude Opus 5.5 traced the failures from a full per-test run, wrote the change and this description, and ran the tests and the mutation above on this machine.

Mirror of xcl-dev#1060 (auto-synced, do not edit).

On Apple's D3DMetal (macOS, CrossOver) OpenExistingHeapFromAddress
answers E_NOTIMPL (0x80004001). Five GPU tests unwrapped
runner::run_in_arena and panicked on it (gpu_unified_memory_arena,
gpu_mesh_mode_reads_memory_windows, gpu_memory_windows_above_4_gib,
gpu_memory_windows_reject_out_of_uma_aliasing,
gpu_bvh64_intersect_ray_across_memory_windows_and_grazing), and
gpu_sparse_vram_descriptors_buffers_and_xmem found no window VAs.

no_host_heaps() skips with "no GPU UMA" only for that error (the
runner's error, or the runtime's uma_error after init);
run_in_arena_or_skip() wraps run_in_arena with it. Any other error
still fails the tests: with the check looking for another code, all six
fail again on this host. (#258)

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

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Upstream PR xcl-dev#1060 was closed or merged.

@ufoptg ufoptg closed this Nov 25, 2026
@ufoptg
ufoptg deleted the upstream-pr/1060 branch November 25, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants