test: skip hardware adapters that cannot run a wave64 fixture #260

Open
github-bot wants to merge 1 commit from github-bot/gh-260 into main AGit
Owner

@⁠Pr-Leonida on GitHub · 2026-11-26 14:08 UTC · original
Pr-Leonida:test-skip-incapable-adapters → main · +78 −19 · 3 files · 1 commits · open

What

The all-adapters-walking GPU-exec tests (split_tests, lane_read_loop_tests, and each_adapter_gets_what_it_runs) iterate over every hardware adapter and hard-failed (panic!) on the first one that refused the fixture. On a hybrid laptop the second GPU is a 16-lane Intel iGPU that refuses the console wave64 fixtures at translation (and pipeline creation) before any GPU work, so those tests panicked on the iGPU before the capable GPU was ever exercised.

This change reports the refusal and skips that host, and adds a vacuous-pass guard: the test now fails if no adapter ran the fixture. A capable GPU still has to pass.

Why it's safe

  • The skip only triggers when a host refuses the fixture at translation or PSO creation — i.e. it cannot run the program at all. That is a host-capability question (a 16-lane iGPU vs. a 64-lane-wave console fixture), not a translator/driver correctness question.
  • Readback correctness is still fully checked on every host that does run: the assert_eq!(out, want) paths are untouched.
  • The vacuous-pass guard (ran > 0) means a machine with no capable GPU fails loudly instead of passing on an empty loop.

Verified

On an RTX 5070 Laptop (32-lane) + Intel UHD (16-lane) box, at the current main tip:

  • Before: 23 victory-shader emit failures.
  • After: 265 passed / 12 failed. The 11 all-adapters-walking tests now pass — the iGPU is reported and skipped (Intel(R) UHD Graphics: waves 16-16 … console wave64 lanes on a host without 64-lane waves is not supported; skipped) and the RTX runs every fixture exact (split true).

Out of scope (intentionally untouched)

  • The 4 valu_tests that fail at compute-PSO creation with E_INVALIDARG even on a pure-NVIDIA run are a separate, genuine driver/translator issue — reported in #259. This change does not touch them; they still fail, as they should.
  • The 7 memory_tests + 1 image_tests that use the default adapter (Host::new) still select the iGPU on this box and so still fail. That is a default-adapter-selection question, not an all-adapters-walk one; VICTORY_ADAPTER=nvidia makes them pass. Left for a separate change.

Files: crates/victory-shader/src/emit/{split_tests.rs, lane_read_loop_tests.rs, mod.rs}.

**@⁠Pr-Leonida** on GitHub · 2026-11-26 14:08 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/260) `Pr-Leonida:test-skip-incapable-adapters` → `main` · +78 −19 · 3 files · 1 commits · open ## What The all-adapters-walking GPU-exec tests (`split_tests`, `lane_read_loop_tests`, and `each_adapter_gets_what_it_runs`) iterate over every hardware adapter and hard-failed (`panic!`) on the first one that refused the fixture. On a hybrid laptop the second GPU is a 16-lane Intel iGPU that refuses the console wave64 fixtures at translation (and pipeline creation) before any GPU work, so those tests panicked on the iGPU before the capable GPU was ever exercised. This change reports the refusal and skips that host, and adds a vacuous-pass guard: the test now fails if **no** adapter ran the fixture. A capable GPU still has to pass. ## Why it's safe - The skip only triggers when a host refuses the fixture at *translation* or *PSO creation* — i.e. it cannot run the program at all. That is a host-capability question (a 16-lane iGPU vs. a 64-lane-wave console fixture), not a translator/driver correctness question. - Readback correctness is still fully checked on every host that does run: the `assert_eq!(out, want)` paths are untouched. - The vacuous-pass guard (`ran > 0`) means a machine with no capable GPU fails loudly instead of passing on an empty loop. ## Verified On an RTX 5070 Laptop (32-lane) + Intel UHD (16-lane) box, at the current `main` tip: - Before: 23 `victory-shader` emit failures. - After: **265 passed / 12 failed**. The 11 all-adapters-walking tests now pass — the iGPU is reported and skipped (`Intel(R) UHD Graphics: waves 16-16 … console wave64 lanes on a host without 64-lane waves is not supported; skipped`) and the RTX runs every fixture `exact (split true)`. ## Out of scope (intentionally untouched) - The **4 `valu_tests`** that fail at compute-PSO creation with `E_INVALIDARG` even on a pure-NVIDIA run are a separate, genuine driver/translator issue — reported in #259. This change does not touch them; they still fail, as they should. - The **7 `memory_tests` + 1 `image_tests`** that use the *default* adapter (`Host::new`) still select the iGPU on this box and so still fail. That is a default-adapter-selection question, not an all-adapters-walk one; `VICTORY_ADAPTER=nvidia` makes them pass. Left for a separate change. Files: `crates/victory-shader/src/emit/{split_tests.rs, lane_read_loop_tests.rs, mod.rs}`.
A hybrid laptop's 16-lane iGPU refuses the console wave64 fixtures at
translation (and pipeline creation) before any GPU work, so the
all-adapters-walking tests panicked on it before the capable GPU was
ever exercised. Report the refusal and skip the host, and require at
least one adapter to run the fixture so the test cannot pass vacuously.

