Repository navigation
fix(borg): widen FP16 reciprocal LUT - #3
Merged
Merged
Conversation
Fixes gonsolo#2. Widen rcpLut from 17 to 33 entries and index it on mant(9,5). Pre-double the 5-bit interpolation fraction to keep the shared shift unchanged. An exhaustive normal-quotient sweep reduces the worst OpFDiv error from 3.295 to 2.245 ULP, with no result above the Vulkan 2.5 ULP bound. FrcpPrecisionTests now enforces the bound. Tests: mill hardware.borg.test
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.
Fixes #2.
Summary
rcpLutfrom 17 to 33 entries and index it onmant(9,5).>> 6datapath.FrcpPrecisionTestsinto a regression check.This adds 160 LUT bits per lane and no extra cycle. Inputs above the Vulkan divisor range
are not fixed; at exponent 29, the worst error changes from 1022.0 to 1022.5 ULP.
Results
The OpFDiv sweep covers all mantissa pairs for normal quotients. The RTL test reports
0.955 ULP for FRCP and 2.074 ULP for its FDIV sample.
Tests
mill hardware.borg.test.testOnly borg.FrcpPrecisionTests— 3/3mill hardware.borg.test— 19/19Not run:
make test-all(cocotb and gate-level suites).