Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@devsashidhar
Copy link

@devsashidhar devsashidhar commented Mar 5, 2025

PR Description:
This PR improves AOTInductor's compilation performance by introducing caching, limiting unnecessary decompositions, and optimizing JSON handling.

Changes:
Added persistent caching to avoid redundant recompilation.
Restricted decompositions to only necessary operators (aten::add, aten::mul).
Optimized JSON metadata updates to prevent unnecessary file writes.

Impact:
Reduces compilation time for repeated runs.
Improves efficiency by only updating metadata when needed.
Helps prevent excessive decompositions, leading to better overall performance.

Testing:
Ran pytest test/inductor to check for regressions.
Verified that AOT compilation is significantly faster on repeated runs.

cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 5, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 7890c7b with merge base 4b35139 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added module: inductor oncall: distributed Add this issue/PR to distributed oncall triage queue labels Mar 5, 2025
@devsashidhar
Copy link
Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 5, 2025
@bdhirsh bdhirsh requested a review from desertfire March 6, 2025 01:53
@bdhirsh bdhirsh added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 6, 2025
@desertfire desertfire requested a review from EikanWang March 6, 2025 13:54
Copy link
Contributor

@desertfire desertfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will let @EikanWang to comment the aoti_eager part.

@@ -0,0 +1,259 @@
torch/_higher_order_ops/utils.py: operator: OperatorBase, delayed_error: bool, *args: Any, **kwargs: Any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this third-party change.

self.module.to(self.src_device_obj)

def forward(self, *inputs: Any, **kwargs: Any) -> Any:
def forward(self, *inputs: P.args, **kwargs: P.kwargs) -> R:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant to this PR?

@mikaylagawarecki mikaylagawarecki removed their request for review May 2, 2025 16:54
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Jul 1, 2025
@github-actions github-actions bot closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: inductor oncall: distributed Add this issue/PR to distributed oncall triage queue open source Stale topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants