test(shader): cover divergent FP16 wave64 reductions on wave32 hardware #93

Manually merged
github merged 1 commit from gh-pr/93/head into gh-pr/93/base 2026-11-26 03:43:47 +00:00
Owner

@⁠bymaxdev on GitHub · 2026-11-25 22:27 UTC · original
bymaxdev:investigate/nvidia-shader-rejection → main · +51 −4 · 1 files · 1 commits · merged 2026-11-25 23:02 UTC

Summary

Adds regression coverage for divergent FP16 wave64 reductions on wave32 hardware.

During testing on an NVIDIA RTX 5060, the existing test for FP16 reductions with inactive lanes was skipped because it explicitly requested WaveSize(64).

The D3D12 debug layer reported:

Shader wants wave lane count of 64 but maximum wave lane count for device is 32.

Further investigation showed that applying the existing ir::without_early_outs transformation before lowering to wave32 allows the shader to execute successfully while preserving the console's reduction tree bit for bit in the tested cases.

Changes

  • Add a dedicated wave32 hardware regression test.
  • Preserve the existing native wave64 test.
  • Share the reference calculation and test cases between both variants.
  • Query host wave capabilities before GPU execution.
  • Preserve detailed D3D12 pipeline creation errors in on_the_card.

No production shader translation behavior is changed.

Validation

Environment

  • Windows
  • NVIDIA GeForce RTX 5060 (8 GB)
  • NVIDIA driver 621.24
  • Rust 1.98.1
  • Base commit: 2b33e08

The new test successfully executed on hardware with 64, 63, 40, 33, 32, 17, 5 and 1 active console lanes, matching the expected FP16 reduction results in every case.

Test results

  • New regression test with VICTORY_STRICT_TESTS=1: passed.
  • Full wave64 test module: 11 passed, 0 failed, including the expected hardware capability skip.
  • Full shader test suite: 240 passed, 0 failed, 3 ignored, including existing environment-dependent skips.
  • cargo clippy -p victory-shader --tests -- -D warnings: passed.
  • git diff --check: passed.

Limitations

The native wave64 variant was not executed on AMD hardware. This regression test exercises the existing early-out transformation directly rather than the complete automatic translation retry path.

This PR adds test coverage and improves diagnostics; it does not claim a runtime performance improvement.

Related to the GPU test diagnostics work in #32.

**@⁠bymaxdev** on GitHub · 2026-11-25 22:27 UTC · [original](https://github.com/uiliannn/VItoriaBr/pull/93) `bymaxdev:investigate/nvidia-shader-rejection` → `main` · +51 −4 · 1 files · 1 commits · merged 2026-11-25 23:02 UTC ## Summary Adds regression coverage for divergent FP16 wave64 reductions on wave32 hardware. During testing on an NVIDIA RTX 5060, the existing test for FP16 reductions with inactive lanes was skipped because it explicitly requested WaveSize(64). The D3D12 debug layer reported: > Shader wants wave lane count of 64 but maximum wave lane count for device is 32. Further investigation showed that applying the existing `ir::without_early_outs` transformation before lowering to wave32 allows the shader to execute successfully while preserving the console's reduction tree bit for bit in the tested cases. ## Changes - Add a dedicated wave32 hardware regression test. - Preserve the existing native wave64 test. - Share the reference calculation and test cases between both variants. - Query host wave capabilities before GPU execution. - Preserve detailed D3D12 pipeline creation errors in `on_the_card`. No production shader translation behavior is changed. ## Validation **Environment** - Windows - NVIDIA GeForce RTX 5060 (8 GB) - NVIDIA driver 621.24 - Rust 1.98.1 - Base commit: `2b33e08` The new test successfully executed on hardware with 64, 63, 40, 33, 32, 17, 5 and 1 active console lanes, matching the expected FP16 reduction results in every case. **Test results** - New regression test with `VICTORY_STRICT_TESTS=1`: passed. - Full wave64 test module: 11 passed, 0 failed, including the expected hardware capability skip. - Full shader test suite: 240 passed, 0 failed, 3 ignored, including existing environment-dependent skips. - `cargo clippy -p victory-shader --tests -- -D warnings`: passed. - `git diff --check`: passed. ## Limitations The native wave64 variant was not executed on AMD hardware. This regression test exercises the existing early-out transformation directly rather than the complete automatic translation retry path. This PR adds test coverage and improves diagnostics; it does not claim a runtime performance improvement. Related to the GPU test diagnostics work in #32.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:45 +00:00
github manually merged commit 7045c8129f into gh-pr/93/base 2026-11-26 03:43:47 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.