Skip to content

Conversation

navsud
Copy link
Contributor

@navsud navsud commented Oct 2, 2025

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

@navsud navsud requested a review from cccclai as a code owner October 2, 2025 01:18
Copy link

pytorch-bot bot commented Oct 2, 2025

🔗 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 Failure

As of commit d95e62f with merge base c997fe4 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 2, 2025
@facebook-github-bot
Copy link
Contributor

@navsud has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83583655.

navsud added a commit to navsud/executorch that referenced this pull request Oct 2, 2025
…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
@navsud navsud added the release notes: none Do not include this in the release notes label Oct 2, 2025
@navsud navsud requested a review from lucylq as a code owner October 2, 2025 20:00
navsud added a commit to navsud/executorch that referenced this pull request Oct 2, 2025
…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
@navsud navsud requested a review from jackzhxng as a code owner October 2, 2025 20:00
navsud added a commit to navsud/executorch that referenced this pull request Oct 2, 2025
…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(
Copy link
Contributor

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

Copy link
Contributor Author

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.

navsud added a commit to navsud/executorch that referenced this pull request Oct 3, 2025
…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
navsud added a commit to navsud/executorch that referenced this pull request Oct 3, 2025
…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
…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
@facebook-github-bot facebook-github-bot merged commit e652746 into pytorch:main Oct 3, 2025
131 of 133 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants