Tests: verify worker whole-form cache artifacts #3213

Merged
bmjask merged 1 commit from upstream-pr/3213 into main 2026-11-28 20:41:19 +00:00
bmjask commented 2026-11-28 20:26:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-28T20:26:34Z.


Mandatory launch preparation builds split pieces and the whole form directly, so it bypasses the older split-program status counter. The e2e test now verifies the persisted .chain.pso piece blobs and the single whole .pso blob instead of parsing that counter's output.

What is in it

  • crates/xcl/tests/gpu_compute_e2e.rs: verify worker whole-form preparation from driver-cache artifacts.

Tested

  • Windows 11 Pro, NVIDIA GeForce RTX 4090 (610.88), Intel Core i9-12900K, rustc 1.100.0, debug.
  • cargo build --workspace: passed.
  • cargo test -p xcl --test gpu_compute_e2e a_preparation_worker_also_builds_a_split_programs_whole_form -- --exact --test-threads=1: 1 passed, 0 failed, 0 ignored.
  • cargo test --workspace -- --test-threads=4: 2,594 passed, 0 failed, 49 ignored; 28 GPU capability skips reported (wave64, dxil.dll, heap windows, GPU_UPLOAD heaps, and unsupported per-lane instructions).

Not tested

  • AMD hardware.
  • Retail title; this changes only an integration-test assertion.

AI use

  • Codex, GPT-5 identified the stale assertion, updated the test, ran the focused and full suites, and wrote this description.
<!-- greyfinch-sync:ivall/xcl:issue:5544264593 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3213). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-28T20:26:34Z. --- Mandatory launch preparation builds split pieces and the whole form directly, so it bypasses the older split-program status counter. The e2e test now verifies the persisted `.chain.pso` piece blobs and the single whole `.pso` blob instead of parsing that counter's output. **What is in it** - `crates/xcl/tests/gpu_compute_e2e.rs`: verify worker whole-form preparation from driver-cache artifacts. **Tested** - Windows 11 Pro, NVIDIA GeForce RTX 4090 (610.88), Intel Core i9-12900K, rustc 1.100.0, debug. - `cargo build --workspace`: passed. - `cargo test -p xcl --test gpu_compute_e2e a_preparation_worker_also_builds_a_split_programs_whole_form -- --exact --test-threads=1`: 1 passed, 0 failed, 0 ignored. - `cargo test --workspace -- --test-threads=4`: 2,594 passed, 0 failed, 49 ignored; 28 GPU capability skips reported (wave64, dxil.dll, heap windows, GPU_UPLOAD heaps, and unsupported per-lane instructions). **Not tested** - AMD hardware. - Retail title; this changes only an integration-test assertion. **AI use** - Codex, GPT-5 identified the stale assertion, updated the test, ran the focused and full suites, and wrote this description.
andrewDoing commented 2026-11-28 20:53:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T20:53:14Z.


The merged test passes on RTX 5070, but its artifact count can also pass when the worker omits a required split piece. I checked main at beeb81be with the stock test's own synthetic input, a fresh directory per invocation, on Windows 11 / Ryzen 7 5700X3D / RTX 5070, driver 616.92.

  • Unmodified production worker: the translation had four distinct piece DXILs. It wrote all four piece keys plus two whole-program keys: 46f6c4fe8742e464-944-0.pso (ordinary root) and 46f6c4fe8742e464-944-0.chain.pso (chain root). The current suffix check counts the latter as a fifth piece.
  • Negative control: in a local test build I replaced only the piece loop in prepare_compiled_compute with chain.pieces.iter().skip(1). The required file a763cc36a950bff2-a8c-0.chain.pso disappeared. The worker produced five files and the existing assertions still passed, 1/1 with zero skips, because the reported total and the on-disk count both decreased by one. The unmodified run also passed 1/1.
  • I obtained the four expected piece keys independently by loading the translated shader and applying driver_cache::name_for to each dispatch_chain.pieces entry. The other three piece hashes were 83c5cef1f9880963, 327808a3ed55e91e, and 87972b44e38c4c21.

A regression assertion can compare the actual filename set against the expected piece keys plus both whole-program root variants. That would catch a missing piece even when the worker's own total agrees with the files it created. This is a test-coverage finding; the unmodified worker emitted every expected artifact. No retail workload or timing measurement.

AI assistance: OpenAI Codex (GPT-6) prepared the isolated controls, ran them, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7245615645 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3213#issuecomment-7245615645). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-28T20:53:14Z. --- The merged test passes on RTX 5070, but its artifact count can also pass when the worker omits a required split piece. I checked `main` at `beeb81be` with the stock test's own synthetic input, a fresh directory per invocation, on Windows 11 / Ryzen 7 5700X3D / RTX 5070, driver 616.92. - Unmodified production worker: the translation had **four distinct piece DXILs**. It wrote all four piece keys plus **two whole-program keys**: `46f6c4fe8742e464-944-0.pso` (ordinary root) and `46f6c4fe8742e464-944-0.chain.pso` (chain root). The current suffix check counts the latter as a fifth piece. - Negative control: in a local test build I replaced only the piece loop in `prepare_compiled_compute` with `chain.pieces.iter().skip(1)`. The required file `a763cc36a950bff2-a8c-0.chain.pso` disappeared. The worker produced five files and the existing assertions **still passed, 1/1 with zero skips**, because the reported total and the on-disk count both decreased by one. The unmodified run also passed 1/1. - I obtained the four expected piece keys independently by loading the translated shader and applying `driver_cache::name_for` to each `dispatch_chain.pieces` entry. The other three piece hashes were `83c5cef1f9880963`, `327808a3ed55e91e`, and `87972b44e38c4c21`. A regression assertion can compare the actual filename set against the expected piece keys **plus both whole-program root variants**. That would catch a missing piece even when the worker's own total agrees with the files it created. This is a test-coverage finding; the unmodified worker emitted every expected artifact. No retail workload or timing measurement. AI assistance: OpenAI Codex (GPT-6) prepared the isolated controls, ran them, and wrote this report.
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!3213
No description provided.