Merged
Conversation
JanFSchulte
reviewed
Nov 6, 2024
|
|
||
| def config_from_onnx_model( | ||
| model, granularity='name', backend=None, default_precision='ap_fixed<16,6>', default_reuse_factor=1 | ||
| model, granularity='name', backend=None, default_precision='fixed<16,6>', default_reuse_factor=1, max_precision=None |
Contributor
There was a problem hiding this comment.
Out of curiosity, why this change of removing the ap_? Should I do the same in #1112?
Contributor
Author
There was a problem hiding this comment.
This part is backend-agnostic, so there's no reason to put ap_ or ac_. (I think the ones without a prefix follow the ap_style, though, with regard to signedness, using uint/ufixed instead of false being passed as an argument.) The right type should be produced based on the backend, since it will internally go to the FixedPrecisionType. I think all thee styles are supported, those with either prefix, or without a prefix, regardless of the backend (i.e. there's no reason to change this when you switch backends).
JanFSchulte
approved these changes
Nov 11, 2024
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.
Description
This is analogous to PR #1112 but for for ONNX. For ONNX, auto was the default, but max_precision was not set. This copies what we have for the Keras parser.
Type of change
Tests
We should make sure that this doesn't break anything, but truthfully, I am not sure if we have tests to test the max_precision behavior for any frontend, including Keras. Should we add such tests?
Checklist
pre-commiton the files I edited or added.