Skip to content

Recompiler: the per-lane form takes f16 converts and products from #1426 - #2182

Open
xpatfussy69x wants to merge 1 commit into
xcl-dev:mainfrom
xpatfussy69x:recompiler/per-lane-f16-rne
Open

xpatfussy69x wants to merge 1 commit into
xcl-dev:mainfrom
xpatfussy69x:recompiler/per-lane-f16-rne

Conversation

@xpatfussy69x

Copy link
Copy Markdown

Removes the DIFFERS_ON_1426 refusal list from the per-lane form (crates/xcl/src/gpu/recomp/lower.rs). It was added in 878afda while #1426's lowering still used legacyF32ToF16 for v_cvt_f16_f32, v_mul_f16 and v_pk_mul_f16; #1742 (18423c3) has since made them round to nearest even, so the list only sent programs that now translate correctly to the fallback.

What is in it

  • one commit (c3015b1): drop the refusal list in crates/xcl/src/gpu/recomp/lower.rs (13 lines removed, nothing added)

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves only), driver 32.0.16.2124; Windows NT 10.0.26300; Rust 1.100.0; debug; DXC 1.9.2609.5
  • head c3015b1 (on main 568e7db), no uncommitted changes
  • cargo test --workspace -- --test-threads=4: 1154 passed, 0 failed, 46 ignored (same counts as main 568e7db on this machine)
  • SKIPPED GPU tests on this adapter: 24 on main → 21 here. The three "wave32, per-lane form: refused (… its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)" cases – f16_programs_on_the_gpu (f16 arithmetic, f16 packed) and f32_programs_on_the_gpu (f32 conversions) – now run and match the HLSL path. The remaining skips are 20 × "no wave64" and 1 × "no heap windows".

Regression run
None: I have no title to run. The per-lane form is only used with XCL_PER_LANE=1 (with XCL_DIRECT_DXIL=1), off by default, so the default runtime path does not reach this code. Could a maintainer run the smoke check or waive it?

main:

PR:

Not tested

  • AMD / native wave64 GPUs (the wave64 halves skip here)
  • any game; XCL_PER_LANE=1 at runtime

AI use

  • Claude (Claude Opus 5.5): found the stale refusal, wrote the change, the scripts that ran the tests on my PC, and this description. I ran the tests and checked the results.

🤖 Generated with Claude Code

…l-dev#1426

DIFFERS_ON_1426 refused v_cvt_f16_f32, v_mul_f16 and v_pk_mul_f16 because
xcl-dev#1426's lowering rounded them toward zero (legacyF32ToF16). 18423c3 (xcl-dev#1742)
made them round to nearest even, so the refusal only sent those programs to
the fallback. f16_programs_on_the_gpu / f32_programs_on_the_gpu now run the
per-lane form for them and match the HLSL path on a 32-lane GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bph9DWs1uop8mppbbvYfu9
@luckyteagirl

Copy link
Copy Markdown

Independent RX 6800M check on exact head c3015b19ad82247000fc0831e8cabd53dae1ee03 (base 568e7db7729c8fa6c8f0f4b32d798faaf11462bb). The detached worktree was clean.

Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M (RDNA2, native wave64), driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. I set XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=wave64, XCL_DIRECT_DXIL=1, and the matching XCL_DXC_DIR.

Commands and results:

  • cargo test --locked -p xcl --lib -j 2 f16_programs_on_the_gpu -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored.
  • cargo test --locked -p xcl --lib -j 2 f32_programs_on_the_gpu -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored.

Neither log contains SKIPPED. The shared test loop executes wave32 and native wave64 when both are supported, so the f16 arithmetic/packed and f32 conversion subcases reached the GPU instead of taking the old per-lane refusal path. The HLSL comparison program in these tests is compiled with -Gis, as the test source specifies; this report should not be read as a default-HLSL backend comparison.

Scope: Focused debug-build tests only. I did not run the full workspace suite, compare with main on this branch, or perform a retail-title smoke run with XCL_PER_LANE=1.

AI use: OpenAI Codex ran the tests, inspected the test's wave-width and HLSL-reference branches, checked the logs and exact revision, and prepared this report.

@Anon64

Anon64 commented Nov 25, 2026

Copy link
Copy Markdown

Regression run for this PR, on a retail title, from scripts/smoke.ps1 as printed. 60 s, release, default settings, A pressed every 4 s from 20 s. RTX 3060 12 GB, Windows 11.

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1454 (PresentX 1454)
presents per 2 s (last 3): 17 1 2
device removals: 0
crashes: 0
peak commit: 25606 MB

this PR:

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1480 (PresentX 1480)
presents per 2 s (last 3): 23 9 5
device removals: 0
crashes: 0
peak commit: 25671 MB

No device removal or crash. Frames are 102 % of main's, and peak commit is 100 % of main's. The run does not show whether the title reaches the per-lane form on 32-lane hardware, so this is a regression check only.

AI use: Claude Code (Claude Opus 5.5) ran both builds and wrote this report.

@siam4201

Copy link
Copy Markdown

Tested on NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2101, Ryzen 9 7900X, Rust 1.97.1):

Tested (.\scripts\test.ps1)

  • main (568e7db): 1094 passed, 4 failed (fuzz_validate_and_gpu_0..3, pre-existing E_OUTOFMEMORY DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905), 26 ignored; skipped: 14 no wave64 + 3 per-lane form: refused (V_CVT_F16_F32, V_PK_MUL_F16, V_MUL_F16)
  • pr-2182 (c3015b1): 1094 passed, 4 failed (same pre-existing fuzz_validate_and_gpu_0..3), 26 ignored; skipped: 14 no wave64 (all 3 f16 per-lane tests now run and pass)

Regression run (.\scripts\smoke.ps1, 30s)

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 30
exit: 0x0
frames shown: 740 (PresentX 740)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15434 MB

pr-2182:

xcl-smoke v1
commit: c3015b19ad82247000fc0831e8cabd53dae1ee03
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 30
exit: 0x0
frames shown: 744 (PresentX 744)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14727 MB

Not tested

  • Not tested on AMD RDNA / wave64 GPUs

AI use

  • Antigravity (Gemini 4 Neon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants