Recompiler: decode inline float constants per operand in v_dot2_f32_f16 and v_fma_mix* #1136

Open
b3IKK wants to merge 1 commit from upstream-pr/1145 into main
b3IKK commented 2026-11-24 12:32:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T12:32:20Z.


In v_dot2_f32_f16, valu_pk decoded all three sources with src_f16 = true because the instruction name ends with _f16, turning f32 inline float constants in accumulator SRC2 into 16-bit half patterns (1.0 → 0x00003C00 instead of 0x3F800000).

In v_fma_mix_f32 / v_fma_mixlo_f16 / v_fma_mixhi_f16, valu decoded all three sources with src_f16 = false even when OP_SEL_HI[i] == 1 selects f16 for operand i, turning f16 inline float constants into f32 patterns whose low 16 bits were 0x0000.

This decodes v_dot2_f32_f16 SRC2 as f32 and decodes each v_fma_mix* operand according to OP_SEL_HI[i].

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs: decode v_dot2_f32_f16 SRC2 with f16 = false; decode each v_fma_mix* source with f16 = (OP_SEL_HI[i] == 1).
  • crates/xcl/src/gpu/recomp/tests.rs: add GPU test gpu_vop3p_mixed_precision_inline_float_constants across wave32 and split wave64 (verified failing before the fix).

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 742 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2 no wave64 — gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)
  • cargo test -p xcl --lib gpu_vop3p_mixed_precision_inline_float_constants: 1 passed, 0 failed across wave32 and split wave64 (failed on the GPU before the fix)

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1226 (PresentX 1226)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15341 MB

PR:

xcl-smoke v1
commit: 71b8b0e0f03b708a864beedcb9d9e50ff3b83783
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1648 (PresentX 1648)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14582 MB

Not tested

  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Gemini 4 Neon: audited emit.rs, wrote the fix and GPU test, ran the test suite and scripts/smoke.ps1 regression runs, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5472209994 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T12:32:20Z. --- In `v_dot2_f32_f16`, `valu_pk` decoded all three sources with `src_f16 = true` because the instruction name ends with `_f16`, turning `f32` inline float constants in accumulator `SRC2` into 16-bit half patterns (`1.0` → `0x00003C00` instead of `0x3F800000`). In `v_fma_mix_f32` / `v_fma_mixlo_f16` / `v_fma_mixhi_f16`, `valu` decoded all three sources with `src_f16 = false` even when `OP_SEL_HI[i] == 1` selects `f16` for operand `i`, turning `f16` inline float constants into `f32` patterns whose low 16 bits were `0x0000`. This decodes `v_dot2_f32_f16` `SRC2` as `f32` and decodes each `v_fma_mix*` operand according to `OP_SEL_HI[i]`. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs`: decode `v_dot2_f32_f16` `SRC2` with `f16 = false`; decode each `v_fma_mix*` source with `f16 = (OP_SEL_HI[i] == 1)`. - `crates/xcl/src/gpu/recomp/tests.rs`: add GPU test `gpu_vop3p_mixed_precision_inline_float_constants` across wave32 and split wave64 (verified failing before the fix). **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 742 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2 `no wave64` — `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`) - `cargo test -p xcl --lib gpu_vop3p_mixed_precision_inline_float_constants`: 1 passed, 0 failed across wave32 and split wave64 (failed on the GPU before the fix) **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1226 (PresentX 1226) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15341 MB ``` PR: ``` xcl-smoke v1 commit: 71b8b0e0f03b708a864beedcb9d9e50ff3b83783 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1648 (PresentX 1648) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14582 MB ``` **Not tested** - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Gemini 4 Neon: audited `emit.rs`, wrote the fix and GPU test, ran the test suite and `scripts/smoke.ps1` regression runs, and drafted this PR description.
DavidM1911 commented 2026-11-24 13:03:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:45:22Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.

  • cargo test -p xcl --lib mixed_precision: 1 passed, 0 failed — gpu_vop3p_mixed_precision_inline_float_constants covers per-operand inline float decode in v_dot2_f32_f16/v_fma_mix* on real hardware.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7131875103 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1145#issuecomment-7131875103). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T12:45:22Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11. - `cargo test -p xcl --lib mixed_precision`: **1 passed, 0 failed** — `gpu_vop3p_mixed_precision_inline_float_constants` covers per-operand inline float decode in `v_dot2_f32_f16`/`v_fma_mix*` on real hardware. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
bjarngard commented 2026-11-24 13:03:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bjarngard on 2026-11-24T12:45:34Z.


Test report for head 71b8b0e (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: 742 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: gpu_vop3p_mixed_precision_inline_float_constants passed

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.

<!-- greyfinch-sync:ivall/xcl:comment:7131879878 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1145#issuecomment-7131879878). Originally posted by [bjarngard](https://github.com/bjarngard) on 2026-11-24T12:45:34Z. --- Test report for head `71b8b0e` (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`: 742 passed, 0 failed, 41 ignored, no SKIPPED - With `XCL_REQUIRE_GPU=wave64`: `gpu_vop3p_mixed_precision_inline_float_constants` passed **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.
JoaoPauluu commented 2026-11-24 14:06:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T13:57:00Z.


A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler.

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 (DXIL → SPIR-V through dxil-spirv), DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 71b8b0e as it is (based on 47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).
  • gpu::recomp::tests::gpu_vop3p_mixed_precision_inline_float_constants: ok, no SKIPPED.

Not tested

  • whether the new test fails without the fix on this stack; the rest of the suite on this head; native Windows; AMD / native wave64.

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.
<!-- greyfinch-sync:ivall/xcl:comment:7133585216 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1145#issuecomment-7133585216). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T13:57:00Z. --- A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler. **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 (DXIL → SPIR-V through dxil-spirv), DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `71b8b0e` as it is (based on `47efa2e`), no uncommitted changes. The lib test binary runs under Wine, one test per process (`--exact`). - `gpu::recomp::tests::gpu_vop3p_mixed_precision_inline_float_constants`: **ok**, no SKIPPED. **Not tested** - whether the new test fails without the fix on this stack; the rest of the suite on this head; native Windows; AMD / native wave64. **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.
regiumlepidi commented 2026-11-25 00:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by regiumlepidi on 2026-11-24T23:42:16Z.


RTX 5070 Ti: 71b8b0e merged into main 20cf130 passes its test on the default path; it still fails with XCL_DIRECT_DXIL=1

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (32-lane waves), driver 617.42; Ryzen 7 9800X3D; Windows 11 Pro 26H2, build 26300.9974; Rust 1.100.0 MSVC; Windows SDK 10.0.26100.0, DXC 1.8.2502.11; debug; no XCL_SAMPLE_*
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture, one run per cell; PR head 71b8b0e0f03b708a864beedcb9d9e50ff3b83783 merged locally into 20cf13022f764208384c610c2ae6a3f4eed201a2, no conflicts (passed / failed / ignored):
tree default XCL_DIRECT_DXIL=1
main 20cf130 972 / 4 / 45 971 / 5 / 45
merge 973 / 4 / 45 971 / 6 / 45
  • Default path: gpu_vop3p_mixed_precision_inline_float_constants passes. The 4 failures are fuzz_validate_and_gpu_0 to _3, which fail the same way on main with this driver (#1905)
  • XCL_DIRECT_DXIL=1: those 4, offline_compute_pipeline_is_reused_by_a_second_process (fails on main too), and the new test: wave32 lane 0 v_dot2_f32_f16 SRC2 inline +1.0f, left 1077936128 (3.0), right 1082130432 (4.0)
  • Negative control, only the PR's tests.rs change applied to main 20cf130: the new test fails on both paths with the same values
  • With XCL_DIRECT_DXIL=1 the test stops at that first assertion, so its v_fma_mix* assertions were not reached there (the PR's diff touches recomp/emit.rs and recomp/tests.rs)
  • 25 SKIPPED lines in the default run, 18 of them no wave64; none names the new test

Not tested

  • the wave64 half of the new test (gpu_waves() runs wave32 only on this adapter), release build, any retail title, other GPUs or drivers

AI use

  • Claude Code with Claude Sonnet 5.5: read the diff, ran the tests and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7147701506 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7147701506). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-24T23:42:16Z. --- **RTX 5070 Ti: `71b8b0e` merged into `main` `20cf130` passes its test on the default path; it still fails with `XCL_DIRECT_DXIL=1`** **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (32-lane waves), driver 617.42; Ryzen 7 9800X3D; Windows 11 Pro 26H2, build 26300.9974; Rust 1.100.0 MSVC; Windows SDK 10.0.26100.0, DXC 1.8.2502.11; debug; no `XCL_SAMPLE_*` - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture`, one run per cell; PR head `71b8b0e0f03b708a864beedcb9d9e50ff3b83783` merged locally into `20cf13022f764208384c610c2ae6a3f4eed201a2`, no conflicts (passed / failed / ignored): | tree | default | `XCL_DIRECT_DXIL=1` | |---|---|---| | `main` `20cf130` | 972 / 4 / 45 | 971 / 5 / 45 | | merge | 973 / 4 / 45 | 971 / 6 / 45 | - Default path: `gpu_vop3p_mixed_precision_inline_float_constants` passes. The 4 failures are `fuzz_validate_and_gpu_0` to `_3`, which fail the same way on `main` with this driver (#1905) - `XCL_DIRECT_DXIL=1`: those 4, `offline_compute_pipeline_is_reused_by_a_second_process` (fails on `main` too), **and the new test**: `wave32 lane 0 v_dot2_f32_f16 SRC2 inline +1.0f`, left `1077936128` (3.0), right `1082130432` (4.0) - Negative control, only the PR's `tests.rs` change applied to `main` `20cf130`: the new test fails on both paths with the same values - With `XCL_DIRECT_DXIL=1` the test stops at that first assertion, so its `v_fma_mix*` assertions were not reached there (the PR's diff touches `recomp/emit.rs` and `recomp/tests.rs`) - 25 `SKIPPED` lines in the default run, 18 of them no wave64; none names the new test **Not tested** - the wave64 half of the new test (`gpu_waves()` runs wave32 only on this adapter), release build, any retail title, other GPUs or drivers **AI use** - Claude Code with Claude Sonnet 5.5: read the diff, ran the tests and wrote this report.
regiumlepidi commented 2026-11-25 00:09:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by regiumlepidi on 2026-11-25T00:00:50Z.


@b3IKK as in my report above, this PR's test still fails with XCL_DIRECT_DXIL=1: the direct translator reads v_dot2_f32_f16 SRC2 as f16 (dxil/lower_wide.rs) and every v_fma_mix* operand as f32 (dxil/lower_valu.rs). The matching change is below, 12 lines.

Measured on an RTX 5070 Ti, driver 617.42, debug, with this PR's commit and the patch on main 62265d3: gpu_vop3p_mixed_precision_inline_float_constants passes with and without XCL_DIRECT_DXIL=1; cargo test --workspace --locked --no-fail-fast -- --test-threads=4 gives 983 / 4 / 45 (default) and 982 / 5 / 45 (direct), the failures being the four fuzz_validate_and_gpu_* of #1905 and, on direct, offline_compute_pipeline_is_reused_by_a_second_process, which fail on main here too. Not tested: wave64, any retail title.

Take it into this PR if you like, or say if you would rather it go in a separate PR stacked on this one.

Patch for the direct translator (applies with git apply on this PR merged into main 8e87fc7)
diff --git a/crates/xcl/src/gpu/dxil/lower_valu.rs b/crates/xcl/src/gpu/dxil/lower_valu.rs
index beafdcd..23d4795 100644
--- a/crates/xcl/src/gpu/dxil/lower_valu.rs
+++ b/crates/xcl/src/gpu/dxil/lower_valu.rs
@@ -497,7 +497,11 @@ impl Lw {
                 let (neg, abs) = (fv("NEG"), fv("NEG_HI"));
                 let mut srcs = Vec::new();
                 for i in 0..3 {
-                    let raw = u.get(i).map(|s| s.w()).unwrap_or(z);
+                    // OP_SEL_HI[i] picks f16 (1) or f32 (0) per operand, inline float constants included
+                    let raw = match ins.get(i) {
+                        Some(o) => self.read(d, o, hi2 >> i & 1 == 1).ok_or_else(|| format!("{}: op", rdna2::format(d)))?,
+                        None => z,
+                    };
                     let mut s = if hi2 >> i & 1 == 1 {
                         let h = if sel >> i & 1 == 1 { self.lshrc(raw, 16) } else { self.andc(raw, 0xFFFF) };
                         self.s.f16_to_f32(h)
diff --git a/crates/xcl/src/gpu/dxil/lower_wide.rs b/crates/xcl/src/gpu/dxil/lower_wide.rs
index 6c40030..0ad0cfd 100644
--- a/crates/xcl/src/gpu/dxil/lower_wide.rs
+++ b/crates/xcl/src/gpu/dxil/lower_wide.rs
@@ -33,7 +33,13 @@ impl Lw {
         let (sel, sel_hi) = if vop3p { (fv("OP_SEL"), fv("OP_SEL_HI") | fv("OP_SEL_HI_2") << 2) } else { (0, 0b111) };
         let (neg, neg_hi) = if vop3p { (fv("NEG"), fv("NEG_HI")) } else { (0, 0) };
         let clamp = vop3p && fv("CLAMP") == 1;
-        let u: Vec<Value> = self.sources(d, &ins, name.ends_with("_f16"))?.into_iter().map(Src::w).collect();
+        let mut u: Vec<Value> = self.sources(d, &ins, name.ends_with("_f16"))?.into_iter().map(Src::w).collect();
+        if name == "v_dot2_f32_f16" {
+            // SRC2 is the f32 accumulator; inline float constants there are binary32, not binary16
+            if let (Some(o), Some(s)) = (ins.get(2), u.get_mut(2)) {
+                *s = self.read(d, o, false).ok_or_else(|| format!("{}: op", rdna2::format(d)))?;
+            }
+        }
         let dst = outs.first().map(|o| Self::dst_of(d, o)).unwrap_or(Dst::Null);
         let z = self.c(0);
         let cur = match &dst {

Claude Code with Claude Opus 5.5 wrote the patch, ran the tests and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7148039959 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7148039959). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-25T00:00:50Z. --- @b3IKK as in my report above, this PR's test still fails with `XCL_DIRECT_DXIL=1`: the direct translator reads `v_dot2_f32_f16` SRC2 as f16 (`dxil/lower_wide.rs`) and every `v_fma_mix*` operand as f32 (`dxil/lower_valu.rs`). The matching change is below, 12 lines. Measured on an RTX 5070 Ti, driver 617.42, debug, with this PR's commit and the patch on `main` `62265d3`: `gpu_vop3p_mixed_precision_inline_float_constants` passes with and without `XCL_DIRECT_DXIL=1`; `cargo test --workspace --locked --no-fail-fast -- --test-threads=4` gives 983 / 4 / 45 (default) and 982 / 5 / 45 (direct), the failures being the four `fuzz_validate_and_gpu_*` of #1905 and, on direct, `offline_compute_pipeline_is_reused_by_a_second_process`, which fail on `main` here too. Not tested: wave64, any retail title. Take it into this PR if you like, or say if you would rather it go in a separate PR stacked on this one. <details><summary>Patch for the direct translator (applies with <code>git apply</code> on this PR merged into <code>main</code> <code>8e87fc7</code>)</summary> ```diff diff --git a/crates/xcl/src/gpu/dxil/lower_valu.rs b/crates/xcl/src/gpu/dxil/lower_valu.rs index beafdcd..23d4795 100644 --- a/crates/xcl/src/gpu/dxil/lower_valu.rs +++ b/crates/xcl/src/gpu/dxil/lower_valu.rs @@ -497,7 +497,11 @@ impl Lw { let (neg, abs) = (fv("NEG"), fv("NEG_HI")); let mut srcs = Vec::new(); for i in 0..3 { - let raw = u.get(i).map(|s| s.w()).unwrap_or(z); + // OP_SEL_HI[i] picks f16 (1) or f32 (0) per operand, inline float constants included + let raw = match ins.get(i) { + Some(o) => self.read(d, o, hi2 >> i & 1 == 1).ok_or_else(|| format!("{}: op", rdna2::format(d)))?, + None => z, + }; let mut s = if hi2 >> i & 1 == 1 { let h = if sel >> i & 1 == 1 { self.lshrc(raw, 16) } else { self.andc(raw, 0xFFFF) }; self.s.f16_to_f32(h) diff --git a/crates/xcl/src/gpu/dxil/lower_wide.rs b/crates/xcl/src/gpu/dxil/lower_wide.rs index 6c40030..0ad0cfd 100644 --- a/crates/xcl/src/gpu/dxil/lower_wide.rs +++ b/crates/xcl/src/gpu/dxil/lower_wide.rs @@ -33,7 +33,13 @@ impl Lw { let (sel, sel_hi) = if vop3p { (fv("OP_SEL"), fv("OP_SEL_HI") | fv("OP_SEL_HI_2") << 2) } else { (0, 0b111) }; let (neg, neg_hi) = if vop3p { (fv("NEG"), fv("NEG_HI")) } else { (0, 0) }; let clamp = vop3p && fv("CLAMP") == 1; - let u: Vec<Value> = self.sources(d, &ins, name.ends_with("_f16"))?.into_iter().map(Src::w).collect(); + let mut u: Vec<Value> = self.sources(d, &ins, name.ends_with("_f16"))?.into_iter().map(Src::w).collect(); + if name == "v_dot2_f32_f16" { + // SRC2 is the f32 accumulator; inline float constants there are binary32, not binary16 + if let (Some(o), Some(s)) = (ins.get(2), u.get_mut(2)) { + *s = self.read(d, o, false).ok_or_else(|| format!("{}: op", rdna2::format(d)))?; + } + } let dst = outs.first().map(|o| Self::dst_of(d, o)).unwrap_or(Dst::Null); let z = self.c(0); let cur = match &dst { ``` </details> _Claude Code with Claude Opus 5.5 wrote the patch, ran the tests and wrote this comment._
luckyteagirl commented 2026-11-25 05:08:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T04:24:28Z.


RX 6800M focused GPU report for PR #1145 at 71b8b0e0f03b708a864beedcb9d9e50ff3b83783

Setup: Windows 11 build 26200, AMD Radeon RX 6800M (driver 30.0.13002.13003), Ryzen 9 5980HX, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. Clean exact-head worktree; XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=1, XCL_DIRECT_DXIL=0.

Tested

  • cargo test --locked -p xcl --lib -j 2 gpu_vop3p_mixed_precision_inline_float_constants -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, no printed SKIPPED subcases. This covers mixed-precision inline float constants in v_dot2_f32_f16 and v_fma_mix* on the AMD GPU.
  • cargo build --locked --workspace -j 2: passed.

Not tested: Full workspace suite, paired retail-title smoke, other GPUs, or the Direct DXIL path. This verifies the focused HLSL regression on the PR head; it does not establish a green full suite or world-load behavior. No game data was used.

AI assistance: OpenAI Codex (GPT-6) ran the commands, extracted the test counts from the log, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7152814493 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7152814493). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T04:24:28Z. --- ### RX 6800M focused GPU report for PR #1145 at `71b8b0e0f03b708a864beedcb9d9e50ff3b83783` **Setup:** Windows 11 build 26200, AMD Radeon RX 6800M (driver `30.0.13002.13003`), Ryzen 9 5980HX, Rust `1.99.0` MSVC, DXC/DXIL `1.9.2609.5`. Clean exact-head worktree; `XCL_ADAPTER=6800M`, `XCL_REQUIRE_GPU=1`, `XCL_DIRECT_DXIL=0`. **Tested** - `cargo test --locked -p xcl --lib -j 2 gpu_vop3p_mixed_precision_inline_float_constants -- --test-threads=1 --show-output`: **1 passed, 0 failed, 0 ignored**, no printed `SKIPPED` subcases. This covers mixed-precision inline float constants in `v_dot2_f32_f16` and `v_fma_mix*` on the AMD GPU. - `cargo build --locked --workspace -j 2`: passed. **Not tested:** Full workspace suite, paired retail-title smoke, other GPUs, or the Direct DXIL path. This verifies the focused HLSL regression on the PR head; it does not establish a green full suite or world-load behavior. No game data was used. AI assistance: OpenAI Codex (GPT-6) ran the commands, extracted the test counts from the log, and drafted this report.
JJAutoCompare commented 2026-11-25 05:08:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:46:05Z.


Tested

Clean detached PR head 71b8b0e0f03b708a864beedcb9d9e50ff3b83783.

Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5. Unoptimized test profile on STOR-WINLAB.

cargo test --locked -p xcl --lib --no-run
# Prebuilt fixture ran with XCL_ADAPTER=A770 and XCL_DIRECT_DXIL=0.
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & 'L:/XclTooling/pr1975-b62e6e3/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_vop3p_mixed_precision_inline_float_constants --exact --nocapture --test-threads=1
}

The build ran outside the mutex and exited 0. The verified HLSL/DXC run recorded 1 passed, 0 failed, 0 ignored, 0 skipped, 719 filtered out in 0.17 s. The fixture and wrapper both exited 0. The first invocation passed the fixture but lost the native exit status, so the same test was repeated with separate process capture.

Native wave32 checked all 160 lane comparisons. Expected outputs were 4.0 and -1.0 for FP32 dot products, 3.5 and 0.0 for mixed FMA, and 0xBEEF_C500 for the packed result, preserving the high half.

Not tested

Native or split wave64, mixed FMA high-half output, direct DXIL, a negative control, other adapters, the workspace suite, and retail smoke.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the checked-in fixture and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7153145924 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7153145924). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:46:05Z. --- **Tested** Clean detached PR head `71b8b0e0f03b708a864beedcb9d9e50ff3b83783`. Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5. Unoptimized test profile on STOR-WINLAB. ```powershell cargo test --locked -p xcl --lib --no-run # Prebuilt fixture ran with XCL_ADAPTER=A770 and XCL_DIRECT_DXIL=0. & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr1975-b62e6e3/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_vop3p_mixed_precision_inline_float_constants --exact --nocapture --test-threads=1 } ``` The build ran outside the mutex and exited 0. The verified HLSL/DXC run recorded **1 passed, 0 failed, 0 ignored, 0 skipped**, 719 filtered out in 0.17 s. The fixture and wrapper both exited 0. The first invocation passed the fixture but lost the native exit status, so the same test was repeated with separate process capture. Native wave32 checked all 160 lane comparisons. Expected outputs were 4.0 and -1.0 for FP32 dot products, 3.5 and 0.0 for mixed FMA, and `0xBEEF_C500` for the packed result, preserving the high half. **Not tested** Native or split wave64, mixed FMA high-half output, direct DXIL, a negative control, other adapters, the workspace suite, and retail smoke. **AI use** T3 Code / Codex (`gpt-6.2-sol`) ran the checked-in fixture and prepared this report.
github-actions[bot] commented 2026-11-28 20:17:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:17:56Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7245183461 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7245183461). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:17:56Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:55:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:55:24Z.


