Skip to content

Tests: return early without runner::skip_test on unset XCL_HEAP_WINDOWS (#1651) - #1666

Open
heditrigui wants to merge 2 commits into
xcl-dev:mainfrom
heditrigui:tests/heap-window-oom-skip-fix
Open

heditrigui wants to merge 2 commits into
xcl-dev:mainfrom
heditrigui:tests/heap-window-oom-skip-fix

Conversation

@heditrigui

Copy link
Copy Markdown
Contributor

In tests/gpu_compute_e2e.rs, heap_window_out_of_memory_falls_back_to_the_switch_form tests fallback to the switch form when heap-window builds refuse with OOM (#1651).

When XCL_HEAP_WINDOWS=1 is not set (the default), the test calls runner::skip_test("no heap windows"). Under XCL_REQUIRE_GPU=mesh or XCL_REQUIRE_GPU=wave64, skip_test checks whether the skip reason is one of the missing adapter capabilities and turns unrecognized skip strings into panics:

heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows, but XCL_REQUIRE_GPU=mesh

Because heap windows are an opt-in software configuration (similar to XCL_ASYNC_PSO on line 350), an unset environment flag should not be treated as missing GPU hardware support. Return early with the existing informational message instead of invoking runner::skip_test.

Fixes #1651.

Tested

  • python -B -m unittest discover -s scripts -p "test_*.py" -v: 16 passed, 0 failed.
  • Validated PR description and non-runtime test target with scripts/pr_check.py --local.
  • Verified heap_window_out_of_memory_falls_back_to_the_switch_form matches the early return pattern of XCL_ASYNC_PSO in �sync_compute_pso_registers_real_pso_and_not_standin.

Not tested

  • Retail game smoke tests: this PR modifies only an integration test in crates/xcl/tests/ and does not touch runtime code or build dependencies.

AI use
Antigravity (Gemini 3.8 Flash (High)) investigated issue #1651, identified the opt-in skip mismatch with
unner::skip_test, aligned the return behavior with XCL_ASYNC_PSO, and verified PR conventions.

@broccolize

Copy link
Copy Markdown

Tested 4405f0d079273735b98266d45d2fe33811c08f05 on a GTX 1650 (driver 617.14), i5-10300H, Windows 11 build 26300.9974, and Rust 1.100.0 MSVC in debug mode.

  • With XCL_REQUIRE_GPU=mesh and XCL_HEAP_WINDOWS unset, the focused test failed on base c160d86 and passed on this PR.
  • With XCL_HEAP_WINDOWS=1, the focused test exercised the injected out-of-memory retry and verified the switch-form dispatch output.
  • cargo build --workspace passed. cargo test --workspace -- --test-threads=4 passed with and without XCL_REQUIRE_GPU=mesh. Each run reported 858 passed, 0 failed, 42 ignored, and two no wave64 skip diagnostics. No retail files were used.

One review point from the diff: if XCL_HEAP_WINDOWS=1 is set and the shared heap is unavailable, this change also returns success in strict mode. Could the test check the opt-in before GPU setup and retain runner::skip_test for the opted-in path when heap setup fails? I did not reproduce shared-heap allocation failure on this adapter.

AI use: OpenAI Codex (GPT-6) ran the tests and reviewed the diff.

@heditrigui

Copy link
Copy Markdown
Contributor Author

Great catch and suggestion @broccolize! Updated in bf6459d to check the XCL_HEAP_WINDOWS opt-in before GPU setup/locking: unopted-in runs return early without invoking runner::skip_test, while runs explicitly opted in via XCL_HEAP_WINDOWS=1 proceed to device setup and retain runner::skip_test("no heap windows") if shared-heap creation or window views fail.

@throny

throny commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Two contributors checked independently and found that #1670 #1680 #1690 solves the same problem (for #1651) in a different way: #1607, group D35. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

@JJAutoCompare

Copy link
Copy Markdown

XCL PR #1666 verification

Tested clean detached head bf6459dc1dcaebb2adfb68b40dda81226799ffe7 on STOR-WINLAB. Windows 11 Enterprise Evaluation x64 build 26200, AMD64 Family 23 Model 113 CPU, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Build and test profiles were unoptimized with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run both exited 0 outside the Arc mutex. The latter built 19 test binaries.
  • cargo test -p xcl --test gpu_compute_e2e heap_window_out_of_memory_falls_back_to_the_switch_form -- --exact --nocapture ran under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and XCL_HEAP_WINDOWS unset. Each of the XCL_REQUIRE_GPU=wave64 and XCL_REQUIRE_GPU=1 runs had 1 passed, 0 failed, 0 ignored and 0 SKIPPED lines. Both printed the opt-in diagnostic and returned without a panic. The diff changes only crates/xcl/tests/gpu_compute_e2e.rs and places the guard before GPU setup. The runner recognizes wave64 as a strict setting.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the same mutex with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Exit 1. All 20 result lines in pr1666-suite.log total 840 passed, 18 failed, 42 ignored across 19 test binaries and one doctest run. The heap-window test also took the early return in this run.

Workspace failures and skips

  • xcl --lib had 17 failures: 13 compute pipeline creation errors (0x80070057) and four assertion failures covering FMA, implicit LOD, f16 writes and wave64 pixel reductions. The e2e target had one failure in the test title's dynamic depth-bias check.
  • Five lines began with SKIPPED : two for no wave64, one for tiled resources tier below 2, and two for missing D3D12 debug-layer support. These skips and the heap-window early return provide no GPU coverage for those paths.

Not tested

The opt-in heap-window OOM path, a matched main baseline, retail-title smoke, AMD or NVIDIA GPUs.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification and wrote this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1666-suite.log and published.

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.

Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage)

5 participants