Tests: wait for late release before checking released pipelines are gone #2770

Open
github-bot wants to merge 1 commit from github-bot/gh-2770 into nvidia-dev AGit
Owner

@⁠inf1425 on GitHub · 2026-11-26 11:38 UTC · original
inf1425:tests/late-release-waits → nvidia-dev · +12 −1 · 2 files · 1 commits · open

Since eb49926b, the pipelines XCL owns are handed to late_release and released once every queue is past them, no longer in the title's Release. These are the real pipeline behind a title's stand-in and the compute pass of a two-pass pipeline. Their bookkeeping is cleared when that deferred release runs, so two GPU tests that assert right after the drop fail on a GPU. CI has no GPU, so they never ran there. Both tests now wait up to 5 s for the deferred release before asserting. Royalflamejlh reported both failures and this cause in #42 (comment), where both tests passed with XCL_LATE_RELEASE=0. This PR makes the tests pass with late release on.

What is in it

  • crates/xcl/tests/gpu_compute_e2e.rs: async_compute_pso_registers_real_pso_and_not_standin waits until real::is_translated_compute(real_raw) is false, then asserts as before.
  • crates/xcl/tests/gpu_two_pass_cache_e2e.rs: the child case waits until real::two_pass_count() is back to before, then asserts as before.

Tested

  • NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver 616.64), Ryzen 7 7840HS, Windows 11 build 26300, Rust 1.95.0, debug build.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 at this PR's head: 1747 passed, 3 failed, 48 ignored. The 3 failures are not touched here: the 2 texture_upload overflow tests (#2771) and d3d12_mesh_stream::console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly (#2632). Without this PR: 1745 passed, 5 failed.
  • SKIPPED GPU tests (26): 21 need wave64; 3 are f16 ops the per-lane form refuses (#1426); 2 need XCL_HEAP_WINDOWS=1.
  • Both changed tests ran 3 times each with late release on: all passed. In an earlier run without the time limit, the state was gone about 7 ms after the drop. With XCL_LATE_RELEASE=0 both pass.
  • To check that the tests still catch a leak: with late_release::hold_pipeline changed locally to return without releasing, both tests fail with their original messages after the 5 s wait. That change is not part of this PR.

Regression run

  • Not needed: only files under crates/xcl/tests/ change.

Not tested

  • AMD, other NVIDIA cards, Linux/Wine, a release build, any retail title.

AI use

  • Claude Code (Claude Opus 5.5) found the cause, wrote the change, and ran the tests and the leak check. I read every line of the diff.
**@⁠inf1425** on GitHub · 2026-11-26 11:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/2770) `inf1425:tests/late-release-waits` → `nvidia-dev` · +12 −1 · 2 files · 1 commits · open Since eb49926b, the pipelines XCL owns are handed to `late_release` and released once every queue is past them, no longer in the title's `Release`. These are the real pipeline behind a title's stand-in and the compute pass of a two-pass pipeline. Their bookkeeping is cleared when that deferred release runs, so two GPU tests that assert right after the drop fail on a GPU. CI has no GPU, so they never ran there. Both tests now wait up to 5 s for the deferred release before asserting. Royalflamejlh reported both failures and this cause in #42 ([comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/42)), where both tests passed with `XCL_LATE_RELEASE=0`. This PR makes the tests pass with late release on. **What is in it** - `crates/xcl/tests/gpu_compute_e2e.rs`: `async_compute_pso_registers_real_pso_and_not_standin` waits until `real::is_translated_compute(real_raw)` is false, then asserts as before. - `crates/xcl/tests/gpu_two_pass_cache_e2e.rs`: the child case waits until `real::two_pass_count()` is back to `before`, then asserts as before. **Tested** - NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver 616.64), Ryzen 7 7840HS, Windows 11 build 26300, Rust 1.95.0, debug build. - `cargo test --workspace --no-fail-fast -- --test-threads=4` at this PR's head: 1747 passed, 3 failed, 48 ignored. The 3 failures are not touched here: the 2 `texture_upload` overflow tests (#2771) and `d3d12_mesh_stream::console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly` (#2632). Without this PR: 1745 passed, 5 failed. - SKIPPED GPU tests (26): 21 need wave64; 3 are f16 ops the per-lane form refuses (#1426); 2 need `XCL_HEAP_WINDOWS=1`. - Both changed tests ran 3 times each with late release on: all passed. In an earlier run without the time limit, the state was gone about 7 ms after the drop. With `XCL_LATE_RELEASE=0` both pass. - To check that the tests still catch a leak: with `late_release::hold_pipeline` changed locally to return without releasing, both tests fail with their original messages after the 5 s wait. That change is not part of this PR. **Regression run** - Not needed: only files under `crates/xcl/tests/` change. **Not tested** - AMD, other NVIDIA cards, Linux/Wine, a release build, any retail title. **AI use** - Claude Code (Claude Opus 5.5) found the cause, wrote the change, and ran the tests and the leak check. I read every line of the diff.
Since eb49926b the pipelines XCL owns - the real pipeline behind a
title's stand-in and the compute pass of a two-pass pipeline - are
handed to late_release and let go once every queue is past them, not
in the title's Release. Their bookkeeping (TRANSLATED_COMPUTE, the
two-pass map) is cleared when that deferred Release runs, so two GPU
tests that checked right after dropping the title's pipeline failed on
a GPU (CI has none, so they never ran there):

