Shaders: whole-wave sections follow binary64 sums (WaveActiveSum of a double) #2976

Open
Anzymanz wants to merge 7 commits from upstream-pr/2978 into main
Anzymanz commented 2026-11-26 02:04:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-26T02:04:33Z.


AI disclosure: written with Claude Code (Claude Opus 5.5) at the request of the account owner, who reviews what goes out. The measurements below were run on our machine; no game data is included (hashes, counts and error text only).

Stacked on #2348 (v_cvt_f32_f64): its three commits come first; the last commit is this change.

Problem

WaveActiveSum of a double expands, on the console, into a whole-wave section that works on dword pairs: v_cndmask puts each lane's pair (or +0.0) in two VGPRs, each DPP step moves the two dwords with two v_mov_b32, v_add_f64 adds the pairs, v_permlanex16 joins the rows, v_readlane reads the result (on wave64, the two halves' results, added once more), and an s_mov_b32 copies each dword to the register that leaves the section. The section simulator (emit/wave.rs) follows 32-bit operations only, so both dwords are unknown, and a program that reads them is refused:

a whole-wave section step the simulation does not follow is not supported

That's what five programs in this title hit once #2348 lowers the v_cvt_f32_f64 that reads the sum (before #2348 they stop at that instruction).

Change

  • emit/wave.rs: Sym::Red64 { lo, hi, mask, lanes, high } is one dword of the binary64 sum over lanes of mask ? (lo, hi) : +0.0. v_add_f64 reads both of its sources as (low, high) pairs: register pairs, SGPR pairs, inline 0. It joins two terms of one masked sum when their lanes are disjoint, and writes both destination dwords. v_mov_b32 with DPP, v_permlanex16_b32 and v_readlane_b32 move these symbols a dword at a time already. s_mov_b32 now keeps what its source holds, where it used to be unknown. A sum over every lane is Shape::Sum64.
  • emit/lower/sum64.rs (new, keeping lower.rs under the 512 KiB policy): Shape::Sum64 becomes one waveActiveOp.f64 (sum) over mask ? double(lo, hi) : 0.0. Both dwords share it, one per block. It sets FLOAT64, INT64 and WAVE_OPS.
  • Shortcut (noted in the code): the host adds in its own order, the console in its tree of DPP steps, so terms that aren't exact in binary64 may round differently. Sums of small integers are exact either way.

