Skip to content

[AOTInductor] Call most runtime fallback ops without calling into Python#154142

Closed
benjaminglass1 wants to merge 20 commits intogh/benjaminglass1/84/basefrom
gh/benjaminglass1/84/head
Closed

[AOTInductor] Call most runtime fallback ops without calling into Python#154142
benjaminglass1 wants to merge 20 commits intogh/benjaminglass1/84/basefrom
gh/benjaminglass1/84/head

Conversation

@benjaminglass1
Copy link
Collaborator

@benjaminglass1 benjaminglass1 commented May 22, 2025

Stack from ghstack (oldest at bottom):

Uses the new aoti_torch_call_dispatcher interface to call runtime fallback ops without calling back into Python. This supports a limited subset of input and output datatypes, but a significant majority of remaining fallback ATen ops are covered.

Fixes #150988
Fixes #153478

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented May 22, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 06bfb9c with merge base 2625c70 (image):
💚 Looks good so far! There are no failures yet. 💚

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

benjaminglass1 added a commit that referenced this pull request May 22, 2025
Uses the new aoti_torch_call_dispatcher interface to call runtime fallback ops without calling back into Python.  This supports a limited subset of input and output datatypes, but a large number of fallback ATen ops are covered.

Fixes #150988
Fixes #153478

ghstack-source-id: 70cbe2a
Pull Request resolved: #154142
@benjaminglass1 benjaminglass1 self-assigned this May 22, 2025
[ghstack-poisoned]
benjaminglass1 added a commit that referenced this pull request May 26, 2025
Uses the new aoti_torch_call_dispatcher interface to call runtime fallback ops without calling back into Python.  This supports a limited subset of input and output datatypes, but a large number of fallback ATen ops are covered.

Fixes #150988
Fixes #153478

ghstack-source-id: dd3d05a
Pull Request resolved: #154142
[ghstack-poisoned]
@benjaminglass1 benjaminglass1 requested a review from desertfire May 26, 2025 19:58
@benjaminglass1 benjaminglass1 marked this pull request as ready for review May 26, 2025 19:58
@benjaminglass1 benjaminglass1 added the ciflow/trunk Trigger trunk jobs on your pull request label May 26, 2025
[ghstack-poisoned]
benjaminglass1 added a commit that referenced this pull request May 26, 2025
Uses the new aoti_torch_call_dispatcher interface to call runtime fallback ops without calling back into Python.  This supports a limited subset of input and output datatypes, but a large number of fallback ATen ops are covered.

Fixes [#150988](#150988)
Fixes [#153478](#153478)

ghstack-source-id: a8ece52
Pull Request resolved: #154142
[ghstack-poisoned]
[ghstack-poisoned]
benjaminglass1 and others added 3 commits May 29, 2025 15:19
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@benjaminglass1
Copy link
Collaborator Author

Benchmarking failures appear to be present on main at this time, please ignore.

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.

So what was the story about the previous memory leak?

@benjaminglass1
Copy link
Collaborator Author

So what was the story about the previous memory leak?

@desertfire I was never able to definitively determine what happened, but the leak went away when we delayed codegen for fallback kernel arguments until the last possible second (since we don't need to codegen in some cases). I suspect the issue was that we codegen'ed the arguments, but then in some circumstances never deallocated them (since we didn't actually use them).

[ghstack-poisoned]
@benjaminglass1
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@benjaminglass1
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants