Skip to content

Feat (core): module for runtime computation of exp bias#1418

Merged
Giuseppe5 merged 3 commits intoXilinx:devfrom
Giuseppe5:exponent_bias_impl
Dec 4, 2025
Merged

Feat (core): module for runtime computation of exp bias#1418
Giuseppe5 merged 3 commits intoXilinx:devfrom
Giuseppe5:exponent_bias_impl

Conversation

@Giuseppe5
Copy link
Collaborator

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

Copy link
Collaborator

@nickfraser nickfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e., should runtime exponent bias calculation using this module be the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the default now is still

exponent_bias_impl = StaticExponentBias

Which requires the value function above.

I'd leave it like this for now

@Giuseppe5 Giuseppe5 requested a review from nickfraser December 4, 2025 11:03
@Giuseppe5 Giuseppe5 merged commit 912f3fd into Xilinx:dev Dec 4, 2025
484 of 486 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants