Shader tests: skip WaveSize(32) pipelines on 64-lane-only hosts #290

Manually merged
github merged 1 commit from github-bot/gh-290 into a-publier 2026-11-27 00:57:57 +00:00 AGit
Owner

@⁠WellyngtonSantos on GitHub · 2026-11-26 19:15 UTC · original
WellyngtonSantos:wave32-skip → a-publier · +38 −5 · 3 files · 1 commits · merged 2026-11-26 22:30 UTC

Why

Four hardware tests make pipelines that declare WaveSize(32). A GCN card such as Polaris runs 64-lane waves only, so the driver refuses those pipelines with E_INVALIDARG, and the tests fail instead of being skipped:

emit::valu_tests::ds_min_max_f32_order_floats_and_return_the_old_value          (its wave32 cases)
emit::valu_tests::v_permlane16_and_x16_read_the_lanes_their_selectors_pick
emit::valu_tests::whole_wave_f64_sum_and_cvt_f32_f64
emit::wave64_tests::partial_dispatch_with_a_cross_half_wave_op_runs_in_32_lane_waves

hardware: compute_pipeline failed: Parâmetro incorreto.      (E_INVALIDARG, Portuguese Windows)

wave64_tests and permlane_tests already ask the device for its wave range and skip on such a host. These four didn't.

What

  • Host::runs_wave32() asks D3D12_OPTIONS1 whether 32 is in WaveLaneCountMin..=WaveLaneCountMax. It is the same query translation_caps() makes.
  • run_cases_on skips a refused pipeline only when the host has no 32-lane waves, and says so. On a host with 32-lane waves a refusal still panics, so no real failure is hidden. When every device was skipped for that reason, the case returns quietly instead of printing "no SM 6.6 hardware device".
  • whole_wave_f64_sum_and_cvt_f32_f64 widens its existing WARP skip to a 64-lane-only host.
  • partial_dispatch_with_a_cross_half_wave_op_runs_in_32_lane_waves skips its 32-lane pipeline on such a host, like the test above it in the same file.

Tests only. No change to translation or to the runtime.

Tested

RX 580 2048SP (Polaris), AMD legacy driver 31.0.21925.1001, Windows 11 26200. The device reports shader model 6.7, waves of 64 to 64 lanes, no mesh shaders. Built from cd8dfc0 with the pinned 1.98.1 toolchain, cross-compiled with cargo-xwin:

cargo xwin test -p victory-shader --release --target x86_64-pc-windows-msvc
victory-shader (all tests) passed failed ignored
cd8dfc0 298 4 4
this branch 302 0 4

With --nocapture, the four now print e.g. hardware: no 32-lane waves, compute_pipeline skipped (…) / the device does not support wave32; hardware dispatch skipped. In ds_min_max_f32_order_floats_and_return_the_old_value the 64-thread cases still run and pass on the card. Only the wave32 ones are skipped.

cargo clippy -p victory-shader --tests is clean for these files. rustfmt reports no new differences in them: the counts are the same before and after, and the existing ones are untouched.

This is the same machine as the victory system report in #268. It's available for reruns of anything that doesn't need the title.

**@⁠WellyngtonSantos** on GitHub · 2026-11-26 19:15 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/290) `WellyngtonSantos:wave32-skip` → `a-publier` · +38 −5 · 3 files · 1 commits · merged 2026-11-26 22:30 UTC ## Why Four hardware tests make pipelines that declare `WaveSize(32)`. A GCN card such as Polaris runs 64-lane waves only, so the driver refuses those pipelines with `E_INVALIDARG`, and the tests fail instead of being skipped: ``` emit::valu_tests::ds_min_max_f32_order_floats_and_return_the_old_value (its wave32 cases) emit::valu_tests::v_permlane16_and_x16_read_the_lanes_their_selectors_pick emit::valu_tests::whole_wave_f64_sum_and_cvt_f32_f64 emit::wave64_tests::partial_dispatch_with_a_cross_half_wave_op_runs_in_32_lane_waves hardware: compute_pipeline failed: Parâmetro incorreto. (E_INVALIDARG, Portuguese Windows) ``` `wave64_tests` and `permlane_tests` already ask the device for its wave range and skip on such a host. These four didn't. ## What - `Host::runs_wave32()` asks `D3D12_OPTIONS1` whether 32 is in `WaveLaneCountMin..=WaveLaneCountMax`. It is the same query `translation_caps()` makes. - `run_cases_on` skips a refused pipeline **only** when the host has no 32-lane waves, and says so. On a host with 32-lane waves a refusal still panics, so no real failure is hidden. When every device was skipped for that reason, the case returns quietly instead of printing "no SM 6.6 hardware device". - `whole_wave_f64_sum_and_cvt_f32_f64` widens its existing WARP skip to a 64-lane-only host. - `partial_dispatch_with_a_cross_half_wave_op_runs_in_32_lane_waves` skips its 32-lane pipeline on such a host, like the test above it in the same file. Tests only. No change to translation or to the runtime. ## Tested RX 580 2048SP (Polaris), AMD legacy driver 31.0.21925.1001, Windows 11 26200. The device reports shader model 6.7, waves of 64 to 64 lanes, no mesh shaders. Built from `cd8dfc0` with the pinned 1.98.1 toolchain, cross-compiled with cargo-xwin: ``` cargo xwin test -p victory-shader --release --target x86_64-pc-windows-msvc ``` | `victory-shader` (all tests) | passed | failed | ignored | |---|---|---|---| | `cd8dfc0` | 298 | 4 | 4 | | this branch | **302** | **0** | 4 | With `--nocapture`, the four now print e.g. `hardware: no 32-lane waves, compute_pipeline skipped (…)` / `the device does not support wave32; hardware dispatch skipped`. In `ds_min_max_f32_order_floats_and_return_the_old_value` the 64-thread cases still run and pass on the card. Only the wave32 ones are skipped. `cargo clippy -p victory-shader --tests` is clean for these files. `rustfmt` reports no new differences in them: the counts are the same before and after, and the existing ones are untouched. This is the same machine as the `victory system` report in #268. It's available for reruns of anything that doesn't need the title.
Four hardware tests make pipelines that declare WaveSize(32). A GCN card
such as Polaris runs 64-lane waves only, so the driver refuses them with
E_INVALIDARG and the tests fail instead of being skipped, as wave64_tests
and permlane_tests already do for such hosts.

Host::runs_wave32 asks OPTIONS1 for the wave range, the same query
translation_caps makes. run_cases_on and whole_wave_f64_sum_and_cvt_f32_f64
skip a refused pipeline only on a host without 32-lane waves, so a refusal
on a host that has them still fails. partial_dispatch_with_a_cross_half_wave_op_runs_in_32_lane_waves
skips its 32-lane pipeline on such a host, like its neighbour does.

On an RX 580 (driver 31.0.21925.1001, waves of 64 to 64 lanes):
victory-shader went from 298 passed / 4 failed to 302 passed / 0 failed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:22:35 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-26 20:45 UTC · original

Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release (wave32 and wave64), at 06d6465: cargo test --release -p victory-shader --lib 302 passed, 0 failed, 4 ignored. The four tests you gate still run and pass on this card, since it reports 32-lane waves as supported, so nothing that used to run is skipped here.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-26 20:45 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/290#issuecomment-7203047205) Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release (wave32 and wave64), at `06d6465`: `cargo test --release -p victory-shader --lib` 302 passed, 0 failed, 4 ignored. The four tests you gate still run and pass on this card, since it reports 32-lane waves as supported, so nothing that used to run is skipped here. AI-assisted (Claude Code); no game data.
github manually merged commit 479bb2545c into a-publier 2026-11-27 00:57:57 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.