Recompiler: lower wave64 VS/PS whole-wave reductions to WaveActive* #1126

Closed
github-bot wants to merge 1 commit from github-bot/gh-1126 into main AGit
Owner

@⁠GamingChelsea on GitHub · 2026-11-24 12:09 UTC · original
GamingChelsea:fix/wave32-partial-reduction → main · +755 −43 · 4 files · 1 commits · closed without merging

Recognise whole-wave integer reductions in wave64 VS / PS programs and lower them to HLSL WaveActive* intrinsics so partial waves on 32-lane and 64-lane GPUs do not read unlaunched lanes (which read 0 instead of the reduction's identity element and lack the console's inactive-lane partial results).

Note on docs: this addresses the partial-wave whole-wave reduction gap described in docs/wave64-on-wave32.md ("What is still not exact") and HANDOFF.md item 5.

What is in it

  • crates/xcl/src/gpu/recomp/upper_lanes.rs: track inactive-lane (unlaunched + helper) mask bits (inact_lo, treating S_WQM as Any), inactive-lane VGPR constants (inact_const), and per-lane 64-bit reduction sets (VReduce / SReduce) across V_MIN_U32, V_MAX_U32, V_MIN_I32, V_MAX_I32, V_OR_B32, V_AND_B32, V_XOR_B32, and V_ADD_NC_U32 (enforcing identity match and disjoint sets for non-idempotent xor/add); record reduction_seeds and reduction_results plus unit tests.
  • crates/xcl/src/gpu/recomp/mod.rs and crates/xcl/src/gpu/recomp/emit.rs: capture xcl_red_<pc> = WaveActiveMin/Max/BitOr/BitAnd/BitXor/Sum(vN) before the first cross-lane step of a recognised reduction and substitute it at the final v_readlane / v_readfirstlane (enabled for wave64 VS / PS on all GPUs; upper-lane xcl_hw32 / Read::Const / Read::Shadow remain gated on split_wave64).
  • crates/xcl/tests/wave32_partial_reduction.rs: standalone synthetic GPU tests (no retail files or XCL_SAMPLE_*) covering 3-quad and 1-quad partial-wave PS draws (V_MIN_U32, V_MAX_U32, V_MAX_I32 over negative values) and a 3-vertex partial-wave VS draw (V_MIN_U32, V_MAX_U32, V_MIN_I32).

Tested

  • Hardware: NVIDIA GeForce RTX 4070 (driver 32.0.16.2124, Wave32), Intel Core i7-14700K, Windows 11 (10.0.26300.0), rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2602.17, debug (tests) and release (smoke).
  • cargo test --workspace -- --test-threads=4: 744 passed, 0 failed, 41 ignored.
  • SKIPPED GPU tests on this adapter (Wave32-only):
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
  • cargo test -p xcl --test wave32_partial_reduction -- --test-threads=1 --nocapture: 2 passed, 0 failed, 0 ignored (0 skipped).

Regression run
main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 4070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1348 (PresentX 1348)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15639 MB

PR head:

xcl-smoke v1
commit: 1f6666fe1e16992b87cdc667fc71d063c6ee767b
gpu: NVIDIA GeForce RTX 4070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1318 (PresentX 1318)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15492 MB

Not tested

  • AMD / Wave64 hardware (the two wave64-hardware tests were skipped on the RTX 4070).
  • Ignored retail shader corpus tests (XCL_SAMPLE_RPF).

AI use

  • Antigravity with Gemini 4 Neon: designed and implemented the whole-wave reduction analysis/lowering, wrote the unit and synthetic GPU tests, ran the workspace test suite and smoke regression runs, and drafted this PR description.
**@⁠GamingChelsea** on GitHub · 2026-11-24 12:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126) `GamingChelsea:fix/wave32-partial-reduction` → `main` · +755 −43 · 4 files · 1 commits · closed without merging Recognise whole-wave integer reductions in wave64 VS / PS programs and lower them to HLSL `WaveActive*` intrinsics so partial waves on 32-lane and 64-lane GPUs do not read unlaunched lanes (which read 0 instead of the reduction's identity element and lack the console's inactive-lane partial results). Note on docs: this addresses the partial-wave whole-wave reduction gap described in `docs/wave64-on-wave32.md` ("What is still not exact") and `HANDOFF.md` item 5. **What is in it** - `crates/xcl/src/gpu/recomp/upper_lanes.rs`: track inactive-lane (unlaunched + helper) mask bits (`inact_lo`, treating `S_WQM` as `Any`), inactive-lane VGPR constants (`inact_const`), and per-lane 64-bit reduction sets (`VReduce` / `SReduce`) across `V_MIN_U32`, `V_MAX_U32`, `V_MIN_I32`, `V_MAX_I32`, `V_OR_B32`, `V_AND_B32`, `V_XOR_B32`, and `V_ADD_NC_U32` (enforcing identity match and disjoint sets for non-idempotent `xor`/`add`); record `reduction_seeds` and `reduction_results` plus unit tests. - `crates/xcl/src/gpu/recomp/mod.rs` and `crates/xcl/src/gpu/recomp/emit.rs`: capture `xcl_red_<pc> = WaveActiveMin/Max/BitOr/BitAnd/BitXor/Sum(vN)` before the first cross-lane step of a recognised reduction and substitute it at the final `v_readlane` / `v_readfirstlane` (enabled for wave64 VS / PS on all GPUs; upper-lane `xcl_hw32` / `Read::Const` / `Read::Shadow` remain gated on `split_wave64`). - `crates/xcl/tests/wave32_partial_reduction.rs`: standalone synthetic GPU tests (no retail files or `XCL_SAMPLE_*`) covering 3-quad and 1-quad partial-wave PS draws (`V_MIN_U32`, `V_MAX_U32`, `V_MAX_I32` over negative values) and a 3-vertex partial-wave VS draw (`V_MIN_U32`, `V_MAX_U32`, `V_MIN_I32`). **Tested** - Hardware: NVIDIA GeForce RTX 4070 (driver 32.0.16.2124, Wave32), Intel Core i7-14700K, Windows 11 (10.0.26300.0), `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC 1.9.2602.17, debug (tests) and release (smoke). - `cargo test --workspace -- --test-threads=4`: 744 passed, 0 failed, 41 ignored. - `SKIPPED` GPU tests on this adapter (Wave32-only): - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` - `cargo test -p xcl --test wave32_partial_reduction -- --test-threads=1 --nocapture`: 2 passed, 0 failed, 0 ignored (0 skipped). **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 4070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1348 (PresentX 1348) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15639 MB ``` PR head: ``` xcl-smoke v1 commit: 1f6666fe1e16992b87cdc667fc71d063c6ee767b gpu: NVIDIA GeForce RTX 4070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1318 (PresentX 1318) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15492 MB ``` **Not tested** - AMD / Wave64 hardware (the two wave64-hardware tests were skipped on the RTX 4070). - Ignored retail shader corpus tests (`XCL_SAMPLE_RPF`). **AI use** - Antigravity with Gemini 4 Neon: designed and implemented the whole-wave reduction analysis/lowering, wrote the unit and synthetic GPU tests, ran the workspace test suite and smoke regression runs, and drafted this PR description.
In partial waves of a wave64 VS or PS (e.g. a 3-quad pixel wave or 3-vertex
VS wave), unlaunched lanes inside the hardware wave never run whole-wave
code and read 0 instead of the reduction's identity element, poisoning
min_u32 / and_b32 (identity -1), min_i32 (i32::MAX), and max_i32 over
negatives (i32::MIN), and losing intermediate partial results that the
console computes in inactive lanes.

Track inactive-lane constants and per-lane reduction sets through
upper_lanes::analyze (excluding S_WQM-widened masks and non-disjoint
non-idempotent combines). When a whole-wave reduction over all 64 lanes is
recognised, capture the input with WaveActiveMin/Max/BitOr/BitAnd/BitXor/Sum
before its first cross-lane step and substitute it at the final readlane.

Verified on an RTX 4070 (Wave32) with new synthetic partial-wave PS/VS GPU
tests in crates/xcl/tests/wave32_partial_reduction.rs and existing
upper_lanes / gpu_wave64_* tests.

Assisted-by: Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:44:16 +00:00
Author
Owner

@⁠bjarngard on GitHub · 2026-11-24 12:45 UTC · original

Test report for head 1f6666f (AMD, native wave64)

Tested

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 744 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: --lib whole_wave 4 passed, --test wave32_partial_reduction 2 passed
  • RTX 5080 (Blackwell, wave32), driver 621.24: full suite 744 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware

Not tested: retail titles, RDNA3/RDNA4.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

**@⁠bjarngard** on GitHub · 2026-11-24 12:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7131879211) Test report for head `1f6666f` (AMD, native wave64) **Tested** - AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug - `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`: 744 passed, 0 failed, 41 ignored, no SKIPPED - With `XCL_REQUIRE_GPU=wave64`: `--lib whole_wave` 4 passed, `--test wave32_partial_reduction` 2 passed - RTX 5080 (Blackwell, wave32), driver 621.24: full suite 744 passed, 0 failed, 41 ignored; SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` **Not tested:** retail titles, RDNA3/RDNA4. **AI use:** the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
Author
Owner

