Repository navigation
Recompiler: honor FP32 denormal mode in FREXP exponent - #1994
Conversation
Derive the exponent from the input bits after an explicit MODE[4] write. Preserve the legacy result before that write and reuse the Direct DXIL MODE state. Assisted-by: Codex (GPT-6.2-Sol)
|
An independent hardware reference for the rule: boykopovar/AnyPS5's debt notes ( Also passes here: RTX 3070 (Ampere, driver 616.56, Windows 11, debug) at One merge-order note: this is the fourth open PR moving AI-assisted (Claude Code). Synthetic tests only. |
|
AMD run with native 64-lane waves, which this PR lists as not tested. Tested: pass, head
Not tested: AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report. |
|
Both AMD and NVIDIA passes look clean on Remaining before merge: please rebase onto |
|
Independent RTX 5070 focused verification of #1994 Commit 7a1f5a2. No tracked source differences after execution. Windows x64, NVIDIA GeForce RTX 5070 driver 591.86, Rust 1.100.0 MSVC debug test build, DXC/DXIL 1.8.2502.11, local D3D12 Agility SDK. XCL_ADAPTER=5070 was explicitly set. Command in each configuration
Logs are gpu-0.log and gpu-all.log in this directory. Earlier retry logs with six skips are environment failures and provide zero GPU coverage. Initial build attempts exited 101 due to transient executable-launch denial, subsequently resolved without security-setting changes. Its cause remains unknown. Not tested in this run: baseline control, full workspace suite, Release build, native RDNA2, wave64, retail game behavior, or runtime fallback instrumentation. These results establish focused synthetic assertion coverage on this adapter. AI assistance: OpenAI Codex prepared the environment, ran the unchanged upstream tests, inspected logs and drafted this report. |
|
Independent Intel Arc A770 verification of Tested
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
cargo test -p xcl --lib gpu_frexp_exp_f32_denorm -- --nocapture --test-threads=1
}
The four backend-selectable cases (denormal modes, partial register writes, control flow, initial mode) passed through HLSL and Direct DXIL. The explicit Direct DXIL per-lane case passed in both runs. The explicit Direct DXIL test Not tested Baseline, cause of the PSO failure, native wave64, other hardware or driver versions, full workspace suite, retail-title smoke, and optional sample data. AI use Codex ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Honor explicitly written guest FP32 input-denormal mode when translating
V_FREXP_EXP_I32_F32. Derive the exponent from the input bits after a write toMODE[4]and preserve the legacy result before that write.Previously, the exponent calculation could return zero for a preserved FP32 subnormal. For example, the smallest positive subnormal (0x00000001) should produce -148 when input denormals are preserved.
What is in it
MODE[4]writes in the HLSL and Direct DXIL recompiler paths. Direct DXIL reuses its existing MODE state and bumps the translation-cache version from 7 to 8.Tested
7a1f5a2and upstream baseline8e87fc7. Windows x64 build 26300.9974, AMD Ryzen 5 7600X, NVIDIA GeForce RTX 4060 (621.24), Rust 1.100.0, DXC 1.9.2602.17.cargo test -p xcl --lib gpu_frexp_exp_f32_denorm -- --nocapture. The FREXP filter passed six tests in each configuration: four backend-selectable tests and two explicit Direct DXIL tests covering directed rounding and per-lane lowering. Zero skips. Loop/SSA and upstream regression filters passed in both configurations. A standalone GPU probe verified the legacy result at loop entry and exponent -148 after the MODE write crossed the back-edge, in all 32 lanes in each backend.cargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4: HLSL (Direct DXIL unset) 996 passed, 0 failed, 45 ignored. WithXCL_DIRECT_DXIL=all: 995 passed, 1 failed, 45 ignored. Each suite logged 24 skip events across 14 tests, including partial skips: 19 wave64 cases, 3 unsupported per-lane cases, 1 driver-cache control case, and 1 heap-window case.offline_compute_pipeline_is_reused_by_a_second_processalso fails on the clean upstream baseline with Direct DXIL and passes there with HLSL. Both Direct DXIL failures occur while looking up a top-level.dxilcache file.cargo build --release -p xclsucceeded on both commits.scripts/smoke.ps1for 60 seconds per run on a newer retail game. Both candidate runs were repeated after the push. HLSL: frames 1,069 to 1,128 (+5.52%), peak committed memory 15,336 to 15,327 (-0.06%) MB. Direct DXIL: frames 1,149 to 1,154 (+0.44%), peak committed memory 15,329 to 15,323 (-0.04%) MB. All four comparison runs exited with0x0, zero crashes and zero device removals. The deltas are single-run observations.Regression run
Each run used a clean profile, an isolated XCL cache, no input and the RTX 4060. Direct DXIL runs used
XCL_DIRECT_DXIL=allandXCL_DIRECT_DXIL_STATS=1. Per-lane lowering and the PSO disk cache were disabled.Baseline HLSL
Baseline Direct DXIL
Candidate Direct DXIL
Candidate HLSL
Not tested
XCL_SAMPLE_*datasets. Retail coverage of the specific FREXP opcode remains unverified.AI use
Assisted-by: Codex (GPT-6.2-Sol)for the implementation and tests. Codex (GPT-6 family, exact variant unavailable in the current session) reviewed upstream changes, resolved the test-placement conflict, ran and summarized synthetic and retail validation, and prepared this draft.