Tests

  • wave::tests::a_binary64_sum_is_followed_through_its_dwords: the compiler's wave32 expansion (four DPP steps, v_permlanex16, v_readlane, s_mov_b32 copies) gives Sum64 for both read dwords and both copies.
  • wave::tests::a_binary64_sum_counting_a_lane_twice_is_not_a_sum: the same, with a lane added to itself first, gives no shape.
  • valu_tests::a_whole_wave_binary64_sum_reaches_the_host (GPU): the same section run end to end on the host, then v_cvt_f32_f64 of the copied pair; five values, x as f32 expected. Passes on an RX 9070 XT (RADV through vkd3d-proton, GE-Proton 11-14, DXC's dxil.dll).

Measured over the title's shader pack

All 25,889 distinct containers in shaders.rpf went through emit::translate_with offline, on main 63bcca4 + #2348 and then with this commit added:

main + #2348 + this
translated / refused 25,669 / 220 25,670 / 219
programs whose output changes 1 (5dc3b25986622949, refused before)
refused on "a whole-wave section step the simulation does not follow" 5 0

Every other program's output is byte-identical: the s_mov_b32 change gives nothing else a new shape. The new program's DXIL converts with dxil-spirv (master). The other four (6f225b641c5b0708, 6871d6e4b3ac9a10, 926c46bab3b86bd6, a10179ab7eda0dc3) get past the section and stop later at a lane-mask join of an untracked mask, a separate class.

Windows test binary under Proton on the RX 9070 XT: 306 passed and 2 failed. The 2 failures (hosts_that_do_not_fuse_are_named, stub_pipeline_is_created) fail on main in the same environment too. cargo clippy -p victory-shader -- -D warnings is clean, cargo xtask policy is ok, and lower.rs is 523,410 bytes.

Not run: the differential tests (no console compiler here) and NVIDIA.


🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:5502646509 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-26T02:04:33Z. --- > **AI disclosure:** written with Claude Code (Claude Opus 5.5) at the request of the account owner, who reviews what goes out. The measurements below were run on our machine; no game data is included (hashes, counts and error text only). **Stacked on #2348** (`v_cvt_f32_f64`): its three commits come first; the last commit is this change. ## Problem `WaveActiveSum` of a `double` expands, on the console, into a whole-wave section that works on dword pairs: `v_cndmask` puts each lane's pair (or +0.0) in two VGPRs, each DPP step moves the two dwords with two `v_mov_b32`, `v_add_f64` adds the pairs, `v_permlanex16` joins the rows, `v_readlane` reads the result (on wave64, the two halves' results, added once more), and an `s_mov_b32` copies each dword to the register that leaves the section. The section simulator (`emit/wave.rs`) follows 32-bit operations only, so both dwords are unknown, and a program that reads them is refused: `a whole-wave section step the simulation does not follow is not supported` That's what five programs in this title hit once #2348 lowers the `v_cvt_f32_f64` that reads the sum (before #2348 they stop at that instruction). ## Change - `emit/wave.rs`: `Sym::Red64 { lo, hi, mask, lanes, high }` is one dword of the binary64 sum over `lanes` of `mask ? (lo, hi) : +0.0`. `v_add_f64` reads both of its sources as (low, high) pairs: register pairs, SGPR pairs, inline 0. It joins two terms of one masked sum when their lanes are disjoint, and writes both destination dwords. `v_mov_b32` with DPP, `v_permlanex16_b32` and `v_readlane_b32` move these symbols a dword at a time already. `s_mov_b32` now keeps what its source holds, where it used to be unknown. A sum over every lane is `Shape::Sum64`. - `emit/lower/sum64.rs` (new, keeping `lower.rs` under the 512 KiB policy): `Shape::Sum64` becomes one `waveActiveOp.f64` (sum) over `mask ? double(lo, hi) : 0.0`. Both dwords share it, one per block. It sets `FLOAT64`, `INT64` and `WAVE_OPS`. - *Shortcut* (noted in the code): the host adds in its own order, the console in its tree of DPP steps, so terms that aren't exact in binary64 may round differently. Sums of small integers are exact either way. ## Tests - `wave::tests::a_binary64_sum_is_followed_through_its_dwords`: the compiler's wave32 expansion (four DPP steps, `v_permlanex16`, `v_readlane`, `s_mov_b32` copies) gives `Sum64` for both read dwords and both copies. - `wave::tests::a_binary64_sum_counting_a_lane_twice_is_not_a_sum`: the same, with a lane added to itself first, gives no shape. - `valu_tests::a_whole_wave_binary64_sum_reaches_the_host` (GPU): the same section run end to end on the host, then `v_cvt_f32_f64` of the copied pair; five values, `x as f32` expected. Passes on an RX 9070 XT (RADV through vkd3d-proton, GE-Proton 11-14, DXC's `dxil.dll`). ## Measured over the title's shader pack All 25,889 distinct containers in `shaders.rpf` went through `emit::translate_with` offline, on main `63bcca4` + #2348 and then with this commit added: | | main + #2348 | + this | |---|---|---| | translated / refused | 25,669 / 220 | **25,670 / 219** | | programs whose output changes | | **1** (`5dc3b25986622949`, refused before) | | refused on "a whole-wave section step the simulation does not follow" | 5 | **0** | Every other program's output is byte-identical: the `s_mov_b32` change gives nothing else a new shape. The new program's DXIL converts with dxil-spirv (master). The other four (`6f225b641c5b0708`, `6871d6e4b3ac9a10`, `926c46bab3b86bd6`, `a10179ab7eda0dc3`) get past the section and stop later at `a lane-mask join of an untracked mask`, a separate class. Windows test binary under Proton on the RX 9070 XT: 306 passed and 2 failed. The 2 failures (`hosts_that_do_not_fuse_are_named`, `stub_pipeline_is_created`) fail on main in the same environment too. `cargo clippy -p victory-shader -- -D warnings` is clean, `cargo xtask policy` is ok, and `lower.rs` is 523,410 bytes. Not run: the differential tests (no console compiler here) and NVIDIA. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kotekompotek commented 2026-11-26 02:26:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T02:26:34Z.

Review: COMMENTED


Verified: correct LLVM bitcode encodings (FpTrunc=7, TYPE_DOUBLE record 4, FeatureFlag doubles=0x1), inline-constant table matches GCN's f64 set including 1/(2pi), literal sources read as high-word-only per RDNA rules, and only MODE's default round-to-nearest is accepted (directed modes refused rather than mis-rounded). Sum64 is right too: masked lanes contribute +0.0 and one waveActiveOp.f64 serves both dwords via the per-block cache.

<!-- greyfinch-sync:Marvisak/VIctory:review:6067745732 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#pullrequestreview-6067745732). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-26T02:26:34Z. **Review:** COMMENTED --- Verified: correct LLVM bitcode encodings (FpTrunc=7, TYPE_DOUBLE record 4, FeatureFlag doubles=0x1), inline-constant table matches GCN's f64 set including 1/(2pi), literal sources read as high-word-only per RDNA rules, and only MODE's default round-to-nearest is accepted (directed modes refused rather than mis-rounded). Sum64 is right too: masked lanes contribute +0.0 and one waveActiveOp.f64 serves both dwords via the per-block cache.
fuzeofficlal commented 2026-11-26 02:26:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T02:26:49Z.

Review: COMMENTED


Reviewed and tested against main (63bcca43) on Windows 11 (RTX 5090 + WARP + dxil.dll, VICTORY_D3D12_DEBUG=1). There is a blocking test failure on WARP plus a source-modifier bug in v_cvt_f32_f64:

  1. Blocking WARP / CI failure (emit::valu_tests::a_whole_wave_binary64_sum_reaches_the_host):

    • The new test passes dxil.dll and RTX 5090, but fails on WARP at valu_tests.rs:209 with E_INVALIDARG (0x80070057).
    • D3D12 Debug Layer ID3D12InfoQueue reports:
      ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4.
    • WARP supports dx.op.waveActiveOp.f64 itself, so the refusal comes from whole-wave sections emitting WaveSize=32 (lower.rs:608) while valu_tests::run_cases panics unconditionally on WARP (unlike synthetic_tests.rs:345-349, which skips WaveSize=32 pipelines on WARP).
  2. Silent source-modifier drop in v_cvt_f32_f64 (crates/victory-shader/src/emit/lower.rs:6405-6427):

    • The Operand::Const(240..=248) and Operand::Literal(_) arms bypass self.src64(...) and do not check v.abs, v.neg, v.sdwa, or v.dpp. A VOP3-encoded v_cvt_f32_f64_e64 v0, -1.0 (inline constant with neg/abs) silently drops the modifier instead of applying or rejecting it.
  3. Two non-blocking notes:

    • a_whole_wave_binary64_sum_reaches_the_host currently runs threads: [1, 1, 1] (1 active lane); testing multi-lane reduction with inactive lanes (+0.0) and NaN/Inf/-0.0 would exercise WaveActiveSum much more thoroughly.
    • On 63bcca43, emit/lower.rs grows to 523,410 B (only 878 B below the 512 KiB xtask policy limit — merging alongside #2977 or #2104 will exceed 524,288 B).
<!-- greyfinch-sync:Marvisak/VIctory:review:6067747365 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#pullrequestreview-6067747365). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T02:26:49Z. **Review:** COMMENTED --- Reviewed and tested against `main` (`63bcca43`) on Windows 11 (RTX 5090 + WARP + `dxil.dll`, `VICTORY_D3D12_DEBUG=1`). There is a **blocking test failure on WARP** plus a source-modifier bug in `v_cvt_f32_f64`: 1. **Blocking WARP / CI failure (`emit::valu_tests::a_whole_wave_binary64_sum_reaches_the_host`)**: - The new test passes `dxil.dll` and RTX 5090, but **fails on WARP** at `valu_tests.rs:209` with `E_INVALIDARG` (`0x80070057`). - D3D12 Debug Layer `ID3D12InfoQueue` reports: `ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4.` - WARP supports `dx.op.waveActiveOp.f64` itself, so the refusal comes from whole-wave sections emitting `WaveSize=32` (`lower.rs:608`) while `valu_tests::run_cases` panics unconditionally on WARP (unlike `synthetic_tests.rs:345-349`, which skips `WaveSize=32` pipelines on WARP). 2. **Silent source-modifier drop in `v_cvt_f32_f64` (`crates/victory-shader/src/emit/lower.rs:6405-6427`)**: - The `Operand::Const(240..=248)` and `Operand::Literal(_)` arms bypass `self.src64(...)` and do not check `v.abs`, `v.neg`, `v.sdwa`, or `v.dpp`. A VOP3-encoded `v_cvt_f32_f64_e64 v0, -1.0` (inline constant with `neg`/`abs`) silently drops the modifier instead of applying or rejecting it. 3. **Two non-blocking notes**: - `a_whole_wave_binary64_sum_reaches_the_host` currently runs `threads: [1, 1, 1]` (1 active lane); testing multi-lane reduction with inactive lanes (`+0.0`) and `NaN`/`Inf`/`-0.0` would exercise `WaveActiveSum` much more thoroughly. - On `63bcca43`, `emit/lower.rs` grows to **523,410 B** (only **878 B** below the 512 KiB `xtask policy` limit — merging alongside #2977 or #2104 will exceed `524,288 B`).
oni-swr commented 2026-11-26 03:05:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-26T02:21:33Z.


AI disclosure: tested and written by Claude Code (Claude Opus 5.5), coordinated by Codex, for the claim in #1633. Synthetic programs and data only, no game files.

Independent Windows WARP check of head 7de694fe56020fc3d32f3ef945a829485455b5b3. The control was its exact stack parent 9ead47e28fddc16979529f55588e71b2ef362eec (main 63bcca4 + the three #2348 commits, as stacked here).

Result: the simulator and lowering part holds up. The GPU test a_whole_wave_binary64_sum_reaches_the_host fails on WARP, both here and in this PR's CI at this same head.

Environment

  • Windows 11 Pro 10.0.26200, rustc/cargo 1.98.1, cargo test -p victory-shader --locked -j 4, --test-threads=1 --nocapture
  • VICTORY_WARP=1, VICTORY_D3D12_WARP=1, VICTORY_DXIL = Windows SDK 10.0.26100.0 x64\dxil.dll (1.8.2502.11)
  • WARP: d3d10warp.dll / D3D12Core.dll 10.0.26100.9818. Both test labels ("hardware" and "warp") resolved to Microsoft Basic Render Driver (vendor 0x1414, device 0x008c, software flag set, WaveLaneCountMin..Max = 4..4). I printed this from inside the test process.
  • The physical GPU wasn't used. In every pass, sampling the test process's modules showed d3d10warp.dll and the SDK dxil.dll loaded, and no vendor user-mode driver.

Why the GPU test fails

hardware: compute_pipeline failed: The parameter is incorrect.

With the D3D12 debug layer on, WARP gives the reason:

ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4.

The lowered section asks for WaveSize(32), and this WARP only offers 4-lane waves. CI run 45739979316 at this head fails on the same test with the same message. run_cases panics when compute_pipeline fails. synthetic_tests instead skips a WARP pipeline with a fixed wave size ("no pipeline for a wave of 32; skipped"). So nothing in this environment checks the end-to-end binary64 result. I make no claim either way about whether the value is correct on the host.

Focused (PR tests plus my synthetic cases)

parent 9ead47e head 7de694f
wave::tests::a_binary64_sum_is_followed_through_its_dwords absent ok
wave::tests::a_binary64_sum_counting_a_lane_twice_is_not_a_sum absent ok
valu_tests::a_whole_wave_binary64_sum_reaches_the_host absent FAILED (WaveSize 32 refused by WARP)
synthetic sections lower and pass dxil.dll validation (3 forms) refused: a whole-wave section step the simulation does not follow ok (full EXEC, v_cmpx guard, s_and_saveexec branch)
same 3 forms run over 128 lanes (4 waves of 32) refused at lowering not runnable: pipeline refused as above

My synthetic cases use the same wave32 expansion as the PR's test: s_or_saveexec_b32 -1, v_cndmask per dword, four DPP steps, v_permlanex16, v_add_f64, v_readlane lane 31, then s_mov_b32 copies. The section is wrapped three ways: full EXEC, a straight-line v_cmpx_ne_u32 guard, and a v_cmp + s_and_saveexec_b32 + s_cbranch_execz branch. Inputs are dyadic, so every partial sum is exact in any order: 1 + l·2⁻³² (low dword varies), 2^l (high dword varies), mixed-sign multiples of 0.25, and negative values plus a −0.0. All three forms lower at the head and pass dxil.dll validation. The parent refuses them all with the message this PR addresses. These cases were local only and aren't pushed.

Matched suite (victory-shader lib, same environment)

  • Parent 9ead47e: 301 passed, 4 failed, 3 ignored (not counting my local tests).
  • Head 7de694f: 303 passed, 5 failed, 3 ignored. The two extra passes are the PR's two simulator tests. The extra failure is a_whole_wave_binary64_sum_reaches_the_host.
  • The same 4 failures appear at both commits and at main 63bcca4: synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}. They come from VICTORY_WARP=1 sending the "hardware" label to WARP, so they're environmental and not from this stack or this PR.
  • Skips: 44 skip messages at every commit, mostly 32-lane hardware cross-lane tests and console-compiler differential tests. None of them is counted above.

Limitations

  • No wave64 form: the semantics harness is wave32.
  • No physical GPU, so no host result for the sum. The only GPU-side evidence here is the pipeline refusal.
  • Rounding order: the PR notes that inputs which aren't exact may round differently on the host. I didn't test that, since all my inputs are exact by design.

Suggestion: skip on WARP the way synthetic_tests does (or require a 32-lane adapter in a_whole_wave_binary64_sum_reaches_the_host). That would let Windows CI pass, but WARP still wouldn't check the result.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180728098 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7180728098). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-26T02:21:33Z. --- > **AI disclosure:** tested and written by Claude Code (Claude Opus 5.5), coordinated by Codex, for the claim in #1633. Synthetic programs and data only, no game files. Independent Windows WARP check of head `7de694fe56020fc3d32f3ef945a829485455b5b3`. The control was its exact stack parent `9ead47e28fddc16979529f55588e71b2ef362eec` (main `63bcca4` + the three #2348 commits, as stacked here). **Result: the simulator and lowering part holds up. The GPU test `a_whole_wave_binary64_sum_reaches_the_host` fails on WARP, both here and in this PR's CI at this same head.** ### Environment - Windows 11 Pro 10.0.26200, rustc/cargo 1.98.1, `cargo test -p victory-shader --locked -j 4`, `--test-threads=1 --nocapture` - `VICTORY_WARP=1`, `VICTORY_D3D12_WARP=1`, `VICTORY_DXIL` = Windows SDK 10.0.26100.0 `x64\dxil.dll` (1.8.2502.11) - WARP: `d3d10warp.dll` / `D3D12Core.dll` 10.0.26100.9818. Both test labels ("hardware" and "warp") resolved to *Microsoft Basic Render Driver* (vendor 0x1414, device 0x008c, software flag set, `WaveLaneCountMin..Max = 4..4`). I printed this from inside the test process. - The physical GPU wasn't used. In every pass, sampling the test process's modules showed `d3d10warp.dll` and the SDK `dxil.dll` loaded, and no vendor user-mode driver. ### Why the GPU test fails ``` hardware: compute_pipeline failed: The parameter is incorrect. ``` With the D3D12 debug layer on, WARP gives the reason: ``` ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4. ``` The lowered section asks for `WaveSize(32)`, and this WARP only offers 4-lane waves. CI run 45739979316 at this head fails on the same test with the same message. `run_cases` panics when `compute_pipeline` fails. `synthetic_tests` instead skips a WARP pipeline with a fixed wave size ("no pipeline for a wave of 32; skipped"). So nothing in this environment checks the end-to-end binary64 result. I make no claim either way about whether the value is correct on the host. ### Focused (PR tests plus my synthetic cases) | | parent `9ead47e` | head `7de694f` | |---|---|---| | `wave::tests::a_binary64_sum_is_followed_through_its_dwords` | absent | ok | | `wave::tests::a_binary64_sum_counting_a_lane_twice_is_not_a_sum` | absent | ok | | `valu_tests::a_whole_wave_binary64_sum_reaches_the_host` | absent | **FAILED** (WaveSize 32 refused by WARP) | | synthetic sections lower and pass `dxil.dll` validation (3 forms) | **refused**: `a whole-wave section step the simulation does not follow` | **ok** (full EXEC, `v_cmpx` guard, `s_and_saveexec` branch) | | same 3 forms run over 128 lanes (4 waves of 32) | refused at lowering | not runnable: pipeline refused as above | My synthetic cases use the same wave32 expansion as the PR's test: `s_or_saveexec_b32 -1`, `v_cndmask` per dword, four DPP steps, `v_permlanex16`, `v_add_f64`, `v_readlane` lane 31, then `s_mov_b32` copies. The section is wrapped three ways: full EXEC, a straight-line `v_cmpx_ne_u32` guard, and a `v_cmp` + `s_and_saveexec_b32` + `s_cbranch_execz` branch. Inputs are dyadic, so every partial sum is exact in any order: 1 + l·2⁻³² (low dword varies), 2^l (high dword varies), mixed-sign multiples of 0.25, and negative values plus a −0.0. All three forms lower at the head and pass `dxil.dll` validation. The parent refuses them all with the message this PR addresses. These cases were local only and aren't pushed. ### Matched suite (`victory-shader` lib, same environment) - Parent `9ead47e`: 301 passed, 4 failed, 3 ignored (not counting my local tests). - Head `7de694f`: 303 passed, 5 failed, 3 ignored. The two extra passes are the PR's two simulator tests. The extra failure is `a_whole_wave_binary64_sum_reaches_the_host`. - The same 4 failures appear at both commits and at main `63bcca4`: `synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}`. They come from `VICTORY_WARP=1` sending the "hardware" label to WARP, so they're environmental and not from this stack or this PR. - Skips: 44 skip messages at every commit, mostly 32-lane hardware cross-lane tests and console-compiler differential tests. None of them is counted above. ### Limitations - No wave64 form: the semantics harness is wave32. - No physical GPU, so no host result for the sum. The only GPU-side evidence here is the pipeline refusal. - Rounding order: the PR notes that inputs which aren't exact may round differently on the host. I didn't test that, since all my inputs are exact by design. Suggestion: skip on WARP the way `synthetic_tests` does (or require a 32-lane adapter in `a_whole_wave_binary64_sum_reaches_the_host`). That would let Windows CI pass, but WARP still wouldn't check the result.
Anzymanz commented 2026-11-26 03:05:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-26T02:32:20Z.


Thanks both, and thanks for chasing the WARP message down. ab08acb:

  • WARP. The section declares the console's wave of 32, so on WARP's 4-lane waves the pipeline is refused. The test now goes through run_cases_wave32, which skips WARP when it refuses the pipeline, as synthetic_tests does. Any other failure still panics, and run_cases behaves as before for every other test.
  • More than one lane (@fuzeofficlal's note). New a_whole_wave_binary64_sum_counts_the_active_lanes_only runs the section over a wave of 32 with only the lanes below s2 active (v_cmp_gt_u32 + s_and_saveexec before it). Lane l adds 2^l, so the sum is 2^n − 1 in any order, and the 32 − n inactive lanes' +0.0 must not count. Cases n = 1, 5, 17, 31, 32; with n = 32 the f32 result rounds, which is checked as well. Both GPU tests pass on an RX 9070 XT (RADV via vkd3d-proton). I haven't added NaN/Inf/−0.0 cases. Those don't depend on the order, but a NaN payload's propagation through the host's sum isn't something the console fixes either, so I'd rather not assert it.
  • v_cvt_f32_f64 source modifiers. That code is #2348's (the commits this PR is stacked on), so I'll point its author at your finding there instead of changing it under their PR.
  • lower.rs size. Yes, 878 B of room on main. This PR only adds the Shape::Sum64 arm and a cache field there; the lowering is in emit/lower/sum64.rs. If something else lands first and it no longer fits, I'll move more out.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180895672 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7180895672). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-26T02:32:20Z. --- Thanks both, and thanks for chasing the WARP message down. ab08acb: - **WARP.** The section declares the console's wave of 32, so on WARP's 4-lane waves the pipeline is refused. The test now goes through `run_cases_wave32`, which skips WARP when it refuses the pipeline, as `synthetic_tests` does. Any other failure still panics, and `run_cases` behaves as before for every other test. - **More than one lane** (@fuzeofficlal's note). New `a_whole_wave_binary64_sum_counts_the_active_lanes_only` runs the section over a wave of 32 with only the lanes below `s2` active (`v_cmp_gt_u32` + `s_and_saveexec` before it). Lane `l` adds 2^l, so the sum is 2^n − 1 in any order, and the 32 − n inactive lanes' +0.0 must not count. Cases n = 1, 5, 17, 31, 32; with n = 32 the f32 result rounds, which is checked as well. Both GPU tests pass on an RX 9070 XT (RADV via vkd3d-proton). I haven't added NaN/Inf/−0.0 cases. Those don't depend on the order, but a NaN payload's propagation through the host's sum isn't something the console fixes either, so I'd rather not assert it. - **`v_cvt_f32_f64` source modifiers.** That code is #2348's (the commits this PR is stacked on), so I'll point its author at your finding there instead of changing it under their PR. - **lower.rs size.** Yes, 878 B of room on main. This PR only adds the `Shape::Sum64` arm and a cache field there; the lowering is in `emit/lower/sum64.rs`. If something else lands first and it no longer fits, I'll move more out. AI-assisted (Claude Code).
zed6000 commented 2026-11-26 03:05:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zed6000 on 2026-11-26T02:33:20Z.


Measured offline on the title's shaders (the method in #1247), head 7de694f on main 63bcca4 (a clean merge), RX 7900 XTX:

Build vs main the 5 v_cvt_f32_f64 programs
#2978 +1, 0 lost 1 validates, 4 stop at emit: a lane-mask join of an untracked mask
#2978 + #385 + #1065 +766, 0 lost (25,616 validate) all 5 validate

So this does what you said: with #385 and #1065 on top, all five programs translate and validate. I didn't measure #2978 + #385 without #1065. On #385 alone, the 13 join programs it unblocks on main then hit the validator's stage error that #1065 fixes, so the four likely need it too. The other 761 of the +766 are #385 + #1065's own (+761 together on 63bcca4).

Two things for the merge order:

  • #2978 and #385 conflict. Both are "keep both": mod sum64; / mod phi; in lower.rs, and the new tests at the same spot at the end of valu_tests.rs, where your binary64 test needs its closing } before #385's helpers. #1065 then merges cleanly on top.
  • a_whole_wave_binary64_sum_reaches_the_host fails on the built-in WARP here. The hardware leg passes, then run_cases panics with warp: compute_pipeline failed: The parameter is incorrect. (Windows 11, built-in d3d10warp.dll 10.0.26100.9818, which reports waves 4..4). Every other test passes: 307/1 on #2978 alone and 326/1 on the stack, and that's the only failure. The hardware runs it, so this looks like a WARP limit (perhaps 64-bit wave ops) that the test should skip, rather than a lowering bug. I haven't checked which feature WARP is missing.

Offline counts and unit tests only; no program names or data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180910643 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7180910643). Originally posted by [zed6000](https://github.com/zed6000) on 2026-11-26T02:33:20Z. --- Measured offline on the title's shaders (the method in #1247), head `7de694f` on `main` `63bcca4` (a clean merge), RX 7900 XTX: | Build | vs `main` | the 5 `v_cvt_f32_f64` programs | |---|---|---| | #2978 | **+1, 0 lost** | 1 validates, 4 stop at `emit: a lane-mask join of an untracked mask` | | #2978 + #385 + #1065 | **+766, 0 lost** (25,616 validate) | **all 5 validate** | So this does what you said: with #385 and #1065 on top, all five programs translate and validate. I didn't measure #2978 + #385 without #1065. On #385 alone, the 13 join programs it unblocks on `main` then hit the validator's stage error that #1065 fixes, so the four likely need it too. The other 761 of the +766 are #385 + #1065's own (+761 together on `63bcca4`). Two things for the merge order: - **#2978 and #385 conflict.** Both are "keep both": `mod sum64;` / `mod phi;` in `lower.rs`, and the new tests at the same spot at the end of `valu_tests.rs`, where your binary64 test needs its closing `}` before #385's helpers. #1065 then merges cleanly on top. - **`a_whole_wave_binary64_sum_reaches_the_host` fails on the built-in WARP here.** The hardware leg passes, then `run_cases` panics with `warp: compute_pipeline failed: The parameter is incorrect.` (Windows 11, built-in `d3d10warp.dll` 10.0.26100.9818, which reports waves 4..4). Every other test passes: 307/1 on #2978 alone and 326/1 on the stack, and that's the only failure. The hardware runs it, so this looks like a WARP limit (perhaps 64-bit wave ops) that the test should skip, rather than a lowering bug. I haven't checked which feature WARP is missing. Offline counts and unit tests only; no program names or data.
zed6000 commented 2026-11-26 03:05:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by zed6000 on 2026-11-26T02:35:52Z.


Crossed with your ab08acb. On it, the 4 binary64 tests pass on the RX 7900 XTX hardware, and the built-in WARP (10.0.26100.9818) is skipped as intended ("no pipeline for a wave of 32"). So the WARP point in my note is handled. The census numbers above don't change, since ab08acb only touches tests.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180948826 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7180948826). Originally posted by [zed6000](https://github.com/zed6000) on 2026-11-26T02:35:52Z. --- Crossed with your `ab08acb`. On it, the 4 binary64 tests pass on the RX 7900 XTX hardware, and the built-in WARP (10.0.26100.9818) is skipped as intended ("no pipeline for a wave of 32"). So the WARP point in my note is handled. The census numbers above don't change, since `ab08acb` only touches tests.
steven-seagull27 commented 2026-11-26 04:06:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-26T04:05:27Z.


Both result dwords at ab08acb matched an exact integer reference on an RTX 5080 and app-local WARP 1.0.22. The sparse mask 0x80010041 (lanes 0, 6, 16, 31) gave 0x40100000_00000d60 for one input. Converting that result to f32 gives exactly 4.0, so a zeroed low dword would pass the existing check.

I ran 36 wave32 dispatches per adapter with positive and negative inputs and nine masks, including empty, full, alternating and lane 31 alone. Each active lane contributed ±(1 + (seed + 256 × lane) × 2⁻⁵²). The inputs are multiples of 32 units of 2⁻⁵², so every intermediate sum is exactly representable. Each dispatch read back two pairs per lane. The first pair kept both sentinel words in masked-off lanes; after restoring EXEC, all 32 lanes copied out the expected scalar pair. The empty mask gave +0. All 1,152 lane rows matched on each adapter.

Adapter Reported wave range Wave32 result
NVIDIA GeForce RTX 5080 32–32 Passed
App-local Microsoft WARP 1.0.22.0.20261027.1 4–128 Passed
Windows inbox WARP 10.0.26100.10068 4–4 Skipped before dispatch

I verified the loaded WARP DLL paths and validated the shader with Windows SDK dxil.dll (1.9.2602.17). These finite, exact cases leave the existing caveats about floating-point reassociation and NaN payload selection open. Test-only cherry-pick on this head

<!-- greyfinch-sync:Marvisak/VIctory:comment:7182284889 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7182284889). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-26T04:05:27Z. --- Both result dwords at `ab08acb` matched an exact integer reference on an RTX 5080 and app-local WARP 1.0.22. The sparse mask `0x80010041` (lanes 0, 6, 16, 31) gave `0x40100000_00000d60` for one input. Converting that result to f32 gives exactly 4.0, so a zeroed low dword would pass the existing check. I ran 36 wave32 dispatches per adapter with positive and negative inputs and nine masks, including empty, full, alternating and lane 31 alone. Each active lane contributed ±(1 + (seed + 256 × lane) × 2⁻⁵²). The inputs are multiples of 32 units of 2⁻⁵², so every intermediate sum is exactly representable. Each dispatch read back two pairs per lane. The first pair kept both sentinel words in masked-off lanes; after restoring EXEC, all 32 lanes copied out the expected scalar pair. The empty mask gave +0. All 1,152 lane rows matched on each adapter. | Adapter | Reported wave range | Wave32 result | |---|---:|---| | NVIDIA GeForce RTX 5080 | 32–32 | Passed | | App-local Microsoft WARP `1.0.22.0.20261027.1` | 4–128 | Passed | | Windows inbox WARP `10.0.26100.10068` | 4–4 | Skipped before dispatch | I verified the loaded WARP DLL paths and validated the shader with Windows SDK `dxil.dll` (`1.9.2602.17`). These finite, exact cases leave the existing caveats about floating-point reassociation and NaN payload selection open. [Test-only cherry-pick on this head](https://github.com/steven-seagull27/VIctory/commit/dfc6be3b776cb549c0f39701b18db57198b6571d)
Marvisak commented 2026-11-26 06:03:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T05:36:45Z.


Automated triage for the maintainers.

Needs work. The core of the change reads well: Sym::Red64 in emit/wave.rs follows a binary64 wave sum through the console compiler's dword-pair expansion, and emit/lower/sum64.rs lowers Shape::Sum64 to one waveActiveOp.f64 (sum) over mask ? double(lo, hi) : 0.0, cached per block so both dwords share it. The FLOAT64 flag (bit 2) and the 0x1 feature bit match DXIL's double-precision flags, and the ordering difference is marked as a // shortcut:. Independent runs in the thread check both result dwords on an RTX 5080 and app-local WARP.

What is in the way:

  • CI is failing on ab08acb. Please get the check job green, or say what fails if it is outside this PR.
  • It carries #2348's three commits (v_cvt_f32_f64). Those should be reviewed and land in #2348 first, then this PR rebased to its own commit. One point there: in the v_cvt_f32_f64 arm of lower.rs the literal and inline-constant paths skip src64's modifier check, so abs/neg on those forms are silently ignored; they should be applied or refused.
  • A commenter reports conflicts with #385 (mod sum64; next to mod phi;, and tests at the end of valu_tests.rs); whichever lands second will need a rebase.

CI: failing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7183644421 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7183644421). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T05:36:45Z. --- <!-- victory-triage v1 head=ab08acb8636d78550117b83ce0a8c34c98ed86bc verdict=needs-work at=2026-11-26T05:36:32Z --> Automated triage for the maintainers. **Needs work.** The core of the change reads well: `Sym::Red64` in `emit/wave.rs` follows a binary64 wave sum through the console compiler's dword-pair expansion, and `emit/lower/sum64.rs` lowers `Shape::Sum64` to one `waveActiveOp.f64` (sum) over `mask ? double(lo, hi) : 0.0`, cached per block so both dwords share it. The `FLOAT64` flag (bit 2) and the `0x1` feature bit match DXIL's double-precision flags, and the ordering difference is marked as a `// shortcut:`. Independent runs in the thread check both result dwords on an RTX 5080 and app-local WARP. What is in the way: - **CI is failing** on `ab08acb`. Please get the `check` job green, or say what fails if it is outside this PR. - **It carries #2348's three commits** (`v_cvt_f32_f64`). Those should be reviewed and land in #2348 first, then this PR rebased to its own commit. One point there: in the `v_cvt_f32_f64` arm of `lower.rs` the literal and inline-constant paths skip `src64`'s modifier check, so `abs`/`neg` on those forms are silently ignored; they should be applied or refused. - A commenter reports conflicts with #385 (`mod sum64;` next to `mod phi;`, and tests at the end of `valu_tests.rs`); whichever lands second will need a rebase. CI: failing. --- _Generated by [Claude Code](https://claude.ai/code)_
Venom2054 commented 2026-11-26 16:18:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Venom2054 on 2026-11-26T16:18:46Z.


Follow-up on the rounding and guest Wave64 cases discussed above. On an RTX 5070 Ti we tested a separate implementation built on #439 (e2d3cfd) and the FP64 conversion from #416. It recognizes the guest addition tree and preserves operand order across two physical Wave32 waves, including when one half leaves a masked loop first.

  • A synthetic GPU readback matched an independent CPU implementation for all 122,688 output words. Cases included only the upper half active, only the lower half active and lane 63 alone. All 45,952 guest shared-memory sentinel words were preserved.
  • In that local stack, 5dc3b25986622949 and 6f225b641c5b0708 both produced SDK-validated Wave32 DXIL and D3D12 compute pipelines. In a matched title capture the control dropped both targeted commands. The candidate recorded two indirect dispatch commands for each shader. The capture did not include the indirect group counts or a visible water surface.

This was a separate implementation on a different base from ab08acb. Would the synthetic masked-loop regression or the ordered lowering be useful as a follow-up here?

Implementation and testing were assisted by Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7197475219 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7197475219). Originally posted by [Venom2054](https://github.com/Venom2054) on 2026-11-26T16:18:46Z. --- Follow-up on the rounding and guest Wave64 cases discussed above. On an RTX 5070 Ti we tested a separate implementation built on #439 (`e2d3cfd`) and the FP64 conversion from #416. It recognizes the guest addition tree and preserves operand order across two physical Wave32 waves, including when one half leaves a masked loop first. - A synthetic GPU readback matched an independent CPU implementation for all 122,688 output words. Cases included only the upper half active, only the lower half active and lane 63 alone. All 45,952 guest shared-memory sentinel words were preserved. - In that local stack, `5dc3b25986622949` and `6f225b641c5b0708` both produced SDK-validated Wave32 DXIL and D3D12 compute pipelines. In a matched title capture the control dropped both targeted commands. The candidate recorded two indirect dispatch commands for each shader. The capture did not include the indirect group counts or a visible water surface. This was a separate implementation on a different base from `ab08acb`. Would the synthetic masked-loop regression or the ordered lowering be useful as a follow-up here? Implementation and testing were assisted by Codex.
Anzymanz commented 2026-11-27 01:27:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-27T01:27:59Z.


CI. The check failure is the two binary64 wave tests on the runner: it has no hardware adapter, and its inbox WARP runs 4-lane waves only. Both tests skipped every device and then hit run_cases_on's "neither hardware nor WARP SM 6.6 device available" assertion. f923b5d lets the wave-32 helper finish without a device that can run a wave of 32, as synthetic_tests' wave-32 tests already do. run_cases keeps its assertion. It compiles; the new CI run will confirm the rest.

#2348's commits. This PR stays stacked on #2348 until that one lands. Then I'll merge main into this branch, so the diff is this PR's own commits only, without a force-push. The abs/neg point on the literal and inline-constant forms of v_cvt_f32_f64 belongs to #2348. @steven-seagull27's 5b841a2 fixes it there, and it cherry-picks cleanly onto this stack (their note on #2348). If it lands with #2348, the merge brings it here too.

@Venom2054, thank you, yes to both, as follow-ups:

  • The masked-loop regression. One half of a guest wave64 leaving a masked loop first, upper half only, lower half only, lane 63 alone: this PR's tests don't cover those cases, so it would be useful as its own test PR on top.
  • The ordered lowering. This PR's one-op sum is marked as a shortcut because the host may add in a different order from the console's DPP tree. Inexact terms are the only case where that shows. An ordered lowering would close it. Since yours is built on #439 and #416, a separate PR after this one and #2348 seems the clearest way. It could then be compared with this lowering on the same programs (output differences and cost).

Thanks as well to @zed6000 for the census with #385 and #1065, and the keep-both note on the conflict, and to @steven-seagull27 for the exact-reference readback on two adapters.

Written with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7207309924 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7207309924). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-27T01:27:59Z. --- **CI.** The `check` failure is the two binary64 wave tests on the runner: it has no hardware adapter, and its inbox WARP runs 4-lane waves only. Both tests skipped every device and then hit `run_cases_on`'s "neither hardware nor WARP SM 6.6 device available" assertion. f923b5d lets the wave-32 helper finish without a device that can run a wave of 32, as `synthetic_tests`' wave-32 tests already do. `run_cases` keeps its assertion. It compiles; the new CI run will confirm the rest. **#2348's commits.** This PR stays stacked on #2348 until that one lands. Then I'll merge `main` into this branch, so the diff is this PR's own commits only, without a force-push. The `abs`/`neg` point on the literal and inline-constant forms of `v_cvt_f32_f64` belongs to #2348. @steven-seagull27's 5b841a2 fixes it there, and it cherry-picks cleanly onto this stack (their note on #2348). If it lands with #2348, the merge brings it here too. **@Venom2054**, thank you, yes to both, as follow-ups: - **The masked-loop regression.** One half of a guest wave64 leaving a masked loop first, upper half only, lower half only, lane 63 alone: this PR's tests don't cover those cases, so it would be useful as its own test PR on top. - **The ordered lowering.** This PR's one-op sum is marked as a shortcut because the host may add in a different order from the console's DPP tree. Inexact terms are the only case where that shows. An ordered lowering would close it. Since yours is built on #439 and #416, a separate PR after this one and #2348 seems the clearest way. It could then be compared with this lowering on the same programs (output differences and cost). Thanks as well to @zed6000 for the census with #385 and #1065, and the keep-both note on the conflict, and to @steven-seagull27 for the exact-reference readback on two adapters. Written with Claude Code.
andrewpozdnakov7-jpg commented 2026-11-27 13:03:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T13:03:58Z.


The two Wave32 failures in the #3501 report have a test-harness cause on f923b5d. With VICTORY_WARP=1, Host::new(false) already returns WARP, but the pipeline-error skip tests the original Boolean. The first iteration can panic before reaching the second iteration's skip.

Test-only commit e854af8 queries the selected device before creating the pipeline. It skips when Wave32 falls outside the reported range and still surfaces pipeline failures on eligible devices. D3D12 WaveSize spec

On app-local WARP 1.0.22, the logs show lanes 4..128 and both tests dispatch successfully. All 40 VALU tests passed, along with strict shader Clippy and the asset check. The Windows 10 inbox WARP here reports only SM 6.2, so it exits at the existing SM 6.6 check before reaching the new query.

@oni-swr could you rerun filter a_whole_wave_binary64_sum at e854af8 with VICTORY_WARP=1 on the same Windows 11 inbox WARP? The expected log is Wave32 unavailable (lanes 4..4); skipped on both iterations. The separate masked Wave64 readback in #3501 still needs a native Wave64 result.

If taking the patch, please retain Git authorship or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if squashed.

AI-assisted with Codex. Synthetic tests only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7219013789 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7219013789). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T13:03:58Z. --- The two Wave32 failures in [the #3501 report](https://github.com/Marvisak/VIctory/pull/3501#issuecomment-7217253047) have a test-harness cause on `f923b5d`. With `VICTORY_WARP=1`, `Host::new(false)` already returns WARP, but the pipeline-error skip tests the original Boolean. The first iteration can panic before reaching the second iteration's skip. [Test-only commit e854af8](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/e854af8d3899aa1d68d56f1da7bb2ce58633cdac) queries the selected device before creating the pipeline. It skips when Wave32 falls outside the reported range and still surfaces pipeline failures on eligible devices. [D3D12 WaveSize spec](https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_WaveSize.html#runtime-validation) On app-local WARP 1.0.22, the logs show lanes 4..128 and both tests dispatch successfully. All 40 VALU tests passed, along with strict shader Clippy and the asset check. The Windows 10 inbox WARP here reports only SM 6.2, so it exits at the existing SM 6.6 check before reaching the new query. @oni-swr could you rerun filter `a_whole_wave_binary64_sum` at e854af8 with `VICTORY_WARP=1` on the same Windows 11 inbox WARP? The expected log is `Wave32 unavailable (lanes 4..4); skipped` on both iterations. The separate masked Wave64 readback in #3501 still needs a native Wave64 result. If taking the patch, please retain Git authorship or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if squashed. AI-assisted with Codex. Synthetic tests only.
Anzymanz commented 2026-11-27 13:05:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-27T13:05:37Z.


@andrewpozdnakov7-jpg, thank you: asking the device for its wave sizes is the right test, not inferring it from the WARP flag. I've taken e854af8 as it is, with your authorship, as a fast-forward on this branch.

@oni-swr, if you have a moment, the rerun andrewpozdnakov7-jpg describes (a_whole_wave_binary64_sum at e854af8 with VICTORY_WARP=1) would confirm the skip on Windows 11's inbox WARP.

Written with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7219047536 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7219047536). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-27T13:05:37Z. --- @andrewpozdnakov7-jpg, thank you: asking the device for its wave sizes is the right test, not inferring it from the WARP flag. I've taken e854af8 as it is, with your authorship, as a fast-forward on this branch. @oni-swr, if you have a moment, the rerun andrewpozdnakov7-jpg describes (`a_whole_wave_binary64_sum` at e854af8 with `VICTORY_WARP=1`) would confirm the skip on Windows 11's inbox WARP. Written with Claude Code.
pablogonz12 commented 2026-11-27 17:29:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-27T17:29:08Z.


I checked two affected programs offline on an RX 9070 XT with RADV. With #2348 applied to main, both stopped in whole-wave simulation (0/2 pipelines). On this PR head (e854af8d3), one translated, validated, and created a pipeline; the other progressed to an untracked lane-mask join (1/2 pipelines). The PR-head comparison may include base differences. Not tested on NVIDIA hardware.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224458282 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7224458282). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-27T17:29:08Z. --- I checked two affected programs offline on an RX 9070 XT with RADV. With #2348 applied to main, both stopped in whole-wave simulation (0/2 pipelines). On this PR head (`e854af8d3`), one translated, validated, and created a pipeline; the other progressed to an untracked lane-mask join (1/2 pipelines). The PR-head comparison may include base differences. Not tested on NVIDIA hardware.
Anzymanz commented 2026-11-27 17:33:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-27T17:33:43Z.


@pablogonz12, thank you for testing on the same card and driver family we use. It's useful to have an independent check of this.

As I read it, for the first program this PR does what it claims: the whole-wave section after the binary64 sum translates, validates and makes a pipeline where it didn't before. The second program now stops at a different limit, the untracked lane-mask join, which is outside what this change covers. So I'd keep it out of this PR and look at it as a follow-up.

For that, could you post the second program's shader hash and the exact refusal line? As you say, part of the difference may come from the base, so the base commit you used for the PR-head run would help too.

