Repository navigation
[inductor][refactor] Extract LazyKernelCompileResult to shared header - #182264
Closed
desertfire wants to merge 2 commits into
Closed
desertfire wants to merge 2 commits into
desertfire wants to merge 2 commits into
Conversation
Move LazyKernelCompileResult struct from the JIT-only lazy_triton_compile.h to a shared header at aoti_include/kernel_compile_result.h. This makes the struct accessible to both JIT and AOTI compilation paths, which is needed for the upcoming AOTI lazy Triton compilation support. Authored with Claude [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/182264
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e9d4578 with merge base 004acb4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced May 4, 2026
…ared header" Move LazyKernelCompileResult struct from the JIT-only lazy_triton_compile.h to a shared header at aoti_include/kernel_compile_result.h. This makes the struct accessible to both JIT and AOTI compilation paths, which is needed for the upcoming AOTI lazy Triton compilation support. Authored with Claude [ghstack-poisoned]
angelayi
approved these changes
May 5, 2026
Collaborator
|
Starting merge as part of PR stack under #182304 |
2 similar comments
Collaborator
|
Starting merge as part of PR stack under #182304 |
Collaborator
|
Starting merge as part of PR stack under #182304 |
pytorchmergebot
pushed a commit
that referenced
this pull request
May 6, 2026
Pure refactoring with no behavior change. Extract inline blocks from write_header / write_prefix / write_wrapper_decl / finalize_prefix into named private methods to make the upcoming dual-mode infrastructure change easier to review. Authored with Claude Pull Request resolved: #182265 Approved by: https://github.com/angelayi ghstack dependencies: #182264
pytorchmergebot
pushed a commit
that referenced
this pull request
May 6, 2026
Add AotOnlyBuffer(IndentedBuffer), a mirror with flipped defaults for pure-AOTI codegen. Base IndentedBuffer gets stub methods with pure-JIT defaults (writeline_jit=writeline, writeline_aot=noop, splice_jit=splice, splice_aot=noop); AotOnlyBuffer flips them so writeline_aot/splice_aot write while writeline_jit/splice_jit drop. This lets call sites use writeline_jit/writeline_aot uniformly across pure-JIT and pure-AOTI without sprinkling V.graph.aot_mode checks. make_codegen_buffer() picks the right type per mode. Authored with Claude Pull Request resolved: #182303 Approved by: https://github.com/angelayi ghstack dependencies: #182264, #182265
pytorchmergebot
pushed a commit
that referenced
this pull request
May 6, 2026
…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: #182304 Approved by: https://github.com/angelayi ghstack dependencies: #182264, #182265, #182303
Alokksinha00
pushed a commit
to Alokksinha00/pytorch
that referenced
this pull request
May 15, 2026
…pytorch#182264) Move LazyKernelCompileResult struct from the JIT-only lazy_triton_compile.h to a shared header at aoti_include/kernel_compile_result.h. This makes the struct accessible to both JIT and AOTI compilation paths, which is needed for the upcoming AOTI lazy Triton compilation support. Authored with Claude Pull Request resolved: pytorch#182264 Approved by: https://github.com/angelayi
Alokksinha00
pushed a commit
to Alokksinha00/pytorch
that referenced
this pull request
May 15, 2026
Pure refactoring with no behavior change. Extract inline blocks from write_header / write_prefix / write_wrapper_decl / finalize_prefix into named private methods to make the upcoming dual-mode infrastructure change easier to review. Authored with Claude Pull Request resolved: pytorch#182265 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264
Alokksinha00
pushed a commit
to Alokksinha00/pytorch
that referenced
this pull request
May 15, 2026
Add AotOnlyBuffer(IndentedBuffer), a mirror with flipped defaults for pure-AOTI codegen. Base IndentedBuffer gets stub methods with pure-JIT defaults (writeline_jit=writeline, writeline_aot=noop, splice_jit=splice, splice_aot=noop); AotOnlyBuffer flips them so writeline_aot/splice_aot write while writeline_jit/splice_jit drop. This lets call sites use writeline_jit/writeline_aot uniformly across pure-JIT and pure-AOTI without sprinkling V.graph.aot_mode checks. make_codegen_buffer() picks the right type per mode. Authored with Claude Pull Request resolved: pytorch#182303 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264, pytorch#182265
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
aperson30
pushed a commit
to aperson30/pytorch
that referenced
this pull request
Jun 20, 2026
…pytorch#182264) Move LazyKernelCompileResult struct from the JIT-only lazy_triton_compile.h to a shared header at aoti_include/kernel_compile_result.h. This makes the struct accessible to both JIT and AOTI compilation paths, which is needed for the upcoming AOTI lazy Triton compilation support. Authored with Claude Pull Request resolved: pytorch#182264 Approved by: https://github.com/angelayi
aperson30
pushed a commit
to aperson30/pytorch
that referenced
this pull request
Jun 20, 2026
Pure refactoring with no behavior change. Extract inline blocks from write_header / write_prefix / write_wrapper_decl / finalize_prefix into named private methods to make the upcoming dual-mode infrastructure change easier to review. Authored with Claude Pull Request resolved: pytorch#182265 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264
aperson30
pushed a commit
to aperson30/pytorch
that referenced
this pull request
Jun 20, 2026
Add AotOnlyBuffer(IndentedBuffer), a mirror with flipped defaults for pure-AOTI codegen. Base IndentedBuffer gets stub methods with pure-JIT defaults (writeline_jit=writeline, writeline_aot=noop, splice_jit=splice, splice_aot=noop); AotOnlyBuffer flips them so writeline_aot/splice_aot write while writeline_jit/splice_jit drop. This lets call sites use writeline_jit/writeline_aot uniformly across pure-JIT and pure-AOTI without sprinkling V.graph.aot_mode checks. make_codegen_buffer() picks the right type per mode. Authored with Claude Pull Request resolved: pytorch#182303 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264, pytorch#182265
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
…pytorch#182264) Move LazyKernelCompileResult struct from the JIT-only lazy_triton_compile.h to a shared header at aoti_include/kernel_compile_result.h. This makes the struct accessible to both JIT and AOTI compilation paths, which is needed for the upcoming AOTI lazy Triton compilation support. Authored with Claude Pull Request resolved: pytorch#182264 Approved by: https://github.com/angelayi
gplutop7
pushed a commit
to gplutop7/pytorch
that referenced
this pull request
Jul 15, 2026
Pure refactoring with no behavior change. Extract inline blocks from write_header / write_prefix / write_wrapper_decl / finalize_prefix into named private methods to make the upcoming dual-mode infrastructure change easier to review. Authored with Claude Pull Request resolved: pytorch#182265 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264
gplutop7
pushed a commit
to gplutop7/pytorch
that referenced
this pull request
Jul 15, 2026
Add AotOnlyBuffer(IndentedBuffer), a mirror with flipped defaults for pure-AOTI codegen. Base IndentedBuffer gets stub methods with pure-JIT defaults (writeline_jit=writeline, writeline_aot=noop, splice_jit=splice, splice_aot=noop); AotOnlyBuffer flips them so writeline_aot/splice_aot write while writeline_jit/splice_jit drop. This lets call sites use writeline_jit/writeline_aot uniformly across pure-JIT and pure-AOTI without sprinkling V.graph.aot_mode checks. make_codegen_buffer() picks the right type per mode. Authored with Claude Pull Request resolved: pytorch#182303 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264, pytorch#182265
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
…pytorch#182264) Move LazyKernelCompileResult struct from the JIT-only lazy_triton_compile.h to a shared header at aoti_include/kernel_compile_result.h. This makes the struct accessible to both JIT and AOTI compilation paths, which is needed for the upcoming AOTI lazy Triton compilation support. Authored with Claude Pull Request resolved: pytorch#182264 Approved by: https://github.com/angelayi
aws-kingrj
pushed a commit
to amazon-contributing/upstream-to-pytorch
that referenced
this pull request
Jul 29, 2026
Pure refactoring with no behavior change. Extract inline blocks from write_header / write_prefix / write_wrapper_decl / finalize_prefix into named private methods to make the upcoming dual-mode infrastructure change easier to review. Authored with Claude Pull Request resolved: pytorch#182265 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264
aws-kingrj
pushed a commit
to amazon-contributing/upstream-to-pytorch
that referenced
this pull request
Jul 29, 2026
Add AotOnlyBuffer(IndentedBuffer), a mirror with flipped defaults for pure-AOTI codegen. Base IndentedBuffer gets stub methods with pure-JIT defaults (writeline_jit=writeline, writeline_aot=noop, splice_jit=splice, splice_aot=noop); AotOnlyBuffer flips them so writeline_aot/splice_aot write while writeline_jit/splice_jit drop. This lets call sites use writeline_jit/writeline_aot uniformly across pure-JIT and pure-AOTI without sprinkling V.graph.aot_mode checks. make_codegen_buffer() picks the right type per mode. Authored with Claude Pull Request resolved: pytorch#182303 Approved by: https://github.com/angelayi ghstack dependencies: pytorch#182264, pytorch#182265
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
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.
Stack from ghstack (oldest at bottom):
Move LazyKernelCompileResult struct from the JIT-only
lazy_triton_compile.h to a shared header at
aoti_include/kernel_compile_result.h. This makes the struct
accessible to both JIT and AOTI compilation paths, which is
needed for the upcoming AOTI lazy Triton compilation support.
Authored with Claude