Skip to content

[inductor][refactor] Use AotOnlyBuffer for AOTI cpp_wrapper buffers - #182304

Closed
desertfire wants to merge 3 commits into
gh/desertfire/706/basefrom
gh/desertfire/706/head
Closed

desertfire wants to merge 3 commits into
gh/desertfire/706/basefrom
gh/desertfire/706/head

Conversation

@desertfire

@desertfire desertfire commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

PythonWrapperCodegen.init now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

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

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented May 4, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 9a37b69 with merge base 004acb4 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@desertfire desertfire added the topic: not user facing topic category label May 4, 2026
@desertfire desertfire changed the title [inductor] Use AotOnlyBuffer for AOTI cpp_wrapper buffers [inductor][refactor] Use AotOnlyBuffer for AOTI cpp_wrapper buffers May 4, 2026
@desertfire
desertfire requested a review from yushangdi May 4, 2026 23:12
…r buffers"

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

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

[ghstack-poisoned]
desertfire added a commit that referenced this pull request May 5, 2026
PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

ghstack-source-id: 6a8ad05
Pull Request resolved: #182304
@desertfire

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 5, 2026
@pytorchmergebot

Copy link
Copy Markdown
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

…r buffers"

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

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

[ghstack-poisoned]
desertfire added a commit that referenced this pull request May 6, 2026
PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

ghstack-source-id: e29fbe3
Pull Request resolved: #182304
@desertfire

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Merge failed

Reason: HTTP Error 504: Gateway Timeout

Details for Dev Infra team Raised by workflow job

@desertfire

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
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

Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
…ytorch#182304)

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

Pull Request resolved: pytorch#182304
Approved by: https://github.com/angelayi
ghstack dependencies: pytorch#182264, pytorch#182265, pytorch#182303
@github-actions
github-actions Bot deleted the gh/desertfire/706/head branch June 6, 2026 02:29
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
…ytorch#182304)

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

Pull Request resolved: pytorch#182304
Approved by: https://github.com/angelayi
ghstack dependencies: pytorch#182264, pytorch#182265, pytorch#182303
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…ytorch#182304)

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

Pull Request resolved: pytorch#182304
Approved by: https://github.com/angelayi
ghstack dependencies: pytorch#182264, pytorch#182265, pytorch#182303
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…ytorch#182304)

PythonWrapperCodegen.__init__ now constructs self.header / self.prefix /
self.wrapper_call via make_codegen_buffer(), which returns AotOnlyBuffer
in AOT mode and plain IndentedBuffer otherwise. CppWrapperCpu picks up
the right type automatically — no override needed since aot_mode is the
graph-level flag that drives the choice.

Authored with Claude

Pull Request resolved: pytorch#182304
Approved by: https://github.com/angelayi
ghstack dependencies: pytorch#182264, pytorch#182265, pytorch#182303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants