Feat (core): module for runtime computation of exp bias#1418
Merged
Giuseppe5 merged 3 commits intoXilinx:devfrom Dec 4, 2025
Merged
Feat (core): module for runtime computation of exp bias#1418Giuseppe5 merged 3 commits intoXilinx:devfrom
Giuseppe5 merged 3 commits intoXilinx:devfrom
Conversation
nickfraser
approved these changes
Nov 19, 2025
Collaborator
nickfraser
left a comment
There was a problem hiding this comment.
LGTM, pending the minor changes requested and fixing the tests.
| self.exponent_bit_width_impl = exponent_bit_width_impl | ||
|
|
||
| def forward(self): | ||
| return 2 ** (self.exponent_bit_width_impl() - 1) - 1 |
Collaborator
There was a problem hiding this comment.
Does that mean this can be deleted: https://github.com/Xilinx/brevitas/blob/dev/src/brevitas/quant/experimental/float_base.py#L31-L33
Collaborator
There was a problem hiding this comment.
I.e., should runtime exponent bias calculation using this module be the default?
Collaborator
Author
There was a problem hiding this comment.
No the default now is still
Which requires the value function above.
I'd leave it like this for now
50fa68c to
b27ea37
Compare
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.
Reason for this PR
Exponent bias is current its own class but we don't have any utility to compute it at runtime based on the current value of exponent bit width