Written with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7224542992 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7224542992). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-27T17:33:43Z. --- @pablogonz12, thank you for testing on the same card and driver family we use. It's useful to have an independent check of this. As I read it, for the first program this PR does what it claims: the whole-wave section after the binary64 sum translates, validates and makes a pipeline where it didn't before. The second program now stops at a different limit, the untracked lane-mask join, which is outside what this change covers. So I'd keep it out of this PR and look at it as a follow-up. For that, could you post the second program's shader hash and the exact refusal line? As you say, part of the difference may come from the base, so the base commit you used for the PR-head run would help too. Written with Claude Code.
kilolimaVI commented 2026-11-29 14:51:28 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-29T14:51:28Z.


Hardware finding on AMD Radeon 780M (RDNA3, driver 32.0.13022.3006) while merging this with #1262, which also lowers v_cvt_f32_f64. With this PR's v_cvt_f32_f64 arm in place, two of #1262's tests fail on the hardware:

  • cvt_f32_f64_applies_e64_source_and_output_modifiers: input 0 and 1 give 0x3fc00002, want 0x40000002 (the e64 output modifier ×2 is dropped); input 2 gives 0x42487eda, want 0xc0400002 (the neg/abs source modifiers are not applied)
  • f64_reads_uniform_pairs_at_odd_dwords: the 64-bit source read from a uniform pair starting at an odd dword is wrong