Triage (#1607) – head 71b8b0e

No open or merged PR makes the same change. #128 and #1575 touch v_fma_mix* but not how its operands are decoded. On main, valu_pk still decodes the inline constant in v_dot2_f32_f16's SRC2 as f16, and v_fma_mix* takes all its sources from sources() without regard to each operand's OP_SEL_HI type.
No problems found in the diff. The PR conflicts with main.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301240053 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7301240053). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:55:24Z. --- **Triage (#1607)** – head 71b8b0e No open or merged PR makes the same change. #128 and #1575 touch `v_fma_mix*` but not how its operands are decoded. On main, `valu_pk` still decodes the inline constant in `v_dot2_f32_f16`'s SRC2 as f16, and `v_fma_mix*` takes all its sources from `sources()` without regard to each operand's OP_SEL_HI type. No problems found in the diff. The PR conflicts with main. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/1145:upstream-pr/1145'
git switch 'upstream-pr/1145'

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/1145'
git switch 'upstream-pr/1145'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1145'
git switch 'upstream-pr/1145'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1145'
git switch 'main'
git merge --squash 'upstream-pr/1145'
git switch 'main'
git merge --ff-only 'upstream-pr/1145'
git switch 'main'
git merge 'upstream-pr/1145'
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
xcl-dev/xcl!1136
No description provided.