-
Notifications
You must be signed in to change notification settings - Fork 682
Use FusedMovingAvgObsFakeQuantize instead of FakeQuantize for faster QAT #14740
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14740
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit d95e62f with merge base c997fe4 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…QAT (pytorch#14740) Summary: FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly. Tested on llama model on HTP and got ~4x QAT speedup. Differential Revision: D83583655
698f6bf
to
aa9860c
Compare
aa9860c
to
5e2a9ef
Compare
…QAT (pytorch#14740) Summary: FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly. Tested on llama model on HTP and got ~4x QAT speedup. Differential Revision: D83583655
5e2a9ef
to
c1f908c
Compare
…QAT (pytorch#14740) Summary: FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly. Tested on llama model on HTP and got ~4x QAT speedup. Differential Revision: D83583655
) -> QuantizationConfig: | ||
extra_args: Dict[str, Any] = {"eps": 2**-20} | ||
act_fake_quant_ctr = FakeQuantize.with_args( | ||
act_fake_quant_ctr = FusedMovingAvgObsFakeQuantize.with_args( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between FakeQuantize
and FusedMovingAvgObsFakeQuantize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FusedMovingAvgObsFakeQuantize
- as the name suggests, has a combined op for FakeQuantize and MovingAvgObserver which makes it faster than two separate ops: FakeQuantize and MovingAvgObserver.
…QAT (pytorch#14740) Summary: FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly. Tested on llama model on HTP and got ~4x QAT speedup. Reviewed By: billmguo Differential Revision: D83583655
c1f908c
to
4cbcb42
Compare
…QAT (pytorch#14740) Summary: FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly. Tested on llama model on HTP and got ~4x QAT speedup. Reviewed By: billmguo Differential Revision: D83583655
4cbcb42
to
f7dc1f0
Compare
…QAT (pytorch#14740) Summary: FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly. Tested on llama model on HTP and got ~4x QAT speedup. Reviewed By: billmguo Differential Revision: D83583655
f7dc1f0
to
d95e62f
Compare
Summary:
FusedMovingAvgObsFakeQuantize speeds up by fusing FakeQuantize and MovingAverageMinMaxObserver into one CUDA op. Using it should give good speedups. This change updates the QAT qconfigs to accordingly.
Tested on llama model on HTP and got ~4x QAT speedup.
Differential Revision: D83583655