upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/thread_stacks.cpp
diff options
context:
space:
mode:
authormilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 11:32:48 -0600
committermilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 11:32:48 -0600
commit5f063e5812f9b12f5c2063c1b552fd975ae9e5e9 (patch)
tree59f90002cc8fb3378332baffe1aebb4d187128be /runtime/src/thread_stacks.cpp
parent355c8c9c2da01a9898df5061d266ca1f5567cdc9 (diff)
tests, rdna2spirv: GPU readback for frexp and ldexp, and their neg/abs sources move the sign bit (GPU-FREXP-LDEXP, SHADER-FREXP-LDEXP-SIGN-MODS)
v_frexp_mant_f32, v_frexp_exp_i32_f32, v_ldexp_f32, v_frexp_mant_f64 and v_frexp_exp_i32_f64 are lowered with integer ops on the float's words, and no fixture in runtime/test/shaders ran any of them. cs_w32_frexp_ldexp is memory-fed, like cs_w32_shift64: check.py seeds 64 records of a binary32 value, an ldexp exponent and a binary64 value, and each thread loads one at run time and stores the five results, v_frexp_mant_f32 with a neg source, and v_ldexp_f32 with an abs source run with the odd threads turned off. The records cover the exponent clamp, overflow and underflow, binary32 denormals, binary64 subnormals on both sides of the dword boundary, zeros, infinities and NaNs. The expected words come from an oracle written from the rows of docs/design.md, checked against math.frexp and math.ldexp in tests/test_gpu_frexp_ldexp.py. On an RTX 4070 Ti (NVIDIA 620.70.06) six words were wrong: every NaN source under neg or abs came back as 0x7fffffff, the driver's default NaN. The binary32 branch applied the modifiers as FAbs and OpFNegate, from which Vulkan lets a driver return any NaN. The three ops only move bits, so the branch now reads its source through Gen.src_u_sign_mods, as the min/max family does. tests/semantic/test_alu_frexp_ldexp.py checks that the modifiers are emitted as sign-bit ops. With that the fixture's 768 words are exact on the RTX 4070 Ti and on llvmpipe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions