Merged
Conversation
fa50d63 to
55bdd0a
Compare
c80eead to
986936e
Compare
e1d1e7f to
b495331
Compare
xmariachi
reviewed
May 5, 2025
Contributor
xmariachi
left a comment
There was a problem hiding this comment.
Left a comment on testing. lgtm in general, good work!
guilherme-brandao
previously approved these changes
May 6, 2025
Contributor
guilherme-brandao
left a comment
There was a problem hiding this comment.
Minor comment. Already approving! Nice work!
b495331 to
a50278c
Compare
xmariachi
approved these changes
May 6, 2025
guilherme-brandao
approved these changes
May 7, 2025
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.
Purpose of Changes and their Description
Re-implement in a deterministic way some math func, here are the details on the chosen algorithms:
Exp: Uses a Taylor polynomial with a lookup table for powers of10^(1/n)of size 300 which seems sufficient for 34 precision digits;Ln: Implements the Newton's method that uses exp 3 times;Log10: Used = ln(x) * 1/ln(10);Pow: Implementapd's algorithm but using ourLnandExpimpls;The
Exp10func has been removed as not used.The algorithms choices and implementations were made with the idea on improving performances, we are now much faster, see the benchmarks below. In terms of accuracy it is almost identical to previous implementations.
The perf improvements helped the network inferences calculation to drop from 250ms to 100ms.
Benchmarks before:
Benchmarks after:
Are these changes tested and documented?
Unreleasedsection ofCHANGELOG.md?