Repository navigation
Conversation
|
Independent verification on current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
AMD / Linux data point – the PR was tested on NVIDIA only, where native wave64 is not available. Tested: RX 9070 XT (RDNA4, native wave64), Mesa RADV 26.3.1, CachyOS (kernel 7.3), Proton Experimental
Testing and write-up assisted by Claude Code (Claude Opus 5.5); runs on my own hardware, checked by me. |
|
PortBridge linked this to Lyrnc’s gfx1036 probe in VIctory #200 and Continued #762’s translator tests. I compiled the exact
Across 14 vectors, including 10 from the hardware probe, the Continued translator plus CPU interpreter matched 14/14. The exact XCL helper matched 9/14. A local HLSL control that prioritizes numerator NaN and applies I independently reran the same WARP probe on the published fix at |
…NaN/zero/sign v_div_fmas_f32 emitted mad(s0, s1, s2) and ignored its implicit VCC operand instead of scaling by 2^32 (ldexp_f(..., 32)) for lanes with VCC == 1. div_fixup returned q unchanged when q was NaN (overflow in the quotient sequence), when n == +-0.0 with finite d, when exp(n) - exp(d) < -150 (underflow), and without forcing the result sign to sign(d) ^ sign(n). Handle NaN (numerator before denominator), 0/0, Inf/Inf, x/0, Inf/x, x/Inf, 0/x, exp(n) - exp(d) < -150 underflow, quotient NaN overflow, and sign on the IEEE-754 bits directly, with GPU tests for both instructions across wave32 and split wave64. Assisted-by: OpenCode (Gemini 4 Neon)
2aa8211 to
eac652c
Compare
|
Thanks @akimfomin! Updated \eac652c\ to check numerator NaN before denominator NaN and apply \exp(n) - exp(d) < -150\ underflow before quotient NaN, added GPU test cases for both (including the -151\ vs -150\ boundary), re-ran the full test suite (753 passed, 0 failed, 41 ignored) and refreshed the 60 s smoke block. |
|
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
Not tested
AI use
|
|
Re-tested the updated head
Testing and write-up assisted by Claude Code (Claude Opus 5.5); runs on my own hardware, checked by me. |
|
RTX 5070 Ti: Tested
Not tested
AI use
|
|
@b3IKK as in my report above, this PR's two tests still fail with Measured on an RTX 5070 Ti, driver 617.42, debug, with this PR's commit and the patch on 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
|
v_div_fmas_f32emittedmad(s0, s1, s2)and ignored its implicitVCCoperand, so lanes withVCC == 1never got the2^32scale (ldexp_f(..., 32)).div_fixup(v_div_fixup_f32) returnedqunchanged whenqwasNaN(overflow in the division sequence), whenn == ±0.0with finited, whenexp(n) - exp(d) < -150(underflow), and without setting the result sign tosign(d) ^ sign(n). This replacesdiv_fixupwith an IEEE-754 bit-level implementation covering NaN (numerator before denominator),0/0,Inf/Inf,x/0,Inf/x,x/Inf,0/x,exp(n) - exp(d) < -150underflow,q = NaNoverflow, andcopysign(q, sign(d) ^ sign(n)).What is in it
crates/xcl/src/gpu/recomp/emit.rs: scalev_div_fmas_f32by2^32vialdexp_ffor lanes withVCC == 1; updatediv_fixupfor NaN priority (numerator before denominator), zero/inf,exp(n) - exp(d) < -150underflow,q = NaNoverflow, and sign.crates/xcl/src/gpu/recomp/tests.rs: add GPU testsgpu_div_fmas_f32_scales_by_vccandgpu_div_fixup_f32_special_cases_and_sign(17 cases including numerator-over-denominator NaN priority and the-151/-150exponent difference boundary) across 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): 753 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_div_fmas_f32_scales_by_vccandgpu_div_fixup_f32_special_cases_and_sign: both pass across wave32 and split wave64 (both failed on the GPU before the fix)Regression run
main:
PR:
Not tested
AI use
emit.rs, wrote the fix and GPU tests, addressed the PortBridge hardware-probe feedback (nNaN priority andexp(n) - exp(d) < -150), ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.