Feature/PWPolyF - #1522
Open
ollycassidy13 wants to merge 5 commits into
Open
Feature/PWPolyF#1522ollycassidy13 wants to merge 5 commits into
ollycassidy13 wants to merge 5 commits into
Conversation
nickfraser
requested changes
May 29, 2026
nickfraser
left a comment
Collaborator
There was a problem hiding this comment.
Sorry, but this PR seems to be mostly vibe-coded and needs a LOT of work before it would be accepted. I will hold off from doing a full review before asking the following:
- do you really want to upstream this into Brevitas, rather than just using it as an out-of-source extension?
- if yes, are you willing to take the time to rearchitect this?
If the answer is 'no' to either of the above - please close this PR.
| onnx_export_kwargs[key][QONNX_DOMAIN_STRING] = QONNX_DOMAIN_VERSION | ||
| else: | ||
| onnx_export_kwargs[key] = {QONNX_DOMAIN_STRING: QONNX_DOMAIN_VERSION} | ||
| cls.solve_dynamo_export(onnx_export_kwargs) |
| BrevitasQuantLSTMCellFn] | ||
|
|
||
| @classmethod | ||
| def solve_dynamo_export(cls, export_kwargs): |
ollycassidy13
force-pushed
the
feature/PWPolyF
branch
from
June 24, 2026 14:50
e024825 to
22d2331
Compare
# Conflicts: # src/brevitas/export/__init__.py
This branch has not been deployed
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.
FINN needs a Brevitas-side PyTorch activation module that mirrors PWPolyF hardware behavior for common floating-point non-linear activations and can export a graph marker that FINN can lower to its RTL This PR adds a FINN-compatible piecewise-polynomial activation path for GELU, SiLU, sigmoid, and tanh, with QONNX export support through a
finn.pwpolyf::PWPolyFcustom-op marker.The new activation:
gelu,silu,sigmoid, andtanh.|x| >= 8.