Skip to content

Conversation

andrewor14
Copy link
Contributor

Summary: This is the torchao version of pytorch/pytorch#162550 by @navsud. Including the PR description here again:

D79674759 tried to fix the expensive prepare and convert steps, as assert_and_get_unique_device was called multiple times. This change fixes that issue by using functools.cache decorator.

Test Plan:
Verified on llm export to QNN.
LLM Quantization prepare time of ~20min reduced to ~3min.

**Summary:** This is the torchao version of pytorch/pytorch#162550
by @navsud. Including the PR description here again:

D79674759 tried to fix the expensive prepare and convert steps,
as assert_and_get_unique_device was called multiple times.
This change fixes that issue by using functools.cache decorator.

**Test Plan:**
Verified on llm export to QNN.
LLM Quantization prepare time of ~20min reduced to ~3min.
Copy link

pytorch-bot bot commented Sep 11, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2983

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit b88478e with merge base 10ba659 (image):
💚 Looks good so far! There are no failures yet. 💚

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 Sep 11, 2025
@andrewor14 andrewor14 added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Sep 11, 2025
@andrewor14 andrewor14 merged commit be71434 into main Sep 11, 2025
18 of 20 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. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants