Recompiler: decode inline float constants per operand in v_dot2_f32_f16 and v_fma_mix* #1145
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1145
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1145"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@b3IKK on GitHub · 2026-11-24 12:32 UTC · original
b3IKK:recomp/vop3p-mixed-inline-constants→main· +43 −2 · 2 files · 1 commits · openIn
v_dot2_f32_f16,valu_pkdecoded all three sources withsrc_f16 = truebecause the instruction name ends with_f16, turningf32inline float constants in accumulatorSRC2into 16-bit half patterns (1.0→0x00003C00instead of0x3F800000).In
v_fma_mix_f32/v_fma_mixlo_f16/v_fma_mixhi_f16,valudecoded all three sources withsrc_f16 = falseeven whenOP_SEL_HI[i] == 1selectsf16for operandi, turningf16inline float constants intof32patterns whose low 16 bits were0x0000.This decodes
v_dot2_f32_f16SRC2asf32and decodes eachv_fma_mix*operand according toOP_SEL_HI[i].What is in it
crates/xcl/src/gpu/recomp/emit.rs: decodev_dot2_f32_f16SRC2withf16 = false; decode eachv_fma_mix*source withf16 = (OP_SEL_HI[i] == 1).crates/xcl/src/gpu/recomp/tests.rs: add GPU testgpu_vop3p_mixed_precision_inline_float_constantsacross wave32 and split wave64 (verified failing before the fix).Tested
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: 2no 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:
PR:
Not tested
AI use
emit.rs, wrote the fix and GPU test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.@DavidM1911 on GitHub · 2026-11-24 12:45 UTC · original
Independent verification on current
main384f7f7(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_constantscovers per-operand inline float decode inv_dot2_f32_f16/v_fma_mix*on real hardware.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@bjarngard on GitHub · 2026-11-24 12:45 UTC · original
Test report for head
71b8b0e(AMD, native wave64)Tested
XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPEDXCL_REQUIRE_GPU=wave64:gpu_vop3p_mixed_precision_inline_float_constantspassedNot 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 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
x86_64-pc-windows-gnu.71b8b0eas it is (based on47efa2e), 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
AI use
@regiumlepidi on GitHub · 2026-11-24 23:42 UTC · original
RTX 5070 Ti:
71b8b0emerged intomain20cf130passes its test on the default path; it still fails withXCL_DIRECT_DXIL=1Tested
XCL_SAMPLE_*cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture, one run per cell; PR head71b8b0e0f03b708a864beedcb9d9e50ff3b83783merged locally into20cf13022f764208384c610c2ae6a3f4eed201a2, no conflicts (passed / failed / ignored):XCL_DIRECT_DXIL=1main20cf130gpu_vop3p_mixed_precision_inline_float_constantspasses. The 4 failures arefuzz_validate_and_gpu_0to_3, which fail the same way onmainwith this driver (#1905)XCL_DIRECT_DXIL=1: those 4,offline_compute_pipeline_is_reused_by_a_second_process(fails onmaintoo), and the new test:wave32 lane 0 v_dot2_f32_f16 SRC2 inline +1.0f, left1077936128(3.0), right1082130432(4.0)tests.rschange applied tomain20cf130: the new test fails on both paths with the same valuesXCL_DIRECT_DXIL=1the test stops at that first assertion, so itsv_fma_mix*assertions were not reached there (the PR's diff touchesrecomp/emit.rsandrecomp/tests.rs)SKIPPEDlines in the default run, 18 of them no wave64; none names the new testNot tested
gpu_waves()runs wave32 only on this adapter), release build, any retail title, other GPUs or driversAI use
@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 readsv_dot2_f32_f16SRC2 as f16 (dxil/lower_wide.rs) and everyv_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
main62265d3:gpu_vop3p_mixed_precision_inline_float_constantspasses with and withoutXCL_DIRECT_DXIL=1;cargo test --workspace --locked --no-fail-fast -- --test-threads=4gives 983 / 4 / 45 (default) and 982 / 5 / 45 (direct), the failures being the fourfuzz_validate_and_gpu_*of #1905 and, on direct,offline_compute_pipeline_is_reused_by_a_second_process, which fail onmainhere 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 applyon this PR merged intomain8e87fc7)Claude Code with Claude Opus 5.5 wrote the patch, ran the tests and wrote this comment.
@luckyteagirl on GitHub · 2026-11-25 04:24 UTC · original
RX 6800M focused GPU report for PR #1145 at
71b8b0e0f03b708a864beedcb9d9e50ff3b83783Setup: Windows 11 build 26200, AMD Radeon RX 6800M (driver
30.0.13002.13003), Ryzen 9 5980HX, Rust1.99.0MSVC, DXC/DXIL1.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 printedSKIPPEDsubcases. This covers mixed-precision inline float constants inv_dot2_f32_f16andv_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 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.
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_C500for 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.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.