Expand bounded GPU compatibility coverage #35

Closed
github-bot wants to merge 1 commit from gh-pr/35/head into gh-pr/35/base
Owner

@⁠bmjask on GitHub · 2026-11-22 14:41 UTC · original
bmjask:codex/gpu-compatibility → main · +31468 −69 · 25 files · 1 commits · closed without merging

Summary

  • expand bounded scalar, vector, memory, image, lane, and control-flow compatibility
  • add structural descriptor validation and deterministic aggregate coverage reporting
  • add validation-only two-wave scheduling, checked per-slot lowering, buffer-backed state layouts, and dormant two-pass recording prerequisites
  • add checked guest-to-host read-only region mapping for validation memory loads
  • preserve fail-closed production eligibility and resource bounds

Verification

  • full rebuilt workspace suite: 564 library tests passed, 16 ignored, 0 failed
  • all integration suites passed, including 6 GPU pipeline tests and 2 end-to-end tests
  • aggregate decoder survey: 9,282/9,282 programs decoded and structurally validated, with 0 decode failures and 0 unsupported opcodes/forms
  • measured validation per-slot vector coverage: 5,556,432/5,556,444 decoded instructions (approximately 99.9998%)
  • measured validation per-slot scalar coverage: 1,868,367/1,868,367 decoded instructions (100%)
  • the latest aggregate survey accepted 0/9,282 whole-program shells; every first unlowered operation is now in the memory family
  • live Wave64 tests cover scalar operations, two-wave scheduling, fault isolation, buffer state, control flow, local-memory rendezvous, lane operations, comparisons, conversions, carry masks, arithmetic, and checked read-only mapping
  • public diff, paths, and commit metadata scanned for local paths, logs, retired labels, and identifying asset names

Current boundary

The validation shell remains deliberately disconnected from production eligibility. The latest aggregate survey reports 2,766 programs blocked by the current group-shared state limit and 6,516 by unsupported per-slot lowering. Every observed scalar operation is covered; the first remaining unlowered family is Memory for all 9,282 programs. Memory-family slot lowering and the shared-state limit are the next measured blockers. Deterministic redacted memory-frequency reporting identifies scalar-buffer, vector-buffer, and scalar loads as the dominant remaining families. Only 12 decoded relative-move vector instructions remain outside per-slot vector lowering. A checked buffer-backed vector-register layout exists as a disconnected prerequisite, but the epoch shell still needs an atomic migration of its vector access sites before relative moves or shared-state-limited programs can be enabled safely. Production activation and dispatch parameters remain unavailable without the missing executable/runtime evidence.

Notes

This is compatibility-layer work only. It contains no protected content, keys, package decryption, or title-specific data.

**@⁠bmjask** on GitHub · 2026-11-22 14:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/35) `bmjask:codex/gpu-compatibility` → `main` · +31468 −69 · 25 files · 1 commits · closed without merging ## Summary - expand bounded scalar, vector, memory, image, lane, and control-flow compatibility - add structural descriptor validation and deterministic aggregate coverage reporting - add validation-only two-wave scheduling, checked per-slot lowering, buffer-backed state layouts, and dormant two-pass recording prerequisites - add checked guest-to-host read-only region mapping for validation memory loads - preserve fail-closed production eligibility and resource bounds ## Verification - full rebuilt workspace suite: 564 library tests passed, 16 ignored, 0 failed - all integration suites passed, including 6 GPU pipeline tests and 2 end-to-end tests - aggregate decoder survey: 9,282/9,282 programs decoded and structurally validated, with 0 decode failures and 0 unsupported opcodes/forms - measured validation per-slot vector coverage: 5,556,432/5,556,444 decoded instructions (approximately 99.9998%) - measured validation per-slot scalar coverage: 1,868,367/1,868,367 decoded instructions (100%) - the latest aggregate survey accepted 0/9,282 whole-program shells; every first unlowered operation is now in the memory family - live Wave64 tests cover scalar operations, two-wave scheduling, fault isolation, buffer state, control flow, local-memory rendezvous, lane operations, comparisons, conversions, carry masks, arithmetic, and checked read-only mapping - public diff, paths, and commit metadata scanned for local paths, logs, retired labels, and identifying asset names ## Current boundary The validation shell remains deliberately disconnected from production eligibility. The latest aggregate survey reports 2,766 programs blocked by the current group-shared state limit and 6,516 by unsupported per-slot lowering. Every observed scalar operation is covered; the first remaining unlowered family is Memory for all 9,282 programs. Memory-family slot lowering and the shared-state limit are the next measured blockers. Deterministic redacted memory-frequency reporting identifies scalar-buffer, vector-buffer, and scalar loads as the dominant remaining families. Only 12 decoded relative-move vector instructions remain outside per-slot vector lowering. A checked buffer-backed vector-register layout exists as a disconnected prerequisite, but the epoch shell still needs an atomic migration of its vector access sites before relative moves or shared-state-limited programs can be enabled safely. Production activation and dispatch parameters remain unavailable without the missing executable/runtime evidence. ## Notes This is compatibility-layer work only. It contains no protected content, keys, package decryption, or title-specific data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:05:32 +00:00
github-bot closed this pull request 2026-11-26 04:05:32 +00:00
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-22 20:55 UTC · original

Ran this on the two GPUs it's meant for, merged onto current main plus #41 to pick the adapter, cargo test --workspace --release --no-fail-fast, with XCL_SAMPLE_RPF set to a retail shaders.rpf.

RTX 3080 (D3D12 wave range 32..32, mesh tier 1): 546 passed, 2 failed. The 2 failures are the existing wave64-MS ones (retail_mesh_pipelines_through_the_hook 0 / 7, and the mesh half of the background-build test), the same as on main. Most of the new wave64 coverage doesn't actually run there, though:

  • The validation epoch shell (mesh_epoch_hlsl.rs, validation_epoch_hlsl) is [WaveSize(64)] [numthreads(128,1,1)] and reads lanes through WaveReadLaneAt(.., source < 64), so it's a native-wave64 form. Its 19 GPU checks compile it and then return early on !wave64_supported(), and libtest counts them as passed. The same goes for gpu_vector_relative_source_destination_moves (behind gpu_ready()) and the wave64 parts of mesh_program / mesh_slot.
  • The mesh-dispatch tests (mesh_dispatch, mesh_lane, mesh_reduce, mesh_scalar, mesh_vgpr, mesh_vector, mesh_memory, ...) do run on it and pass. No device removal or TDR.

So on NVIDIA nothing runs a two-wave epoch yet. I don't think that's a problem for a validation-only PR, but the PR text ("live Wave64 tests cover two-wave scheduling ...") could say these need a wave64 adapter. I've proposed on #42 that such skips get printed and counted.

Radeon RDNA2 iGPU (Ryzen 5 7600X, driver 24.30.66; wave 32..64, no mesh shaders): 479 passed, 69 failed.

  • 66 fail with CreatePipelineState (mesh): The parameter is incorrect (unwrap on the runner's mesh draw): 26 in mesh_vector, 15 mesh_scalar, 14 mesh_memory, 5 mesh_dispatch, 2 mesh_alloc_export, and 1 each in mesh_export, mesh_lane, mesh_reduce, mesh_vgpr. These tests need a check like mesh_ready() in recomp/tests.rs (runner::mesh_shaders_supported(), added in #41; on main the runner doesn't read MeshShaderTier yet).

  • 3 are real numeric differences on this native-wave64 adapter (none of them uses mesh), probably worth a look since this is the only kind of hardware where the epoch shell runs:

    • float_math_family_matches_mature_domains_and_wave64: close(at(absolute_lane, 9), input.log2()) fails (mesh_epoch_hlsl.rs:2095)
    • fma_mix_modes_match_cpu_fused_edges_and_wave64: got 0x51517E00, expected 0x5151FE00 (:2324)
    • global_load_last_dword_succeeds_and_oob_preserves_destination: got 0xA5A55A5A, expected the preserved 0x51515151 (:2586)

    I haven't dug into these. The OOB one looks like the destination isn't preserved when the load is refused, or the bound check passes on this driver. Happy to run a patched branch on either GPU if that helps.

main + #41 on the same iGPU passes everything (354 passed).

**@⁠grahamster2** on GitHub · 2026-11-22 20:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/35#issuecomment-7085645386) Ran this on the two GPUs it's meant for, merged onto current `main` plus #41 to pick the adapter, `cargo test --workspace --release --no-fail-fast`, with `XCL_SAMPLE_RPF` set to a retail `shaders.rpf`. **RTX 3080** (D3D12 wave range 32..32, mesh tier 1): 546 passed, 2 failed. The 2 failures are the existing wave64-MS ones (`retail_mesh_pipelines_through_the_hook` 0 / 7, and the mesh half of the background-build test), the same as on `main`. Most of the new wave64 coverage doesn't actually run there, though: - The validation epoch shell (`mesh_epoch_hlsl.rs`, `validation_epoch_hlsl`) is `[WaveSize(64)] [numthreads(128,1,1)]` and reads lanes through `WaveReadLaneAt(.., source < 64)`, so it's a native-wave64 form. Its 19 GPU checks compile it and then return early on `!wave64_supported()`, and libtest counts them as passed. The same goes for `gpu_vector_relative_source_destination_moves` (behind `gpu_ready()`) and the wave64 parts of `mesh_program` / `mesh_slot`. - The mesh-dispatch tests (`mesh_dispatch`, `mesh_lane`, `mesh_reduce`, `mesh_scalar`, `mesh_vgpr`, `mesh_vector`, `mesh_memory`, ...) do run on it and pass. No device removal or TDR. So on NVIDIA nothing runs a two-wave epoch yet. I don't think that's a problem for a validation-only PR, but the PR text ("live Wave64 tests cover two-wave scheduling ...") could say these need a wave64 adapter. I've proposed on #42 that such skips get printed and counted. **Radeon RDNA2 iGPU** (Ryzen 5 7600X, driver 24.30.66; wave 32..64, **no mesh shaders**): 479 passed, **69 failed**. - 66 fail with `CreatePipelineState (mesh): The parameter is incorrect` (unwrap on the runner's mesh draw): 26 in `mesh_vector`, 15 `mesh_scalar`, 14 `mesh_memory`, 5 `mesh_dispatch`, 2 `mesh_alloc_export`, and 1 each in `mesh_export`, `mesh_lane`, `mesh_reduce`, `mesh_vgpr`. These tests need a check like `mesh_ready()` in `recomp/tests.rs` (`runner::mesh_shaders_supported()`, added in #41; on `main` the runner doesn't read `MeshShaderTier` yet). - 3 are real numeric differences on this native-wave64 adapter (none of them uses mesh), probably worth a look since this is the only kind of hardware where the epoch shell runs: - `float_math_family_matches_mature_domains_and_wave64`: `close(at(absolute_lane, 9), input.log2())` fails (mesh_epoch_hlsl.rs:2095) - `fma_mix_modes_match_cpu_fused_edges_and_wave64`: got `0x51517E00`, expected `0x5151FE00` (:2324) - `global_load_last_dword_succeeds_and_oob_preserves_destination`: got `0xA5A55A5A`, expected the preserved `0x51515151` (:2586) I haven't dug into these. The OOB one looks like the destination isn't preserved when the load is refused, or the bound check passes on this driver. Happy to run a patched branch on either GPU if that helps. `main` + #41 on the same iGPU passes everything (354 passed).
Author
Owner

@⁠Foniass on GitHub · 2026-11-22 22:47 UTC · original

Tested on RTX 5070 Ti only (Blackwell, driver 32.0.16.2114, D3D12 wave range 32..32, mesh tier 1). The RDNA2 iGPU on this machine is disabled, so it wasn't tested. The branch was merged onto main 521ec08 (clean merge) and run with cargo test --workspace --release --no-fail-fast -- --test-threads=4, no XCL_SAMPLE_* set. Hardware details are in #42.

passed failed ignored
main 521ec08 367 0 34
main + #35 574 1 36
  • The PR adds 210 tests, and every existing test still passes. There was no TDR and no device removal.
  • New failure, reproducible when run alone: mesh_vector::tests::decoded_final_float_math_edges_match_actual_u6 (mesh_vector.rs:9072). Register 3 is v_fract_f32 of +inf. The CPU model (value - value.floor(), :3434) expects NaN; the GPU gives 0x7F800000 (+inf). The stage-B lowering emits frac(x) (mesh_vector.rs:4159), and on this driver frac(+inf) is +inf. Other forms I tried there:
    • x - floor(x) also gives +inf (it ends up as the same frc).
    • min(x - floor(x), asfloat(0x3F7FFFFFu)), the form of fract_f in emit.rs, gives 0x3F7FFFFF, because min returns the non-NaN operand.
    • (isinf(x) ? asfloat(0x7FC00000u) : frac(x)) passes, and all 218 mesh_ tests then pass on the 5070 Ti.
  • What runs on NVIDIA: 41 tests return through gpu_ready() (main has 40; the new one is gpu_vector_relative_source_destination_moves). Another 29 compile their HLSL and then return on !wave64_supported() without a message: 28 in mesh_epoch_hlsl.rs, 1 in mesh_epoch_vgpr_buffer.rs. main now has runner::skip_test (#51), which would make these show up as SKIPPED after a rebase. The mesh-dispatch families (mesh_vector, mesh_scalar, mesh_memory, …) do run here.
**@⁠Foniass** on GitHub · 2026-11-22 22:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/35#issuecomment-7087077535) Tested on RTX 5070 Ti only (Blackwell, driver 32.0.16.2114, D3D12 wave range 32..32, mesh tier 1). The RDNA2 iGPU on this machine is disabled, so it wasn't tested. The branch was merged onto `main` 521ec08 (clean merge) and run with `cargo test --workspace --release --no-fail-fast -- --test-threads=4`, no `XCL_SAMPLE_*` set. Hardware details are in #42. | | passed | failed | ignored | |---|---|---|---| | `main` 521ec08 | 367 | 0 | 34 | | `main` + #35 | 574 | 1 | 36 | - The PR adds 210 tests, and every existing test still passes. There was no TDR and no device removal. - **New failure, reproducible when run alone:** `mesh_vector::tests::decoded_final_float_math_edges_match_actual_u6` (mesh_vector.rs:9072). Register 3 is `v_fract_f32` of +inf. The CPU model (`value - value.floor()`, :3434) expects NaN; the GPU gives `0x7F800000` (+inf). The stage-B lowering emits `frac(x)` (mesh_vector.rs:4159), and on this driver `frac(+inf)` is +inf. Other forms I tried there: - `x - floor(x)` also gives +inf (it ends up as the same `frc`). - `min(x - floor(x), asfloat(0x3F7FFFFFu))`, the form of `fract_f` in emit.rs, gives `0x3F7FFFFF`, because `min` returns the non-NaN operand. - `(isinf(x) ? asfloat(0x7FC00000u) : frac(x))` passes, and all 218 `mesh_` tests then pass on the 5070 Ti. - **What runs on NVIDIA:** 41 tests return through `gpu_ready()` (main has 40; the new one is `gpu_vector_relative_source_destination_moves`). Another 29 compile their HLSL and then return on `!wave64_supported()` without a message: 28 in `mesh_epoch_hlsl.rs`, 1 in `mesh_epoch_vgpr_buffer.rs`. `main` now has `runner::skip_test` (#51), which would make these show up as `SKIPPED` after a rebase. The mesh-dispatch families (`mesh_vector`, `mesh_scalar`, `mesh_memory`, …) do run here.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.