[torchao][pt2e] Make prepare and convert faster by caching#162550
Closed
navsud wants to merge 1 commit intopytorch:mainfrom
Closed
[torchao][pt2e] Make prepare and convert faster by caching#162550navsud wants to merge 1 commit intopytorch:mainfrom
navsud wants to merge 1 commit intopytorch:mainfrom
Conversation
|
|
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/162550
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit 09e2172 with merge base 36338fc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D82073679 |
Summary: 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. bypass-github-export-checks Test Plan: Verified on llm export to QNN. Prepare time of ~20min reduced to ~3min. Rollback Plan: Reviewed By: andrewor14 Differential Revision: D82073679
3861da8 to
09e2172
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D82073679 |
Contributor
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
andrewor14
added a commit
to pytorch/ao
that referenced
this pull request
Sep 11, 2025
**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.
andrewor14
added a commit
to pytorch/ao
that referenced
this pull request
Sep 11, 2025
**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.
markc-614
pushed a commit
to markc-614/pytorch
that referenced
this pull request
Sep 17, 2025
…62550) Summary: 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. Rollback Plan: Differential Revision: D82073679 Pull Request resolved: pytorch#162550 Approved by: https://github.com/andrewor14
mansiag05
pushed a commit
to mansiag05/pytorch
that referenced
this pull request
Sep 22, 2025
…62550) Summary: 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. Rollback Plan: Differential Revision: D82073679 Pull Request resolved: pytorch#162550 Approved by: https://github.com/andrewor14
cleonard530
pushed a commit
to cleonard530/pytorch
that referenced
this pull request
Sep 22, 2025
…62550) Summary: 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. Rollback Plan: Differential Revision: D82073679 Pull Request resolved: pytorch#162550 Approved by: https://github.com/andrewor14
dsashidh
pushed a commit
to dsashidh/pytorch
that referenced
this pull request
Sep 26, 2025
…62550) Summary: 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. Rollback Plan: Differential Revision: D82073679 Pull Request resolved: pytorch#162550 Approved by: https://github.com/andrewor14
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: D79674759 tried to fix the expensive prepare and convert steps, as
assert_and_get_unique_devicewas called multiple times. This change fixes that issue by usingfunctools.cachedecorator.Test Plan:
Verified on llm export to QNN.
LLM Quantization prepare time of ~20min reduced to ~3min.
Rollback Plan:
Differential Revision: D82073679
cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv