Tests: select the requested adapter for heap probes #2881

Merged
andrewDoing merged 1 commit from upstream-pr/2881 into main 2026-12-02 17:39:28 +00:00
andrewDoing commented 2026-11-26 20:58:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-26T20:58:48Z.


The opt-in D3D12 heap diagnostics ignored XCL_ADAPTER, so they could print plausible limits for the default GPU while a different adapter was requested. Honor the selector, identify the actual device and report unavailable adapters through the standard skip mechanism.

What is in it

  • crates/xcl/tests/heap_probe.rs: select the requested native D3D12 device for all four ignored probes, preserve the default-device behavior for auto, and print the adapter and LUID. When a device is unavailable, permissive mode now skips and strict mode fails.

Tested

  • NVIDIA RTX 5070, driver 616.92; Ryzen 7 5700X3D; Windows build 26300.10075; Rust 1.100.0 MSVC, debug; SDK DXC/DXIL 1.8.2502.11.
  • Manually ran the ignored view_heap_capacity probe on the RTX 5070 and WARP. The former reported maximum 1,000,000 views / 4,080 samplers and rejected a 1.2M view heap; WARP reported 2,097,152 / 2,097,152 and created it. auto selected the RTX 5070 as before.
  • With a nonexistent selector, all four ignored probes reported named skips; with XCL_REQUIRE_GPU=mesh all four failed as expected. Before the change the strict view_heap_capacity control instead printed results from the default GPU.
  • cargo test --workspace --no-fail-fast -- --test-threads=4, with a writable workspace DXIL cache: 1,441 passed, 5 failed, 47 ignored. A fresh clean-main run at 8b957bec had the same totals. Four failures were known RTX 50 fuzz seeds (#1905), and one was the synthetic-title DRED test. Both logged 26 skip events: 21 no wave64, three unsupported per-lane forms, one unavailable driver-cache option, and one unavailable heap-windows feature.

Regression run

  • Not run: changes are confined to integration-test diagnostics.

Not tested

  • The other three opt-in diagnostics on live adapters, other GPU vendors, retail titles, or performance.

AI use

  • OpenAI Codex with GPT-6.2 Astra identified, implemented and tested the change; another GPT-6.2 Astra agent independently reviewed it. Codex coordinated and prepared the PR.
<!-- greyfinch-sync:ivall/xcl:issue:5517057493 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2881). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-26T20:58:48Z. --- The opt-in D3D12 heap diagnostics ignored `XCL_ADAPTER`, so they could print plausible limits for the default GPU while a different adapter was requested. Honor the selector, identify the actual device and report unavailable adapters through the standard skip mechanism. **What is in it** - `crates/xcl/tests/heap_probe.rs`: select the requested native D3D12 device for all four ignored probes, preserve the default-device behavior for `auto`, and print the adapter and LUID. When a device is unavailable, permissive mode now skips and strict mode fails. **Tested** - NVIDIA RTX 5070, driver 616.92; Ryzen 7 5700X3D; Windows build 26300.10075; Rust 1.100.0 MSVC, debug; SDK DXC/DXIL 1.8.2502.11. - Manually ran the ignored `view_heap_capacity` probe on the RTX 5070 and WARP. The former reported maximum 1,000,000 views / 4,080 samplers and rejected a 1.2M view heap; WARP reported 2,097,152 / 2,097,152 and created it. `auto` selected the RTX 5070 as before. - With a nonexistent selector, all four ignored probes reported named skips; with `XCL_REQUIRE_GPU=mesh` all four failed as expected. Before the change the strict `view_heap_capacity` control instead printed results from the default GPU. - `cargo test --workspace --no-fail-fast -- --test-threads=4`, with a writable workspace DXIL cache: 1,441 passed, 5 failed, 47 ignored. A fresh clean-main run at `8b957bec` had the same totals. Four failures were known RTX 50 fuzz seeds (#1905), and one was the synthetic-title DRED test. Both logged 26 skip events: 21 no wave64, three unsupported per-lane forms, one unavailable driver-cache option, and one unavailable heap-windows feature. **Regression run** - Not run: changes are confined to integration-test diagnostics. **Not tested** - The other three opt-in diagnostics on live adapters, other GPU vendors, retail titles, or performance. **AI use** - OpenAI Codex with GPT-6.2 Astra identified, implemented and tested the change; another GPT-6.2 Astra agent independently reviewed it. Codex coordinated and prepared the PR.
SlopTart commented 2026-11-26 21:40:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T21:40:53Z.


Linux (Wine) dual-lane run at head 2c50cc71 - safe, but it does not change our NVIDIA Wine red.

Rig (Ryzen 9 9900X / RX 7900 XT / wine-11.0 Proton): 606/2, red set identical to today's fresh main baseline. Nothing to see on RADV.

Boxb (i5-10600K / GTX 1070 550.163.01 / wine-10.0 + vkd3d-proton, xvfb): 605/3, and the veteran red list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu - the one we flagged in our #2771 row as NVIDIA-only - still fails identically at your head. So the adapter-selection fix does not reach whatever is wrong in the Wine + NVIDIA stack; the test gets the right adapter here but still reads stale CPU-side contents for the open existing heap.

Suite: cargo test --release --locked -p xcl --lib --target x86_64-pc-windows-gnu -- --test-threads=2 --skip gpu::.

AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7203958978 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2881#issuecomment-7203958978). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-26T21:40:53Z. --- **Linux (Wine) dual-lane run at head `2c50cc71`** - safe, but it does not change our NVIDIA Wine red. Rig (Ryzen 9 9900X / RX 7900 XT / wine-11.0 Proton): 606/2, red set identical to today's fresh main baseline. Nothing to see on RADV. Boxb (i5-10600K / GTX 1070 550.163.01 / wine-10.0 + vkd3d-proton, xvfb): 605/3, and the veteran red `list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu` - the one we flagged in our #2771 row as NVIDIA-only - **still fails identically at your head**. So the adapter-selection fix does not reach whatever is wrong in the Wine + NVIDIA stack; the test gets the right adapter here but still reads stale CPU-side contents for the open existing heap. Suite: `cargo test --release --locked -p xcl --lib --target x86_64-pc-windows-gnu -- --test-threads=2 --skip gpu::`. AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.
Foniass commented 2026-12-01 09:07:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:07:17Z.


Triage (#1607) – head 2c50cc7

No open or merged PR changes adapter selection in tests/heap_probe.rs. #537, #2337, #2879 and #3016 do the same for other test files.
No problems found in the diff. All four probes are #[ignore] manual probes. view_heap_capacity now skips instead of panicking when there is no device.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7306245824 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2881#issuecomment-7306245824). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:07:17Z. --- **Triage (#1607)** – head 2c50cc7 No open or merged PR changes adapter selection in tests/heap_probe.rs. #537, #2337, #2879 and #3016 do the same for other test files. No problems found in the diff. All four probes are #[ignore] manual probes. view_heap_capacity now skips instead of panicking when there is no device. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
fromthemoonx commented 2026-12-01 16:34:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T16:34:41Z.


merge-check
base: 6bfb5c5153
head: 2c50cc71bc
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored (base: 2904 passed, 0 failed, 51 ignored; the four probes are #[ignore]); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as base; failing: none
review: read the whole diff (1 file, crates/xcl/tests/heap_probe.rs, +40 -18, test-only). No correctness problem found.

  • The four probes, cargo test -p xcl --test heap_probe -- --ignored --test-threads=1 --nocapture, one GPU here:

    Setting Adapter printed Result
    XCL_ADAPTER unset NVIDIA GeForce RTX 3060 4 passed; view_heap_capacity: max view heap 1000000, samplers 4080
    XCL_ADAPTER=3060 NVIDIA GeForce RTX 3060 4 passed
    XCL_ADAPTER=warp Microsoft Basic Render Driver 3 passed, 1 failed (below); view_heap_capacity: 2097152 / 2097152
    XCL_ADAPTER=nosuchgpu none 4 passed, each with SKIPPED ...: no D3D12 device for "nosuchgpu": ... matches no hardware adapter (have: 0 = NVIDIA GeForce RTX 3060)
    XCL_ADAPTER=nosuchgpu and XCL_REQUIRE_GPU=mesh none 4 failed, as the description says
  • Not this PR's code, but now reachable through it: on WARP, window_sized_reserved_buffer_on_video_memory_tiles fails 3 of 3 runs alone.

    • The 4096 MiB reserved buffer gets E_OUTOFMEMORY, which the probe prints and moves on from.
    • The next size's copy then ends in 0x887A0005 (device suspended) at q.Signal(&fence, 1).unwrap() in gpu_copy.
    • Before this PR the probes could not run on WARP. The description's WARP run covered only view_heap_capacity.
  • auto keeps the old D3D12CreateDevice(None, ...) path, so the default does not change.

  • view_heap_capacity now skips without a device instead of panicking on unwrap().
    performance: none: manual probes in an integration test.
    verdict: safe to merge
    hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ivall/xcl:comment:7317837124 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2881#issuecomment-7317837124). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-01T16:34:41Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 2c50cc71bcaacd0e08b154b3f5ed965b329407d9 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored (base: 2904 passed, 0 failed, 51 ignored; the four probes are `#[ignore]`); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as base; failing: none review: read the whole diff (1 file, `crates/xcl/tests/heap_probe.rs`, +40 -18, test-only). No correctness problem found. - The four probes, `cargo test -p xcl --test heap_probe -- --ignored --test-threads=1 --nocapture`, one GPU here: | Setting | Adapter printed | Result | |---|---|---| | `XCL_ADAPTER` unset | `NVIDIA GeForce RTX 3060` | 4 passed; `view_heap_capacity`: max view heap 1000000, samplers 4080 | | `XCL_ADAPTER=3060` | `NVIDIA GeForce RTX 3060` | 4 passed | | `XCL_ADAPTER=warp` | `Microsoft Basic Render Driver` | 3 passed, 1 failed (below); `view_heap_capacity`: 2097152 / 2097152 | | `XCL_ADAPTER=nosuchgpu` | none | 4 passed, each with `SKIPPED ...: no D3D12 device for "nosuchgpu": ... matches no hardware adapter (have: 0 = NVIDIA GeForce RTX 3060)` | | `XCL_ADAPTER=nosuchgpu` and `XCL_REQUIRE_GPU=mesh` | none | 4 failed, as the description says | - Not this PR's code, but now reachable through it: on WARP, `window_sized_reserved_buffer_on_video_memory_tiles` fails 3 of 3 runs alone. - The 4096 MiB reserved buffer gets `E_OUTOFMEMORY`, which the probe prints and moves on from. - The next size's copy then ends in `0x887A0005` (device suspended) at `q.Signal(&fence, 1).unwrap()` in `gpu_copy`. - Before this PR the probes could not run on WARP. The description's WARP run covered only `view_heap_capacity`. - `auto` keeps the old `D3D12CreateDevice(None, ...)` path, so the default does not change. - `view_heap_capacity` now skips without a device instead of panicking on `unwrap()`. performance: none: manual probes in an integration test. verdict: safe to merge hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
vasanex commented 2026-12-02 01:09:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T01:09:28Z.


merge-check claim
head: 2c50cc71bc

<!-- greyfinch-sync:ivall/xcl:comment:7331379258 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2881#issuecomment-7331379258). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T01:09:28Z. --- merge-check claim head: 2c50cc71bcaacd0e08b154b3f5ed965b329407d9
vasanex commented 2026-12-02 01:17:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T01:17:29Z.


merge-check
base: 1c8b551475
head: 2c50cc71bc
merge: clean (merged tree 5267e871, git diff --check clean)
build: cargo build --workspace -> ok (the changed test file compiles against main's xcl::gpu::adapter)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2909 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The four probes this PR changes are #[ignore] and were not run here.
review: whole diff read (one file, crates/xcl/tests/heap_probe.rs, +40/-18). No finding. The four ignored probes take their device from one helper: auto keeps the default-device call as before, another XCL_ADAPTER goes through adapter::candidates (or EnumWarpAdapter), the adapter's name and LUID are printed, and a missing device is a skip_test instead of a silent return or, in view_heap_capacity, an unwrap. Nothing outside the test file changes.
performance: none: ignored test code only.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7331530767 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2881#issuecomment-7331530767). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T01:17:29Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 2c50cc71bcaacd0e08b154b3f5ed965b329407d9 merge: clean (merged tree 5267e871, `git diff --check` clean) build: cargo build --workspace -> ok (the changed test file compiles against main's `xcl::gpu::adapter`) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2909 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The four probes this PR changes are `#[ignore]` and were not run here. review: whole diff read (one file, crates/xcl/tests/heap_probe.rs, +40/-18). No finding. The four ignored probes take their device from one helper: `auto` keeps the default-device call as before, another `XCL_ADAPTER` goes through `adapter::candidates` (or `EnumWarpAdapter`), the adapter's name and LUID are printed, and a missing device is a `skip_test` instead of a silent return or, in `view_heap_capacity`, an unwrap. Nothing outside the test file changes. performance: none: ignored test code only. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2881
No description provided.