@⁠0xTehuti on GitHub · 2026-11-24 12:59 UTC · original

Test report on NVIDIA GeForce RTX 2070 SUPER (Turing, wave32)

Commit tested
1f6666fe1e16992b87cdc667fc71d063c6ee767b (PR #1126 head)

Tested

  • Hardware:
    • GPU: NVIDIA GeForce RTX 2070 SUPER (Driver 595.79 / 32.0.15.9579, 7989 MiB VRAM)
    • CPU: Intel Core i7-10700K CPU @ 3.80GHz
    • OS: Windows 11 x64, Rust 1.99.0
  • Commands run and results:
    • cargo test -p xcl --lib recomp:
      189 passed; 0 failed; 18 ignored; 0 measured; 513 filtered out; finished in 5.66s
    • cargo test --test wave32_partial_reduction:
      2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.54s
      • gpu_wave32_partial_vs_min_max_reductions ... ok
      • gpu_wave32_partial_ps_min_max_reductions ... ok
  • Findings:
    • Verified that partial-wave vertex and pixel shaders with whole-wave reductions lower cleanly to WaveActive* operations.
    • Inactive lanes in partial waves no longer poison identity values on native wave32 hardware.
    • No regressions observed across the rest of the recompiler test suite.

Not tested

  • Retail title smoke run (retail game assets unset).
  • AMD RDNA native wave64 hardware execution.

AI use

  • Tool: Antigravity / T3 Code
  • Model: Gemini 3.8 Flash
  • Details: Built from PR commit in isolated worktree, ran GPU test suite against real hardware, and recorded test counts.
**@⁠0xTehuti** on GitHub · 2026-11-24 12:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7132194942) ### Test report on NVIDIA GeForce RTX 2070 SUPER (Turing, wave32) **Commit tested** `1f6666fe1e16992b87cdc667fc71d063c6ee767b` (PR #1126 head) **Tested** - **Hardware:** - GPU: NVIDIA GeForce RTX 2070 SUPER (Driver 595.79 / 32.0.15.9579, 7989 MiB VRAM) - CPU: Intel Core i7-10700K CPU @ 3.80GHz - OS: Windows 11 x64, Rust 1.99.0 - **Commands run and results:** - `cargo test -p xcl --lib recomp`: `189 passed; 0 failed; 18 ignored; 0 measured; 513 filtered out; finished in 5.66s` - `cargo test --test wave32_partial_reduction`: `2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.54s` - `gpu_wave32_partial_vs_min_max_reductions ... ok` - `gpu_wave32_partial_ps_min_max_reductions ... ok` - **Findings:** - Verified that partial-wave vertex and pixel shaders with whole-wave reductions lower cleanly to `WaveActive*` operations. - Inactive lanes in partial waves no longer poison identity values on native wave32 hardware. - No regressions observed across the rest of the recompiler test suite. **Not tested** - Retail title smoke run (retail game assets unset). - AMD RDNA native wave64 hardware execution. **AI use** - Tool: Antigravity / T3 Code - Model: Gemini 3.8 Flash - Details: Built from PR commit in isolated worktree, ran GPU test suite against real hardware, and recorded test counts.
Author
Owner

@⁠Cecerw on GitHub · 2026-11-24 14:09 UTC · original

Tested on NVIDIA Ampere (32-lane waves, split wave64): passes