- gpu_compute_e2e: async_compute_pso_registers_real_pso_and_not_standin
- gpu_two_pass_cache_e2e: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs

Both now wait up to 5 s for the deferred release before asserting. On
an RTX 4060 Laptop GPU the state was gone ~7 ms after the drop; with
XCL_LATE_RELEASE=0 both pass as before, and with hold_pipeline made to
leak every pipeline (local probe, not committed) both still fail with
their original messages.

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:40:49 +00:00
Author
Owner

@⁠afpruivo on GitHub · 2026-11-26 12:04 UTC · original

Tested on an RTX 3090: both tests fail on nvidia-dev af2cecc4 and pass at this PR's head 7a7e161d.

Setup: RTX 3090 24 GB, driver 621.40, Windows 11 26300, release build, DXC 1.8.2502.11.

Command, on each tree:

cargo test --release --no-fail-fast -p xcl --test gpu_compute_e2e --test gpu_two_pass_cache_e2e -- --test-threads=1

tree gpu_compute_e2e gpu_two_pass_cache_e2e
af2cecc4 6 passed, 1 failed: async_compute_pso_registers_real_pso_and_not_standin at :535 0 passed, 1 failed: the child case at :649, reported by the parent at :574
af2cecc4, XCL_LATE_RELEASE=0 7 passed, 0 failed 1 passed, 0 failed
7a7e161d (this PR) 7 passed, 0 failed 1 passed, 0 failed
  • 1 SKIPPED in gpu_compute_e2e on af2cecc4 and on this PR's head: heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.
  • With XCL_LATE_RELEASE=0 both pass on the unchanged tree, which fits the cause given in the description.

Not tested: the whole suite at this head; other GPUs; repeated runs, to see how much time the 5 s wait leaves to spare.

AI use: Claude Code (Claude Opus 5.5) ran the commands on my machine and drafted this. Checked by me before posting.

**@⁠afpruivo** on GitHub · 2026-11-26 12:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/2770#issuecomment-7191534250) **Tested on an RTX 3090: both tests fail on `nvidia-dev` `af2cecc4` and pass at this PR's head `7a7e161d`.** **Setup:** RTX 3090 24 GB, driver 621.40, Windows 11 26300, release build, DXC 1.8.2502.11. **Command,** on each tree: `cargo test --release --no-fail-fast -p xcl --test gpu_compute_e2e --test gpu_two_pass_cache_e2e -- --test-threads=1` | tree | `gpu_compute_e2e` | `gpu_two_pass_cache_e2e` | |---|---|---| | `af2cecc4` | 6 passed, 1 failed: `async_compute_pso_registers_real_pso_and_not_standin` at `:535` | 0 passed, 1 failed: the child case at `:649`, reported by the parent at `:574` | | `af2cecc4`, `XCL_LATE_RELEASE=0` | 7 passed, 0 failed | 1 passed, 0 failed | | `7a7e161d` (this PR) | 7 passed, 0 failed | 1 passed, 0 failed | - 1 `SKIPPED` in `gpu_compute_e2e` on `af2cecc4` and on this PR's head: `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`. - With `XCL_LATE_RELEASE=0` both pass on the unchanged tree, which fits the cause given in the description. **Not tested:** the whole suite at this head; other GPUs; repeated runs, to see how much time the 5 s wait leaves to spare. **AI use:** Claude Code (Claude Opus 5.5) ran the commands on my machine and drafted this. Checked by me before posting.
Author
Owner

@⁠MarcosMDev on GitHub · 2026-11-26 12:25 UTC · original

Test report: 7a7e161 against its base af2cecc on a desktop RTX 4060 (Windows): both tests fail 10 of 10 on the base and pass 10 of 10 here; full suite, no new failure. No title was run.

Debug, late release on (the default), each tree in its own worktree and target folder, cargo build --workspace --locked first. Each test run 10 times in a row:

test af2cecc 7a7e161
gpu_compute_e2e async_compute_pso_registers_real_pso_and_not_standin 10 of 10 failed 10 of 10 passed
gpu_two_pass_cache_e2e two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs 10 of 10 failed 10 of 10 passed

Full suite, cargo test --workspace --locked --no-fail-fast -- --test-threads=4:

  • base: 1745 passed, 6 failed, 48 ignored (5 tests; the two-pass one is counted twice, by the child and the parent)
  • head: 1747 passed, 3 failed, 48 ignored. The 3 left are the 2 texture_upload overflow tests (#2771) and console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly, as the description says.
  • The same 30 SKIPPED lines on both.

RTX 4060 8 GB (driver 621.01), Ryzen 7 5700X, 24 GB, Windows 11 26200, rustc 1.100.0, DXC 1.9.2609.5.

Not tested: a release build, how long the wait takes against its 5 s limit, AMD, any title.

AI use: Claude Code (Claude Opus 5.5) ran the tests and drafted this; I read it before posting.

**@⁠MarcosMDev** on GitHub · 2026-11-26 12:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2770#issuecomment-7191983995) **Test report: `7a7e161` against its base `af2cecc` on a desktop RTX 4060 (Windows): both tests fail 10 of 10 on the base and pass 10 of 10 here; full suite, no new failure.** No title was run. Debug, late release on (the default), each tree in its own worktree and target folder, `cargo build --workspace --locked` first. Each test run 10 times in a row: | test | `af2cecc` | `7a7e161` | |---|---|---| | `gpu_compute_e2e` `async_compute_pso_registers_real_pso_and_not_standin` | 10 of 10 failed | 10 of 10 passed | | `gpu_two_pass_cache_e2e` `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` | 10 of 10 failed | 10 of 10 passed | Full suite, `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`: - base: 1745 passed, 6 failed, 48 ignored (5 tests; the two-pass one is counted twice, by the child and the parent) - head: 1747 passed, 3 failed, 48 ignored. The 3 left are the 2 `texture_upload` overflow tests (#2771) and `console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly`, as the description says. - The same 30 SKIPPED lines on both. RTX 4060 8 GB (driver 621.01), Ryzen 7 5700X, 24 GB, Windows 11 26200, rustc 1.100.0, DXC 1.9.2609.5. **Not tested:** a release build, how long the wait takes against its 5 s limit, AMD, any title. AI use: Claude Code (Claude Opus 5.5) ran the tests and drafted this; I read it before posting.
Author
Owner

@⁠Prime1997 on GitHub · 2026-11-26 13:19 UTC · original · reviewed

Good targeted test result; retain this PR. Clean exact head 7a7e161d907c91e32fbf727201806171f5580c51: 2 passed, 0 failed, 0 ignored, 0 reported skips. No production or fixture edits were made.

  • async_compute_pso_registers_real_pso_and_not_standin: passed; backend log explicitly identifies NVIDIA GeForce RTX 3060 Ti, 8024 MiB. This checks real asynchronous PSO registration and late cleanup; its body does not dispatch the compiled shader.
  • two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs: passed. The unchanged fixture launches eight sequential children and checks pixels, cache counts, corrupt-blob recovery and lifetime behavior. Successful child logs are suppressed, so this result cannot independently name each child's adapter. Requested debug mode does not establish InfoQueue coverage when that interface is unavailable.

The first attempt selected Windows SDK DXC 1.5 and failed DxcCreateInstance with 0x80004002, before a translated PSO was produced. Pinning a private copy of DXC 1.9.2609.5 resolved that environment failure; it is not attributed to this PR.

Build each target with cargo test --locked --offline -p xcl --test <target> --no-run --message-format=json --target-dir <isolated-target>, targets gpu_compute_e2e and gpu_two_pass_cache_e2e respectively. Run each exact test name in a fresh process: <test-exe> <exact-name> --exact --test-threads=1 --nocapture. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug. Private target paths are placeholders. Test processes had a 90-second process-tree deadline, isolated caches/data, one DXC worker, one pipeline worker, XCL_ASYNC_PSO=1 XCL_LATE_RELEASE=1 XCL_UMA_WINDOWS=4 XCL_UMA_MB=16 XCL_COHERENT_MB=16 XCL_HEAP_WINDOWS=0, and the pinned private compiler.

Compiler SHA-256: dxcompiler 0689e2fee0a1c9df8662a59680469f24e2a3ad7ce6bbbcc9284f7a83172bfc59; dxil 64be2368211d257a038a7d4ea6bb3e24c878eb8d588c7b8414fccf759b69c2ac.

Latest refs checked: main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, nvidia-dev af2cecc40886a8682ecf3267f5328c6dc4b66ad7. The native results above are on the exact PR head, not a main integration. Source-only merge-tree against latest main reports clean; that does not validate a rebased build. Full-suite, gameplay, performance and general driver compatibility are not established.

AI use: Codex (GPT-6) inspected the fixtures, ran the bounded checks and audited the raw results. Optional temporary Discord for coordinating contributor work, testing and comparing results.

**@⁠Prime1997** on GitHub · 2026-11-26 13:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2770#pullrequestreview-6074812429) · **reviewed** **Good targeted test result; retain this PR.** Clean exact head `7a7e161d907c91e32fbf727201806171f5580c51`: **2 passed, 0 failed, 0 ignored, 0 reported skips**. No production or fixture edits were made. - `async_compute_pso_registers_real_pso_and_not_standin`: passed; backend log explicitly identifies NVIDIA GeForce RTX 3060 Ti, 8024 MiB. This checks real asynchronous PSO registration and late cleanup; its body does not dispatch the compiled shader. - `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`: passed. The unchanged fixture launches eight sequential children and checks pixels, cache counts, corrupt-blob recovery and lifetime behavior. Successful child logs are suppressed, so this result cannot independently name each child's adapter. Requested debug mode does not establish InfoQueue coverage when that interface is unavailable. The first attempt selected Windows SDK DXC 1.5 and failed `DxcCreateInstance` with `0x80004002`, before a translated PSO was produced. Pinning a private copy of DXC 1.9.2609.5 resolved that environment failure; it is not attributed to this PR. Build each target with `cargo test --locked --offline -p xcl --test <target> --no-run --message-format=json --target-dir <isolated-target>`, targets `gpu_compute_e2e` and `gpu_two_pass_cache_e2e` respectively. Run each exact test name in a fresh process: `<test-exe> <exact-name> --exact --test-threads=1 --nocapture`. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug. Private target paths are placeholders. Test processes had a 90-second process-tree deadline, isolated caches/data, one DXC worker, one pipeline worker, `XCL_ASYNC_PSO=1 XCL_LATE_RELEASE=1 XCL_UMA_WINDOWS=4 XCL_UMA_MB=16 XCL_COHERENT_MB=16 XCL_HEAP_WINDOWS=0`, and the pinned private compiler. Compiler SHA-256: dxcompiler `0689e2fee0a1c9df8662a59680469f24e2a3ad7ce6bbbcc9284f7a83172bfc59`; dxil `64be2368211d257a038a7d4ea6bb3e24c878eb8d588c7b8414fccf759b69c2ac`. Latest refs checked: main `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, nvidia-dev `af2cecc40886a8682ecf3267f5328c6dc4b66ad7`. The native results above are on the exact PR head, not a main integration. Source-only merge-tree against latest main reports **clean**; that does not validate a rebased build. Full-suite, gameplay, performance and general driver compatibility are not established. AI use: Codex (GPT-6) inspected the fixtures, ran the bounded checks and audited the raw results. Optional temporary [Discord](https://discord.gg/gK3y7WRRY) for coordinating contributor work, testing and comparing results.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-26 13:36 UTC · original

AMD run (listed as untested), plus a second NVIDIA card: on nvidia-dev both tests fail on an RX 9070 XT and an RTX 3060, and with this PR both pass on both.

Base nvidia-dev af2cecc, then head 7a7e161 applied, debug, Windows 11 Pro 26200, card chosen with XCL_ADAPTER, cargo test -p xcl --test <target> -- --nocapture --test-threads=1:

RX 9070 XT (RDNA4, 32.0.32029.2010) RTX 3060 (32.0.16.1088)
gpu_compute_e2e, nvidia-dev 6 passed, 1 failed (async_compute_pso_registers_real_pso_and_not_standin) 6 passed, 1 failed (same)
gpu_compute_e2e, this PR 7 passed, 0 failed 7 passed, 0 failed
gpu_two_pass_cache_e2e, nvidia-dev 1 failed (two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs) 1 failed (same)
gpu_two_pass_cache_e2e, this PR 1 passed 1 passed

gpu_compute_e2e also shows 1 SKIPPED (heap_window_out_of_memory_falls_back_to_the_switch_form, no heap windows) on both cards, with and without the PR.

Not tested: Intel, a release build, a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-26 13:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2770#issuecomment-7193577439) AMD run (listed as untested), plus a second NVIDIA card: on `nvidia-dev` both tests fail on an RX 9070 XT and an RTX 3060, and with this PR both pass on both. Base `nvidia-dev` `af2cecc`, then head `7a7e161` applied, debug, Windows 11 Pro 26200, card chosen with `XCL_ADAPTER`, `cargo test -p xcl --test <target> -- --nocapture --test-threads=1`: | | RX 9070 XT (RDNA4, 32.0.32029.2010) | RTX 3060 (32.0.16.1088) | |---|---|---| | `gpu_compute_e2e`, `nvidia-dev` | 6 passed, **1 failed** (`async_compute_pso_registers_real_pso_and_not_standin`) | 6 passed, **1 failed** (same) | | `gpu_compute_e2e`, this PR | 7 passed, 0 failed | 7 passed, 0 failed | | `gpu_two_pass_cache_e2e`, `nvidia-dev` | **1 failed** (`two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`) | **1 failed** (same) | | `gpu_two_pass_cache_e2e`, this PR | 1 passed | 1 passed | `gpu_compute_e2e` also shows 1 SKIPPED (`heap_window_out_of_memory_falls_back_to_the_switch_form`, no heap windows) on both cards, with and without the PR. Not tested: Intel, a release build, a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2770/head:github-bot/gh-2770'
git switch 'github-bot/gh-2770'

Merge

Merge the changes and update on Forgejo.
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2770'
git switch 'github-bot/gh-2770'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2770'
git switch 'github-bot/gh-2770'
git rebase 'nvidia-dev'
git switch 'nvidia-dev'
git merge --no-ff 'github-bot/gh-2770'
git switch 'nvidia-dev'
git merge --squash 'github-bot/gh-2770'
git switch 'nvidia-dev'
git merge --ff-only 'github-bot/gh-2770'
git switch 'nvidia-dev'
git merge 'github-bot/gh-2770'
git push origin 'nvidia-dev'
This discussion has been locked. Commenting is limited to contributors.
No description provided.