Tests: offline compute pipeline test finds the driver blob with XCL_D… #1664

Closed
IgorAntunes66 wants to merge 1 commit from upstream-pr/1674 into main
IgorAntunes66 commented 2026-11-24 19:10:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by IgorAntunes66 on 2026-11-24T19:10:07Z.


offline_compute_pipeline_is_reused_by_a_second_process fails whenever XCL_DIRECT_DXIL is set (=1 or =all): it takes the driver blob's name from a *.dxil file at the cache root, which only the HLSL + DXC path writes. The direct translator keeps its DXIL under translated/ (#1426), so the find(...).unwrap() at gpu_compute_e2e.rs:114 panics before anything GPU-related is checked.

Related: #1469 and #1363 also edit this test (rename / runtime step, GPU-backend skip) but not the *.dxil lookup; whichever lands second will need a small rebase.

What is in it

  • The test takes the single *.pso in cache/driver (and asserts there is exactly one).
  • When a *.dxil exists (HLSL path), it still checks that the blob's name matches the DXIL's hash and size.
  • Test-only change: nothing outside crates/xcl/tests/gpu_compute_e2e.rs.

Tested

  • hardware: NVIDIA RTX 5070 12 GB, driver 621.24, i7-12700K, Windows 11 26H2 (26300); rustc 1.100.0, DXC 1.9.2602.17; debug; base c160d86
  • cargo test -p xcl --test gpu_compute_e2e, 3 runs per mode:
before after
no variable 4 passed ×3 4 passed ×3
XCL_DIRECT_DXIL=1 3 passed, 1 failed ×3 4 passed ×3
XCL_DIRECT_DXIL=all 3 passed, 1 failed ×3 4 passed ×3
  • With the direct translator the warm run still reports "pipelines loaded from the driver cache 1".
  • cargo test --workspace --no-fail-fast -- --test-threads=4 at c160d86 with XCL_DIRECT_DXIL=all (before the fix): 857 passed, 1 failed (this test), 42 ignored (SKIPPED GPU tests: 2 no wave64, 1 no heap windows).

Regression run
Not needed: test-only change.

Not tested

  • AMD / RDNA hardware.
  • Full scripts\test.ps1 on this PR's head commit (only this test file changes).

AI use

  • Claude Code (claude-opus-5-5) found the cause, wrote the change and ran the tests;
<!-- greyfinch-sync:ivall/xcl:issue:5478612556 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674). Originally posted by [IgorAntunes66](https://github.com/IgorAntunes66) on 2026-11-24T19:10:07Z. --- `offline_compute_pipeline_is_reused_by_a_second_process` fails whenever `XCL_DIRECT_DXIL` is set (`=1` or `=all`): it takes the driver blob's name from a `*.dxil` file at the cache root, which only the HLSL + DXC path writes. The direct translator keeps its DXIL under `translated/` (#1426), so the `find(...).unwrap()` at `gpu_compute_e2e.rs:114` panics before anything GPU-related is checked. Related: #1469 and #1363 also edit this test (rename / runtime step, GPU-backend skip) but not the `*.dxil` lookup; whichever lands second will need a small rebase. **What is in it** - The test takes the single `*.pso` in `cache/driver` (and asserts there is exactly one). - When a `*.dxil` exists (HLSL path), it still checks that the blob's name matches the DXIL's hash and size. - Test-only change: nothing outside `crates/xcl/tests/gpu_compute_e2e.rs`. **Tested** - hardware: NVIDIA RTX 5070 12 GB, driver 621.24, i7-12700K, Windows 11 26H2 (26300); rustc 1.100.0, DXC 1.9.2602.17; debug; base c160d86 - `cargo test -p xcl --test gpu_compute_e2e`, 3 runs per mode: | | before | after | |---|---|---| | no variable | 4 passed ×3 | 4 passed ×3 | | `XCL_DIRECT_DXIL=1` | 3 passed, 1 failed ×3 | 4 passed ×3 | | `XCL_DIRECT_DXIL=all` | 3 passed, 1 failed ×3 | 4 passed ×3 | - With the direct translator the warm run still reports "pipelines loaded from the driver cache 1". - `cargo test --workspace --no-fail-fast -- --test-threads=4` at c160d86 with `XCL_DIRECT_DXIL=all` (before the fix): 857 passed, 1 failed (this test), 42 ignored (SKIPPED GPU tests: 2 no wave64, 1 no heap windows). **Regression run** Not needed: test-only change. **Not tested** - AMD / RDNA hardware. - Full `scripts\test.ps1` on this PR's head commit (only this test file changes). **AI use** - Claude Code (claude-opus-5-5) found the cause, wrote the change and ran the tests;
DavidM1911 commented 2026-11-24 22:06:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T21:37:39Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7145179332 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674#issuecomment-7145179332). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T21:37:39Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
PHeitor1 commented 2026-11-24 23:08:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by PHeitor1 on 2026-11-24T22:26:57Z.


Tested 8742034 merged onto main 689f2db (clean) on Blackwell: the test fails on main with the direct translator and passes with this PR.

Tested

  • RTX 5060 Ti 8 GB (32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300, rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug, Developer Mode off. cargo test -p xcl --test gpu_compute_e2e, 5 runs per cell, the two trees alternating:
XCL_DIRECT_DXIL main 689f2db + this PR
unset 4 passed ×5 4 passed ×5
1 3 passed, 1 failed ×5 4 passed ×5
all 3 passed, 1 failed ×5 4 passed ×5
  • Every failure is offline_compute_pipeline_is_reused_by_a_second_process.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with the PR, XCL_DIRECT_DXIL unset and 1: 971 passed, 4 failed, 45 ignored, both times. The 4 are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0 to _3 (CreateComputePipelineState 0x8007000E). They fail the same way on plain 689f2db and came in with #1679, so they are not from this PR. SKIPPED: the no wave64 cases, three per-lane form: refused cases, no heap windows, and the Developer Mode one.

Not tested: AMD / Intel, release.

Run and written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7146242134 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674#issuecomment-7146242134). Originally posted by [PHeitor1](https://github.com/PHeitor1) on 2026-11-24T22:26:57Z. --- Tested `8742034` merged onto `main` `689f2db` (clean) on Blackwell: the test fails on `main` with the direct translator and passes with this PR. **Tested** - RTX 5060 Ti 8 GB (32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300, rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug, Developer Mode off. `cargo test -p xcl --test gpu_compute_e2e`, 5 runs per cell, the two trees alternating: | `XCL_DIRECT_DXIL` | `main` `689f2db` | + this PR | |---|---|---| | unset | 4 passed ×5 | 4 passed ×5 | | `1` | 3 passed, 1 failed ×5 | 4 passed ×5 | | `all` | 3 passed, 1 failed ×5 | 4 passed ×5 | - Every failure is `offline_compute_pipeline_is_reused_by_a_second_process`. - `cargo test --workspace --no-fail-fast -- --test-threads=4` with the PR, `XCL_DIRECT_DXIL` unset and `1`: 971 passed, 4 failed, 45 ignored, both times. The 4 are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` to `_3` (`CreateComputePipelineState` 0x8007000E). They fail the same way on plain `689f2db` and came in with #1679, so they are not from this PR. SKIPPED: the `no wave64` cases, three `per-lane form: refused` cases, `no heap windows`, and the Developer Mode one. **Not tested:** AMD / Intel, release. _Run and written with Claude Code (Claude Opus 5.5)._
cindertheblue commented 2026-11-25 00:09:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cindertheblue on 2026-11-24T23:44:28Z.


Tested 8742034 merged onto main 689f2db (clean merge, only crates/xcl/tests/gpu_compute_e2e.rs changes) on AMD, which the description lists as not tested: the test fails on main with the direct translator and passes with this PR, in every run.

Tested

  • AMD Radeon RX 7600 XT 16 GB (RDNA3, 64-lane waves), driver 32.0.31041.1004 (AMD Software 26.8.1), Ryzen 5 9600X, Windows 11 Home 26200.9974, rustc 1.99.1, DXC 1.8.2502.11 (SDK 10.0.26100), debug. Each tree built with cargo build --workspace in its own folder.
  • cargo test -p xcl --test gpu_compute_e2e -- --nocapture, 3 runs per cell, the two trees alternating:
XCL_DIRECT_DXIL main 689f2db + this PR
unset 4 passed ×3 4 passed ×3
1 3 passed, 1 failed ×3 (offline_compute_pipeline_is_reused_by_a_second_process) 4 passed ×3
all 3 passed, 1 failed ×3 (the same test) 4 passed ×3
  • SKIPPED in this file: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), in every run on both trees.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the merged tree: 974 passed, 1 failed, 45 ignored, both unset and with XCL_DIRECT_DXIL=1 (on main 689f2db with =1: 973 passed, 2 failed). The one failure left is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, the AMD seed 722 mismatch from #1679, which this PR doesn't touch.

Not tested

  • A release build; scripts\test.ps1 itself (the same commands, run directly).
  • The PR's own head 8742034 without the merge onto 689f2db.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from the real output; checked by me before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7147741616 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674#issuecomment-7147741616). Originally posted by [cindertheblue](https://github.com/cindertheblue) on 2026-11-24T23:44:28Z. --- Tested `8742034` merged onto `main` `689f2db` (clean merge, only `crates/xcl/tests/gpu_compute_e2e.rs` changes) on AMD, which the description lists as not tested: the test fails on `main` with the direct translator and passes with this PR, in every run. **Tested** - AMD Radeon RX 7600 XT 16 GB (RDNA3, 64-lane waves), driver 32.0.31041.1004 (AMD Software 26.8.1), Ryzen 5 9600X, Windows 11 Home 26200.9974, rustc 1.99.1, DXC 1.8.2502.11 (SDK 10.0.26100), debug. Each tree built with `cargo build --workspace` in its own folder. - `cargo test -p xcl --test gpu_compute_e2e -- --nocapture`, 3 runs per cell, the two trees alternating: | `XCL_DIRECT_DXIL` | `main` `689f2db` | + this PR | |---|---|---| | unset | 4 passed ×3 | 4 passed ×3 | | `1` | 3 passed, 1 failed ×3 (`offline_compute_pipeline_is_reused_by_a_second_process`) | 4 passed ×3 | | `all` | 3 passed, 1 failed ×3 (the same test) | 4 passed ×3 | - `SKIPPED` in this file: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), in every run on both trees. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the merged tree: 974 passed, 1 failed, 45 ignored, both unset and with `XCL_DIRECT_DXIL=1` (on `main` `689f2db` with `=1`: 973 passed, 2 failed). The one failure left is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, the AMD seed 722 mismatch from #1679, which this PR doesn't touch. **Not tested** - A release build; `scripts\test.ps1` itself (the same commands, run directly). - The PR's own head `8742034` without the merge onto `689f2db`. **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from the real output; checked by me before posting.
github-actions[bot] commented 2026-11-29 07:40:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:59Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252624752 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674#issuecomment-7252624752). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:40:59Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:28:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:28:15Z.


Triage (#1607) – head 8742034

The failure this fixes is already fixed on main by ec80c07 ("D3D12.X: reuse offline whole compute pipelines before splitting"): offline_compute_pipeline_is_reused_by_a_second_process in crates/xcl/tests/gpu_compute_e2e.rs now runs xcl shaders with XCL_DXIL_DUMP=all and TEMP set to the test directory, and takes the DXIL from xcl-dxil-dump when the direct translator wrote it (pso.rs::dump_direct), else from the cache root.
The same hunk is rewritten there, which is why this PR conflicts. It still names the blob from the DXIL's hash in both modes, so the extra check of exactly one *.pso is the only part not on main.
Recommendation: close (superseded by main commit ec80c07).

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:7302909035 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674#issuecomment-7302909035). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:28:15Z. --- **Triage (#1607)** – head 8742034 The failure this fixes is already fixed on main by ec80c07 ("D3D12.X: reuse offline whole compute pipelines before splitting"): `offline_compute_pipeline_is_reused_by_a_second_process` in `crates/xcl/tests/gpu_compute_e2e.rs` now runs `xcl shaders` with `XCL_DXIL_DUMP=all` and `TEMP` set to the test directory, and takes the DXIL from `xcl-dxil-dump` when the direct translator wrote it (`pso.rs::dump_direct`), else from the cache root. The same hunk is rewritten there, which is why this PR conflicts. It still names the blob from the DXIL's hash in both modes, so the extra check of exactly one `*.pso` is the only part not on main. Recommendation: close (superseded by main commit ec80c07). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:46:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:46:59Z.


Closing as superseded: this change is already on main (ec80c071). main gpu_compute_e2e.rs offline_compute_pipeline_is_reused_by_a_second_process now reads the DXIL from XCL_DXIL_DUMP=all under %TEMP%/xcl-dxil-dump (added by ec80c071); test-only PR

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311639185 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1674#issuecomment-7311639185). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:46:59Z. --- Closing as superseded: this change is already on `main` (ec80c071). main gpu_compute_e2e.rs offline_compute_pipeline_is_reused_by_a_second_process now reads the DXIL from XCL_DXIL_DUMP=all under %TEMP%/xcl-dxil-dump (added by ec80c071); test-only PR Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

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!1664
No description provided.