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

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

@⁠b3IKK on GitHub · 2026-11-24 12:32 UTC · original
b3IKK:recomp/vop3p-mixed-inline-constants → main · +43 −2 · 2 files · 1 commits · open

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.
**@⁠b3IKK** on GitHub · 2026-11-24 12:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145) `b3IKK:recomp/vop3p-mixed-inline-constants` → `main` · +43 −2 · 2 files · 1 commits · open 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.
v_dot2_f32_f16 decoded all three sources with src_f16 = true because
its name ends in _f16, turning f32 inline float constants in SRC2 into
f16 bit patterns (e.g. 1.0 -> 0x00003C00 instead of 0x3F800000).

v_fma_mix_f32 / v_fma_mixlo_f16 / v_fma_mixhi_f16 decoded all three
sources with src_f16 = false even when OP_SEL_HI[i] == 1 marked an
operand as f16, turning f16 inline float constants into f32 patterns
whose low half was 0x0000.

Decode v_dot2_f32_f16 SRC2 as f32 and each v_fma_mix* operand according
to OP_SEL_HI[i], with a GPU test covering both instructions in wave32
and split wave64.

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

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

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.

**@⁠DavidM1911** on GitHub · 2026-11-24 12:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7131875103) 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.
Author
Owner

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

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.

**@⁠bjarngard** on GitHub · 2026-11-24 12:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7131879878) 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.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-24 13:57 UTC · original

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.
**@⁠JoaoPauluu** on GitHub · 2026-11-24 13:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7133585216) 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.
Author
Owner

@⁠regiumlepidi on GitHub · 2026-11-24 23:42 UTC · original

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** on GitHub · 2026-11-24 23:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7147701506) **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.
Author
Owner

@⁠regiumlepidi on GitHub · 2026-11-25 00:00 UTC · original

@⁠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.

**@⁠regiumlepidi** on GitHub · 2026-11-25 00:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7148039959) @⁠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._
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 04:24 UTC · original

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.

**@⁠luckyteagirl** on GitHub · 2026-11-25 04:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7152814493) ### 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.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:46 UTC · original

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.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1145#issuecomment-7153145924) **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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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