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

Fix (learned_round): disable return QuantTensor during float inference #1059

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

pablomlago
Copy link
Contributor

Reason for this PR

ImageNet entry-point was not working when enabling "--learned-round", as the quantization of the model was not properly enabled/disabled, due to the omission of the call to disable_return_quant_tensor/restore_return_quant_tensor.

Changes Made in this PR

Incorporate missing calls to update the return_quant_tensor for the model submodels, as well as add unit test to replicate the issue.

Testing Summary

Create new unit test for the class DisableEnableQuantization.

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.

@pablomlago pablomlago changed the title Fix act disable quant Fix Disable Quantisation ImageNet Oct 14, 2024
@Giuseppe5 Giuseppe5 self-requested a review October 15, 2024 09:37
@Giuseppe5 Giuseppe5 changed the base branch from master to dev October 21, 2024 23:47
@Giuseppe5
Copy link
Collaborator

PRs should always point to dev :)

@Giuseppe5 Giuseppe5 changed the title Fix Disable Quantisation ImageNet Fix (learned_round): disable return QuantTensor during float inference Oct 21, 2024
@Giuseppe5 Giuseppe5 merged commit 7307942 into Xilinx:dev Oct 21, 2024
372 of 374 checks passed
Giuseppe5 pushed a commit to Giuseppe5/brevitas that referenced this pull request Oct 29, 2024
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