Verified on an RTX 5070 Laptop + Intel UHD (16-lane) box: the 11
walking tests now pass with the iGPU reported-and-skipped and the RTX
exact, and the 4 divergent-loop VALU PSO refusals (a separate, genuine
NVIDIA driver issue) are left untouched.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:12:50 +00:00
Author
Owner

@⁠gut0to on GitHub · 2026-11-26 15:32 UTC · original · reviewed

AI-assisted static review; I inspected the changed adapter loop and its stated capability rationale, but did not run the GPU tests.

**@⁠gut0to** on GitHub · 2026-11-26 15:32 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/260#pullrequestreview-6076813265) · **reviewed** AI-assisted static review; I inspected the changed adapter loop and its stated capability rationale, but did not run the GPU tests.
@ -144,0 +142,4 @@
let cs = match emit(&program(wave, lane), host.target()) {
Ok(cs) => cs,
Err(e) => {
eprintln!("{name}: wave{wave}: translation refused: {e}");
Author
Owner

@⁠gut0to on GitHub · 2026-11-26 15:32 UTC · original

This treats every translation failure as an unsupported host. emit can also fail because of a lowering/compiler regression on a host whose reported wave range supports this fixture; since the guard only requires one adapter to pass, that failure would become a skip when another adapter succeeds. Could the skip be limited to an explicit wave-capability mismatch and let other translation errors fail?

**@⁠gut0to** on GitHub · 2026-11-26 15:32 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/260#discussion_r4710489533) This treats every translation failure as an unsupported host. `emit` can also fail because of a lowering/compiler regression on a host whose reported wave range supports this fixture; since the guard only requires one adapter to pass, that failure would become a skip when another adapter succeeds. Could the skip be limited to an explicit wave-capability mismatch and let other translation errors fail?
Author
Owner

@⁠WellyngtonSantos on GitHub · 2026-11-27 13:08 UTC · original

A heads-up from trying this on the current default branch: it targets main, which is still at 4f62c2a. Recent merges, #290 included, go to a-publier, and the two branches don't share history, so git merge refuses (refusing to merge unrelated histories). Cherry-picking 170e2b1 onto a-publier 4eb6cfd conflicts, because lane_read_loop_tests.rs and split_tests.rs no longer exist there, and emit/mod.rs conflicts as well.

So this would need redoing against a-publier to land. For the other side of the same problem, hosts with 64-lane waves only: #290 (merged) skips the WaveSize(32) pipelines on such a device, and on an RX 580 a-publier runs victory-shader at 303/0. I can run a rebased version on that card if useful.

**@⁠WellyngtonSantos** on GitHub · 2026-11-27 13:08 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/260#issuecomment-7219103168) A heads-up from trying this on the current default branch: it targets `main`, which is still at `4f62c2a`. Recent merges, #290 included, go to `a-publier`, and the two branches don't share history, so `git merge` refuses (`refusing to merge unrelated histories`). Cherry-picking `170e2b1` onto `a-publier` `4eb6cfd` conflicts, because `lane_read_loop_tests.rs` and `split_tests.rs` no longer exist there, and `emit/mod.rs` conflicts as well. So this would need redoing against `a-publier` to land. For the other side of the same problem, hosts with 64-lane waves only: #290 (merged) skips the `WaveSize(32)` pipelines on such a device, and on an RX 580 `a-publier` runs `victory-shader` at 303/0. I can run a rebased version on that card if useful.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/260/head:github-bot/gh-260'
git switch 'github-bot/gh-260'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-260'
git switch 'github-bot/gh-260'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-260'
git switch 'github-bot/gh-260'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-260'
git switch 'main'
git merge --squash 'github-bot/gh-260'
git switch 'main'
git merge --ff-only 'github-bot/gh-260'
git switch 'main'
git merge 'github-bot/gh-260'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.