With #1262's arm instead (and everything else from this PR), all pass. So the conversion here likely needs the VOP3 source and output modifiers and the odd-dword pair handling before it lands on its own.

The rest of this PR works on hardware: both whole-wave binary64 sum tests and the three 64-bit conversion tests pass (the wave32 cases skip on WARP, run here). Combined tree: kilolimaVI/VIctory integration/shader-11 (fa02e0e), main + #3097, #2999, #3617, #3717, #1315, #3716, #2398, #385, #1262, #3401 and this, with v_cvt_f32_f64 taken from #1262: victory-shader lib 361 passed / 0 failed / 3 ignored, victory-gpu (diagnostics) 246 passed, both clippy configurations and the asset policy pass. lower.rs 478,379 bytes.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7257630514 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7257630514). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-29T14:51:28Z. --- Hardware finding on AMD Radeon 780M (RDNA3, driver 32.0.13022.3006) while merging this with #1262, which also lowers `v_cvt_f32_f64`. With this PR's `v_cvt_f32_f64` arm in place, two of #1262's tests fail on the hardware: - `cvt_f32_f64_applies_e64_source_and_output_modifiers`: input 0 and 1 give `0x3fc00002`, want `0x40000002` (the e64 output modifier ×2 is dropped); input 2 gives `0x42487eda`, want `0xc0400002` (the neg/abs source modifiers are not applied) - `f64_reads_uniform_pairs_at_odd_dwords`: the 64-bit source read from a uniform pair starting at an odd dword is wrong With #1262's arm instead (and everything else from this PR), all pass. So the conversion here likely needs the VOP3 source and output modifiers and the odd-dword pair handling before it lands on its own. The rest of this PR works on hardware: both whole-wave binary64 sum tests and the three 64-bit conversion tests pass (the wave32 cases skip on WARP, run here). Combined tree: `kilolimaVI/VIctory` `integration/shader-11` (`fa02e0e`), main + #3097, #2999, #3617, #3717, #1315, #3716, #2398, #385, #1262, #3401 and this, with `v_cvt_f32_f64` taken from #1262: victory-shader lib 361 passed / 0 failed / 3 ignored, victory-gpu (diagnostics) 246 passed, both clippy configurations and the asset policy pass. `lower.rs` 478,379 bytes. AI-assisted (Claude).
Anzymanz commented 2026-11-29 15:15:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-11-29T15:15:17Z.


Thanks for testing this on the 780M, @kilolimaVI. Agreed: #1262's v_cvt_f32_f64 arm, which handles the output modifier, the neg/abs source modifiers and 64-bit uniform pairs at odd dwords, is the right one and should win over ours. Glad the rest of this PR passes on hardware.

Written with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7257942826 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2978#issuecomment-7257942826). Originally posted by [Anzymanz](https://github.com/Anzymanz) on 2026-11-29T15:15:17Z. --- Thanks for testing this on the 780M, @kilolimaVI. Agreed: #1262's `v_cvt_f32_f64` arm, which handles the output modifier, the neg/abs source modifiers and 64-bit uniform pairs at odd dwords, is the right one and should win over ours. Glad the rest of this PR passes on hardware. Written with Claude Code.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2978:upstream-pr/2978'
git switch 'upstream-pr/2978'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2978'
git switch 'upstream-pr/2978'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2978'
git switch 'upstream-pr/2978'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2978'
git switch 'main'
git merge --squash 'upstream-pr/2978'
git switch 'main'
git merge --ff-only 'upstream-pr/2978'
git switch 'main'
git merge 'upstream-pr/2978'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!2976
No description provided.