-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor QAT to use common fake_quantize_affine primitive (#527)
Summary: Currently there are two QAT quantizers, 8da4w and 4w. Today, these use different autograd functions to represent their fake quantization numerics, but this is not scalable because new QAT quantizers may introduce yet another divergent code path. To address this, this commit refactors both quantizers to use the common fake_quantize_affine QAT primitive. Test Plan: python test/quantization/test_qat.py Reviewers: jerryzh168 Subscribers: jerryzh168, supriyar, msaroufim
- Loading branch information
1 parent
0e6c122
commit 5787e9e
Showing
4 changed files
with
64 additions
and
88 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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