Tree Passed Failed Ignored SKIPPED
Head 1f6666f (base 47efa2e) 744 0 41 2 (no wave64)
Head merged into main 930e8b4 754 0 41 2 (no wave64)
  • RTX 3060 Ti 8 GB, driver 32.0.16.1088; i5-14600K; Windows 11 26300.9818; Rust 1.100.0, debug; DXC 1.9.2602.17
  • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4), no local changes; the merge was done locally, no conflicts
  • whole_wave_reduction_is_recognised_for_all_ops: ok; the existing wave64 VS / PS GPU tests (gpu_wave64_ps_whole_wave_reductions and the others) pass in the split form this GPU uses
  • SKIPPED: the usual two on this adapter (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware)

Not tested: AMD, any title (no smoke run).

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠Cecerw** on GitHub · 2026-11-24 14:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7133930309) **Tested on NVIDIA Ampere (32-lane waves, split wave64): passes** | Tree | Passed | Failed | Ignored | SKIPPED | |---|---|---|---|---| | Head `1f6666f` (base `47efa2e`) | 744 | 0 | 41 | 2 (no wave64) | | Head merged into `main` `930e8b4` | 754 | 0 | 41 | 2 (no wave64) | - RTX 3060 Ti 8 GB, driver 32.0.16.1088; i5-14600K; Windows 11 26300.9818; Rust 1.100.0, debug; DXC 1.9.2602.17 - `.\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`), no local changes; the merge was done locally, no conflicts - `whole_wave_reduction_is_recognised_for_all_ops`: ok; the existing wave64 VS / PS GPU tests (`gpu_wave64_ps_whole_wave_reductions` and the others) pass in the split form this GPU uses - SKIPPED: the usual two on this adapter (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`) **Not tested:** AMD, any title (no smoke run). **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-24 14:35 UTC · original

A run on Linux under Wine.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 1f6666f as it is (based on 47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).
  • gpu::recomp::upper_lanes::tests::whole_wave_reduction_is_recognised_for_all_ops: ok, no SKIPPED.

Not tested

  • whether the new tests fail without the change on this stack; the rest of the suite on this head; a retail title; native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built the head, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-24 14:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7134614379) A run on Linux under Wine. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `1f6666f` as it is (based on `47efa2e`), no uncommitted changes. The lib test binary runs under Wine, one test per process (`--exact`). - `gpu::recomp::upper_lanes::tests::whole_wave_reduction_is_recognised_for_all_ops`: **ok**, no SKIPPED. **Not tested** - whether the new tests fail without the change on this stack; the rest of the suite on this head; a retail title; native Windows. **AI use** - Claude Code (Claude Opus 5.5) built the head, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠ddaikodaiko on GitHub · 2026-11-24 15:54 UTC · original · edited 2026-11-24 16:34 UTC

Test report for head 1f6666f, merged onto main 930e8b4 — Windows 10 + Agility SDK.

Tested

GPU NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, 32-lane waves), driver 32.0.16.1088
CPU / RAM AMD Ryzen 5 1600 (6C / 12T), 15.9 GB
OS Windows 10 Pro 22H2, 10.0.19045.7846
D3D12 Agility SDK 1.620.2 (%LOCALAPPDATA%\XCL\D3D12) — the recompiler GPU tests ran, no fallback to inbox SM 6.5
DXC 1.8.2502.11 (Windows SDK 10.0.26100.0)
Rust 1.100.0 x86_64-pc-windows-msvc, release
Tree PR head 1f6666f merged into main 930e8b4 locally, no conflicts, no other changes
  • cargo test -p xcl --test wave32_partial_reduction --release -- --test-threads=1 --nocapture: 2 passed, 0 failed, 0 skipped.
  • Full suite: cargo test --workspace --release -- --test-threads=4: 754 passed, 0 failed, 41 ignored, 2 SKIPPED (the usual no wave64: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware).
  • Independent check with the retail idiom. Before this PR I had a local test for the same gap built from the pack's exact reduction sequence (s_or_saveexec, v_cndmask with the identity, DPP8 xor 1/2/4, row_mirror, v_permlanex16, v_readlane 32, combine, v_readlane 0) on a 6-pixel / 3-quad triangle, asserting the min and sum over its odd pixels. On main 930e8b4 it fails with min 0 where the console gives 2 (sum 20 is correct). On this PR head the same test passes (min 2, sum 20). So the lowering recognises the real console idiom, not only the synthetic sequence in wave32_partial_reduction.rs.
  • Bitwise / add coverage. wave32_partial_reduction.rs covers min/max (u32 and i32) only, while the description also claims V_OR_B32, V_AND_B32, V_XOR_B32 and V_ADD_NC_U32. A local 3-quad PS test with the same idiom for those four ops (mask + identity, odd pixels 2 and 18):
    • On main b7aa9f3: V_AND_B32 returns 0, expected 2 (its identity is all ones, so unlaunched 0 wins); the run stops at that assertion.
    • On this PR head: AND 2, OR 18, XOR 16, ADD 20 — all correct.
      So the bitwise / add lowering is exercised too, not only min/max.

Not tested

  • AMD / native wave64 hardware.
  • A retail title / xcl-smoke (the retail assets are still downloading here; no XCL_SAMPLE_* was set).

AI use: OpenCode with DeepSeek V4.1 Flash built the tree, ran the tests and wrote this report; every number is from those runs.

**@⁠ddaikodaiko** on GitHub · 2026-11-24 15:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7136808847) · edited 2026-11-24 16:34 UTC Test report for head `1f6666f`, merged onto `main` `930e8b4` — **Windows 10 + Agility SDK**. **Tested** | | | |---|---| | GPU | NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, 32-lane waves), driver `32.0.16.1088` | | CPU / RAM | AMD Ryzen 5 1600 (6C / 12T), 15.9 GB | | OS | Windows 10 Pro 22H2, `10.0.19045.7846` | | D3D12 | Agility SDK `1.620.2` (`%LOCALAPPDATA%\XCL\D3D12`) — the recompiler GPU tests ran, no fallback to inbox SM 6.5 | | DXC | `1.8.2502.11` (Windows SDK `10.0.26100.0`) | | Rust | `1.100.0` `x86_64-pc-windows-msvc`, release | | Tree | PR head `1f6666f` merged into `main` `930e8b4` locally, no conflicts, no other changes | - `cargo test -p xcl --test wave32_partial_reduction --release -- --test-threads=1 --nocapture`: **2 passed, 0 failed, 0 skipped**. - Full suite: `cargo test --workspace --release -- --test-threads=4`: **754 passed, 0 failed, 41 ignored**, 2 SKIPPED (the usual `no wave64`: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`). - **Independent check with the retail idiom.** Before this PR I had a local test for the same gap built from the pack's exact reduction sequence (`s_or_saveexec`, `v_cndmask` with the identity, DPP8 xor 1/2/4, row_mirror, `v_permlanex16`, `v_readlane` 32, combine, `v_readlane` 0) on a 6-pixel / 3-quad triangle, asserting the min and sum over its odd pixels. On `main` `930e8b4` it fails with `min 0` where the console gives `2` (`sum 20` is correct). On this PR head the same test passes (`min 2`, `sum 20`). So the lowering recognises the real console idiom, not only the synthetic sequence in `wave32_partial_reduction.rs`. - **Bitwise / add coverage.** `wave32_partial_reduction.rs` covers min/max (u32 and i32) only, while the description also claims `V_OR_B32`, `V_AND_B32`, `V_XOR_B32` and `V_ADD_NC_U32`. A local 3-quad PS test with the same idiom for those four ops (mask + identity, odd pixels 2 and 18): - On `main` `b7aa9f3`: `V_AND_B32` returns **0**, expected **2** (its identity is all ones, so unlaunched 0 wins); the run stops at that assertion. - On this PR head: **AND 2, OR 18, XOR 16, ADD 20** — all correct. So the bitwise / add lowering is exercised too, not only min/max. **Not tested** - AMD / native wave64 hardware. - A retail title / `xcl-smoke` (the retail assets are still downloading here; no `XCL_SAMPLE_*` was set). AI use: OpenCode with DeepSeek V4.1 Flash built the tree, ran the tests and wrote this report; every number is from those runs.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 08:02 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 08:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7156535675) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-bot closed this pull request 2026-11-26 12:14:43 +00:00
Author
Owner

@⁠GamingChelsea on GitHub · 2026-11-26 12:13 UTC · original

Closing as superseded: main now includes whole-wave reduction lowering (self.reductions / wave32_reductions).

**@⁠GamingChelsea** on GitHub · 2026-11-26 12:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1126#issuecomment-7191735347) Closing as superseded: main now includes whole-wave reduction lowering (self.reductions / wave32_reductions).

Pull request closed

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