add learnable_fake_quantize in pt2e#3135
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3135
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit dd004b2 with merge base a5a8fe2 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
can you correct the name to fake_quantizer?
There was a problem hiding this comment.
@jerryzh168
I'm trying to be consistent with FakeQuantize() class at: https://github.com/pytorch/ao/blob/main/torchao/quantization/pt2e/fake_quantize.py.
I'm ok to change the file name: learnable_fake_quantize.py to learnable_fake_quantizer.py and the class name from LearnableFakeQuantize() to LearnableFakeQuantizer() if that is what you meant.
There was a problem hiding this comment.
Yeah this is for pt2e flow, so I feel the name FakeQuantize is more consistent with the other classes?
There was a problem hiding this comment.
FakeQuantize is the wrong name I think since it's a verb not noun, it's not consistent with Observer which is a noun. We can correct, and deprecate FakeQuantize itself as we add new things.
But it's OK to do this separately as well
Summary: Learnable Fake Quantize is a popular technique used especially for low-precision QAT. This was available in fx quantization at https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/_learnable_fake_quantize.py#L10?, but not in pt2e quantization flow. This change adds learnable fake quantize in pt2e, with some changes, especially related to how channel wise quantization works. Differential Revision: D83542550
38017fc to
60b321a
Compare
Summary: Learnable Fake Quantize is a popular technique used especially for low-precision QAT. This was available in fx quantization at https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/_learnable_fake_quantize.py#L10?, but not in pt2e quantization flow. This change adds learnable fake quantize in pt2e, with some changes, especially related to how channel wise quantization works. Differential Revision: D83542550
60b321a to
a2389fc
Compare
There was a problem hiding this comment.
Yeah this is for pt2e flow, so I feel the name FakeQuantize is more consistent with the other classes?
Summary: Learnable Fake Quantize is a popular technique used especially for low-precision QAT. This was available in fx quantization at https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/_learnable_fake_quantize.py#L10?, but not in pt2e quantization flow. This change adds learnable fake quantize in pt2e, with some changes, especially related to how channel wise quantization works. Reviewed By: andrewor14 Differential Revision: D83542550
a2389fc to
149bc0b
Compare
Summary: Learnable Fake Quantize is a popular technique used especially for low-precision QAT. This was available in fx quantization at https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/_learnable_fake_quantize.py#L10?, but not in pt2e quantization flow. This change adds learnable fake quantize in pt2e, with some changes, especially related to how channel wise quantization works. Reviewed By: andrewor14 Differential Revision: D83542550
149bc0b to
dd004b2
Compare
Summary: Earlier version (pytorch#3135) got reverted because of broken OSS CI tests. Retrying it. Differential Revision: D84522318
Differential Revision: D83542550 Pull Request resolved: pytorch#3135
Summary: Learnable Fake Quantize is a popular technique used especially for low-precision QAT. This was available in fx quantization at https://github.com/pytorch/pytorch/blob/main/torch/ao/quantization/_learnable_fake_quantize.py#L10?, but not in pt2e quantization flow. This change adds learnable fake quantize in pt2e, with some changes, especially related to how channel wise quantization works.
Differential Revision: D83542550