Repository navigation
Conversation
This was referenced Nov 30, 2026
lambirou
force-pushed
the
shader/f16-rsq-exp
branch
from
November 30, 2026 09:04
4815a98 to
933b8e6
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the VOP1 f16 slice. Stacked on #3556; rebase after it lands.
This adds the plain binary16 VOP1 forms of
v_rsq_f16andv_exp_f16, e32 and e64 (four reference rows):rsqrtorexp2in binary32, then narrow with the existing integer nearest-even conversion.rsqmaps zero tosource | 0x7c00,0x7c00to 0 and anything above0x7c00to0x7e00;expapplies the 70 midpoint corrections,0xce40to 0 and magnitudes above0x7c00to0x7e00.f16_rsq_exp_resultfollows the P4a contract, and a Python midpoint table is checked against the C++ table in the direct compute lowering.Tests
pixel_aot_f16_rsq_exp_hardwarepassed on the AMD RX 9060 XT, andpixel_aot_f16_rsq_exp_warppassed on WARP.pixel_aot_|compute_store_aot_entries passes 195/195, 0 fail, 0 skip.form_coverage_check.pypasses;rdna2_tools_check.pyreports 159 tests and 19LLVM_LIBskips.Limits
The high half of the destination is not observed. The
rsqrt/exp2error window is not reproduced bit for bit;expmidpoints are corrected and the fixture avoids ambiguousrsqsources. NaN/infinity constants, runtime sources, DPP/SDWA and the remaininglog/sin/cosforms are out of scope.The branch includes the commits of #3542 (and #3549/#3556 below it); they drop out of the diff once those land.
AI-assisted.