Tests: verify offline compute pipeline blobs are reused at runtime #1459

Open
AkshatPal2007 wants to merge 1 commit from upstream-pr/1469 into main
AkshatPal2007 commented 2026-11-24 16:35:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AkshatPal2007 on 2026-11-24T16:35:26Z.


Part of #1269. Verify that a compute pipeline precompiled offline is reused by the runtime. A successful fallback compile can produce correct output even when the cache handoff fails, so the test requires both a driver blob hit and correct GPU readback.

What is in it

  • Extend the synthetic compute integration test to precompile into a private cache, then dispatch the same console shader through the runtime pipeline hook in a fresh process.
  • Use the runtime’s memory-window count when precompiling so both processes request the same shader variant.

Tested

  • Commit 188f8ac, based on upstream main at b7aa9f3. Windows 11 build 26300, Intel Core i9-14900HX, NVIDIA RTX 4070 Laptop GPU with driver 32.0.16.1656, Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug build.
  • cargo build --locked --workspace succeeded.
  • cargo test --locked --workspace --no-fail-fast -- --test-threads=4 reported 770 passed, 0 failed, and 41 ignored. Two GPU tests counted among passes skipped their checks because they require native wave64. The new cache handoff check ran and passed on the RTX 4070.

Regression run

Not required. The change only touches an integration test.

Not tested

AMD hardware, release builds, and retail titles.

AI use

Codex (gpt-6.2-sol) checked for overlapping work, implemented the test, ran local verification.

<!-- greyfinch-sync:ivall/xcl:issue:5476286246 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1469). Originally posted by [AkshatPal2007](https://github.com/AkshatPal2007) on 2026-11-24T16:35:26Z. --- Part of #1269. Verify that a compute pipeline precompiled offline is reused by the runtime. A successful fallback compile can produce correct output even when the cache handoff fails, so the test requires both a driver blob hit and correct GPU readback. **What is in it** - Extend the synthetic compute integration test to precompile into a private cache, then dispatch the same console shader through the runtime pipeline hook in a fresh process. - Use the runtime’s memory-window count when precompiling so both processes request the same shader variant. **Tested** - Commit `188f8ac`, based on upstream `main` at `b7aa9f3`. Windows 11 build 26300, Intel Core i9-14900HX, NVIDIA RTX 4070 Laptop GPU with driver `32.0.16.1656`, Rust `1.100.0` MSVC, DXC `1.8.2502.11`, debug build. - `cargo build --locked --workspace` succeeded. - `cargo test --locked --workspace --no-fail-fast -- --test-threads=4` reported 770 passed, 0 failed, and 41 ignored. Two GPU tests counted among passes skipped their checks because they require native wave64. The new cache handoff check ran and passed on the RTX 4070. **Regression run** Not required. The change only touches an integration test. **Not tested** AMD hardware, release builds, and retail titles. **AI use** Codex (gpt-6.2-sol) checked for overlapping work, implemented the test, ran local verification.
nnonno91 commented 2026-11-24 17:06:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T16:39:32Z.


Cache handoff on AMD and RTX 5090 at 188f8ac

The runtime reused the offline driver blob and returned the expected GPU results on both adapters. I also disabled the disk PSO cache in just the runtime child process as a negative control. The child still passed the GPU readback, and the outer test failed at runtime did not dispatch with the precompiled driver blob. The clean test passed again after restoring it.

Tested

  • Clean head 188f8ac84f4b2093c7730013e41f3d5420a866b4, Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), RTX 5090 (617.42), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug/test profiles.
  • With XCL_ADAPTER selecting each GPU, cargo test --locked -p xcl --test gpu_compute_e2e offline_compute_pipeline_is_reused_by_the_runtime -- --exact --nocapture --test-threads=1 reported 1 passed, 0 failed on each, with no skips. On AMD, changing only the runtime child’s XCL_PSO_DISK_CACHE from 1 to 0 produced the expected negative result above. That edit was temporary.
  • cargo build --workspace --locked and cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output passed on AMD. Total 770 passed, 0 failed, 41 ignored with no reported hardware skips. The synthetic end-to-end title also passed.

Not tested

  • Retail-title startup time, retail shader packs and release builds. This was a synthetic cache-handoff check.

AI use

  • OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests, added the temporary negative control, and prepared this report.
<!-- greyfinch-sync:ivall/xcl:comment:7138008446 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1469#issuecomment-7138008446). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T16:39:32Z. --- ### Cache handoff on AMD and RTX 5090 at `188f8ac` The runtime reused the offline driver blob and returned the expected GPU results on both adapters. I also disabled the disk PSO cache in just the runtime child process as a negative control. The child still passed the GPU readback, and the outer test failed at `runtime did not dispatch with the precompiled driver blob`. The clean test passed again after restoring it. **Tested** - Clean head `188f8ac84f4b2093c7730013e41f3d5420a866b4`, Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), RTX 5090 (617.42), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug/test profiles. - With `XCL_ADAPTER` selecting each GPU, `cargo test --locked -p xcl --test gpu_compute_e2e offline_compute_pipeline_is_reused_by_the_runtime -- --exact --nocapture --test-threads=1` reported **1 passed, 0 failed** on each, with no skips. On AMD, changing only the runtime child’s `XCL_PSO_DISK_CACHE` from `1` to `0` produced the expected negative result above. That edit was temporary. - `cargo build --workspace --locked` and `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` passed on AMD. Total **770 passed, 0 failed, 41 ignored** with no reported hardware skips. The synthetic end-to-end title also passed. **Not tested** - Retail-title startup time, retail shader packs and release builds. This was a synthetic cache-handoff check. **AI use** - OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests, added the temporary negative control, and prepared this report.
SpositoDouglas commented 2026-11-24 18:08:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SpositoDouglas on 2026-11-24T17:08:26Z.


The cache handoff test passed on a Radeon RX 9060 XT. A fresh runtime process reused the offline driver blob and the compute dispatch returned the expected values.

Tested

  • Isolated copy of base b7aa9f3 with the PR's sole changed file verified against its Git blob at head 188f8ac84f.
  • Ryzen 7 5800XT, Radeon RX 9060 XT (driver 32.0.32029.2010), Windows build 26300.9974, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug test profile. XCL selected the real D3D12 backend on this adapter.
  • cargo test --locked -p xcl --test gpu_compute_e2e offline_compute_pipeline_is_reused_by_the_runtime -- --exact --nocapture --test-threads=1 — 1 passed, 0 failed, 0 ignored, 0 hardware skips, 2 filtered out.

Not tested

Full suite, release build, retail titles, and loading-time impact.

AI use

OpenAI Codex (GPT-6) prepared the isolated source copy, ran the test, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7138745400 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1469#issuecomment-7138745400). Originally posted by [SpositoDouglas](https://github.com/SpositoDouglas) on 2026-11-24T17:08:26Z. --- The cache handoff test passed on a Radeon RX 9060 XT. A fresh runtime process reused the offline driver blob and the compute dispatch returned the expected values. **Tested** - Isolated copy of base b7aa9f3 with the PR's sole changed file verified against its Git blob at head 188f8ac84f4b2093c7730013e41f3d5420a866b4. - Ryzen 7 5800XT, Radeon RX 9060 XT (driver 32.0.32029.2010), Windows build 26300.9974, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug test profile. XCL selected the real D3D12 backend on this adapter. - `cargo test --locked -p xcl --test gpu_compute_e2e offline_compute_pipeline_is_reused_by_the_runtime -- --exact --nocapture --test-threads=1` — 1 passed, 0 failed, 0 ignored, 0 hardware skips, 2 filtered out. **Not tested** Full suite, release build, retail titles, and loading-time impact. **AI use** OpenAI Codex (GPT-6) prepared the isolated source copy, ran the test, and wrote this report.
LocranKing commented 2026-11-24 18:09:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T17:43:23Z.


Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32) test report on clean head 188f8ac84f4b2093c7730013e41f3d5420a866b4.

Tested

  • Commit: 188f8ac84f4b2093c7730013e41f3d5420a866b4 (clean tree)
  • Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo build --release --workspace: ok (exit 0)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 770 passed, 0 failed, 41 ignored, exit 0
    • New test passed: offline_compute_pipeline_is_reused_by_the_runtime (tests/gpu_compute_e2e.rs)
    • SKIPPED (no wave64): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware

Not tested: debug build, AMD / Intel / native wave64 hardware, Linux / Wine.

AI use: Antigravity (Gemini 4 Neon) ran the build and tests and drafted this report from the command outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7139610091 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1469#issuecomment-7139610091). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T17:43:23Z. --- Independent Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32) test report on clean head `188f8ac84f4b2093c7730013e41f3d5420a866b4`. **Tested** - Commit: `188f8ac84f4b2093c7730013e41f3d5420a866b4` (clean tree) - Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`, MSVC `14.44.35207`), DXC `1.9.2602.17` (SDK `10.0.26100.0`), `--release` - `cargo build --release --workspace`: ok (`exit 0`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4`: **770 passed, 0 failed, 41 ignored**, exit `0` - New test passed: `offline_compute_pipeline_is_reused_by_the_runtime` (`tests/gpu_compute_e2e.rs`) - `SKIPPED` (`no wave64`): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` **Not tested:** debug build, AMD / Intel / native wave64 hardware, Linux / Wine. **AI use:** Antigravity (`Gemini 4 Neon`) ran the build and tests and drafted this report from the command outputs.
DavidM1911 commented 2026-11-24 19:07:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:07Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141287971 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1469#issuecomment-7141287971). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:07Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
malzaharhub-ctrl commented 2026-11-24 21:09:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by malzaharhub-ctrl on 2026-11-24T20:14:11Z.


Additional AMD RDNA 3 testing – RX 7900 XTX

I've been independently testing XCL's Direct DXIL backend on an AMD Radeon RX 7900 XTX.

Hardware and environment

  • GPU: PowerColor Radeon RX 7900 XTX, 24GB
  • CPU: Ryzen 7 5800X
  • RAM: 64GB DDR4
  • GPU driver: 32.0.32029.2010 (18 November 2026)
  • OS: Windows 11 Pro, build 26300
  • Rust: 1.100.0 MSVC
  • DXC: 1.9.2602.17
  • XCL commit: c160d86

Test results

With XCL_DIRECT_DXIL=1:

  • DXIL unit tests: 80 passed, 0 failed, 1 ignored.
  • GPU recompiler tests with XCL_REQUIRE_GPU=wave64: 194 passed, 0 failed, 18 ignored.
  • GPU compute integration tests: 4 passed, 0 failed.

The integration suite included:

  • Asynchronous compute PSO creation.
  • Wave64 compute dispatch and GPU readback.
  • Offline pipeline cache reuse.
  • Corrupted driver-cache recovery.

The optional heap-window test was explicitly skipped because XCL_HEAP_WINDOWS=1 was not enabled.

Additional cache-layout finding

On my local checkout at c160d86, the original offline cache test failed with Direct DXIL because it expected a .dxil file directly inside the cache root.

The actual Direct DXIL cache layout contained:

  • cache\translated\v2\... for translated shader data.
  • cache\driver\...pso for driver pipeline blobs.

I adjusted the local test to locate the generated .pso file in the driver cache directory while retaining the second-process cache-hit and corrupted-cache recovery assertions.

The revised test passed with both the standard HLSL backend and Direct DXIL enabled.

Limitations: These were synthetic shader and integration tests, not retail GTA VI gameplay tests. I have not independently tested the current PR head.

AI assistance: ChatGPT helped analyse the test output and prepare this report. I performed the local builds, commands and hardware testing.

<!-- greyfinch-sync:ivall/xcl:comment:7143231527 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1469#issuecomment-7143231527). Originally posted by [malzaharhub-ctrl](https://github.com/malzaharhub-ctrl) on 2026-11-24T20:14:11Z. --- ### Additional AMD RDNA 3 testing – RX 7900 XTX I've been independently testing XCL's Direct DXIL backend on an AMD Radeon RX 7900 XTX. **Hardware and environment** - GPU: PowerColor Radeon RX 7900 XTX, 24GB - CPU: Ryzen 7 5800X - RAM: 64GB DDR4 - GPU driver: 32.0.32029.2010 (18 November 2026) - OS: Windows 11 Pro, build 26300 - Rust: 1.100.0 MSVC - DXC: 1.9.2602.17 - XCL commit: c160d86 **Test results** With `XCL_DIRECT_DXIL=1`: - DXIL unit tests: 80 passed, 0 failed, 1 ignored. - GPU recompiler tests with `XCL_REQUIRE_GPU=wave64`: 194 passed, 0 failed, 18 ignored. - GPU compute integration tests: 4 passed, 0 failed. The integration suite included: - Asynchronous compute PSO creation. - Wave64 compute dispatch and GPU readback. - Offline pipeline cache reuse. - Corrupted driver-cache recovery. The optional heap-window test was explicitly skipped because `XCL_HEAP_WINDOWS=1` was not enabled. **Additional cache-layout finding** On my local checkout at c160d86, the original offline cache test failed with Direct DXIL because it expected a `.dxil` file directly inside the cache root. The actual Direct DXIL cache layout contained: - `cache\translated\v2\...` for translated shader data. - `cache\driver\...pso` for driver pipeline blobs. I adjusted the local test to locate the generated `.pso` file in the driver cache directory while retaining the second-process cache-hit and corrupted-cache recovery assertions. The revised test passed with both the standard HLSL backend and Direct DXIL enabled. **Limitations:** These were synthetic shader and integration tests, not retail GTA VI gameplay tests. I have not independently tested the current PR head. AI assistance: ChatGPT helped analyse the test output and prepare this report. I performed the local builds, commands and hardware testing.
Foniass commented 2026-12-01 05:52:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:52:30Z.


Triage (#1607) – head 188f8ac

No open or merged PR adds this runtime check. Main's offline_compute_pipeline_is_reused_by_a_second_process still checks only the xcl shaders reruns, not a dispatch through the PSO hook.
The PR conflicts with main, which has since added the stale/repaired-blob reruns to this test. After the rebase the new assertion will fail: it looks for compute pipelines made from the driver's blob of an earlier run, but main's real.rs now logs {n} pipelines made from the driver's blob of an earlier run (the word compute was removed). CI has no GPU, so this test was skipped there.

Recommendation: keep open (rebase and update the expected log line).

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:7302230418 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1469#issuecomment-7302230418). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:52:30Z. --- **Triage (#1607)** – head 188f8ac No open or merged PR adds this runtime check. Main's `offline_compute_pipeline_is_reused_by_a_second_process` still checks only the `xcl shaders` reruns, not a dispatch through the PSO hook. The PR conflicts with main, which has since added the stale/repaired-blob reruns to this test. After the rebase the new assertion will fail: it looks for `compute pipelines made from the driver's blob of an earlier run`, but main's `real.rs` now logs `{n} pipelines made from the driver's blob of an earlier run` (the word `compute` was removed). CI has no GPU, so this test was skipped there. Recommendation: keep open (rebase and update the expected log line). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1469:upstream-pr/1469'
git switch 'upstream-pr/1469'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1469'
git switch 'upstream-pr/1469'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1469'
git switch 'upstream-pr/1469'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1469'
git switch 'main'
git merge --squash 'upstream-pr/1469'
git switch 'main'
git merge --ff-only 'upstream-pr/1469'
git switch 'main'
git merge 'upstream-pr/1469'
git push origin 'main'
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!1459
No description provided.