Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat (proxy): flag to enable/disable QT return #1083

Merged
merged 8 commits into from
Dec 18, 2024

Conversation

Giuseppe5
Copy link
Collaborator

@Giuseppe5 Giuseppe5 commented Oct 31, 2024

Reason for this PR

Considering we cache quant metadata during export, we do not need to propagate QuantTensors during export.
This will come in handy for future features, including lazy dequantization which assumes a different paradigm in inference vs export.

Changes Made in this PR

Return a normal tensor from proxies during export.
Set all return_quant_tensor to False during tracing, and restore their states immediately after.

Testing Summary

NA

Risk Highlight

  • This PR includes code from another work (please detail).
  • This PR contains API-breaking changes.
  • This PR depends on work in another PR (please provide links/details).
  • This PR introduces new dependencies (please detail).
  • There are coverage gaps not covered by tests.
  • Documentation updates required in subsequent PR.

Checklist

  • Code comments added to any hard-to-understand areas, if applicable.
  • Changes generate no new warnings.
  • Updated any relevant tests, if applicable.
  • No conflicts with destination dev branch.
  • I reviewed my own code changes.
  • Initial CI/CD passing.
  • 1+ reviews given, and any review issues addressed and approved.
  • Post-review full CI/CD passing.

@Giuseppe5 Giuseppe5 changed the title Feat (export): dequantize during export Feat (proxy): flag to enable/disable QT return Dec 17, 2024
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.

See the comment. If you think this is the best approach then approved - please merge (after FINN integration is fixed!)

src/brevitas/nn/quant_avg_pool.py Show resolved Hide resolved
@Giuseppe5 Giuseppe5 requested a review from nickfraser December 17, 2024 17:19
@Giuseppe5 Giuseppe5 merged commit 3612e90 into Xilinx:dev Dec 18, 2024
390 of 396 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