Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/191669
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Unclassified FailureAs of commit 530d47c with merge base 81deebd ( UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Jul 30, 2026
Closed
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 10, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: b29853b Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 10, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 1137f4d Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 11, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: e8330a8 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 12, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: fa5b40c Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 12, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 02b7847 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 12, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: e554ccc Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 12, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: ed4c5e6 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 12, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 0e4a31c Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 13, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: e284673 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 13, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 23b01a4 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Aug 13, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across five commit messages. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and the patterns the shipped ops demonstrate (a prelude that classifies with TensorIterator, one kernel body serving two aten ops, a Triton declaration, table-driven families, and a pitfall checklist). Marked DO NOT MERGE for two reasons. Section 6 draws its examples from the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command, env var and performance number was verified, and the file is ASCII-only per repo rules. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (22 file-attributed blocks, 0 drift) # referenced repo paths all exist (23 paths) # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: c0348bb Pull-Request: #191669
Contributor
Author
|
@pytorchbot import |
|
❌ 🤖 pytorchbot command failed: Try |
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 4, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: ffad5e1 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 4, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 905ed75 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 4, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 70817ad Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 4, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 7a572f0 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: d6b2573 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 85df4e2 Pull-Request: #191669
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 85df4e2 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: aef8a34 Pull-Request: #191669
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: aef8a34 Pull-Request: #191669
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: aef8a34 Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: 1fb114f Pull-Request: #191669
[ghstack-poisoned]
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: ac2e556 Pull-Request: #191669
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: ac2e556 Pull-Request: #191669
slayton58
added a commit
that referenced
this pull request
Sep 8, 2026
…T ops Documentation only, no code. Kept out of the implementation commits so it can be rewritten freely while the design is still moving, and so a reviewer can read the design without it being spread across the implementation commits. Two audiences in one file. The first half is the design document: what native-AOT is, why the kernels are embedded in the aten implementation rather than reached through the Python JIT router, the DispatchStub that torchgen emits between meta() and impl(), the runtime dispatch path, the two-stage build, and the measured effect (quoted from the design doc's tables, including the shapes where the AOT route loses to aten, and why that is a property of a declaration rather than of the layer). The second half is the how-to: every export in the declaration contract with its signature and cardinality, an annotated declaration, a step-by-step walkthrough for a new op, and a pitfall checklist of the traps recorded in the code and the design doc. Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and the runtime, which land in the tail commits of this stack, so it forward-references code that is not in the prefix PRs under review; and the contract it documents is still being changed by review feedback. Land it once the ops it teaches from are landed, or split the design half forward into the topk commit if that is more useful for review. Authored with an AI assistant (Claude Code). The content was mined from the original design doc and from the implementation, then fact-checked against the tree: every quoted code block, file path, API name, command and env var was verified, and the file is ASCII-only per repo rules. The performance tables are quoted from the design doc and say so; they were measured on the prototype tree, which declared 41 ops where this stack declares one. Test Plan: Documentation only. Verified mechanically rather than by test: ``` # quoted code blocks match the tree (12 file-attributed blocks, 0 drift) # referenced repo paths all exist (34 rooted, plus ops/<op>/<file>.py) # every op named as an AOT DECLARATION has an aot.py (topk is the only one) # test modules named in command blocks exist # APIs resolve: torch._native._native_aot_embedded, aot_enabled, # aot_manifest.covers; env vars NATIVE_AOT, TORCH_DISABLE_NATIVE_AOT, # TORCH_DISABLE_NATIVE_JIT; tests test/python_native/test_native_aot.py, # test/python_native/test_aot_manifest.py lintrunner --take NEWLINE,SPACES,TABS,COPYRIGHT torch/_native/AOT_README.md ``` ghstack-source-id: ac2e556 Pull-Request: #191669
[ghstack-poisoned]
Contributor
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
This branch has not been deployed
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):
Documentation only, no code. Kept out of the implementation commits so it can
be rewritten freely while the design is still moving, and so a reviewer can
read the design without it being spread across the implementation commits.
Two audiences in one file. The first half is the design document: what
native-AOT is, why the kernels are embedded in the aten implementation rather
than reached through the Python JIT router, the DispatchStub that torchgen
emits between meta() and impl(), the runtime dispatch path, the two-stage
build, and the measured effect (quoted from the design doc's tables, including
the shapes where the AOT route loses to aten, and why that is a property of a
declaration rather than of the layer). The second half is the how-to: every
export in the declaration contract with its signature and cardinality, an
annotated declaration, a step-by-step walkthrough for a new op, and a pitfall
checklist of the traps recorded in the code and the design doc.
Marked DO NOT MERGE for two reasons. It teaches from topk's declaration and
the runtime, which land in the tail commits of this stack, so it
forward-references code that is not in the prefix PRs under review; and the
contract it documents is still being changed by review feedback. Land it once
the ops it teaches from are landed, or split the design half forward into the
topk commit if that is more useful for review.
Authored with an AI assistant (Claude Code). The content was mined from the
original design doc and from the implementation, then fact-checked against the
tree: every quoted code block, file path, API name, command and env var was
verified, and the file is ASCII-only per repo rules. The performance tables are
quoted from the design doc and say so; they were measured on the prototype tree,
which declared 41 ops where this stack declares one.
Test Plan:
Documentation only. Verified mechanically rather than by test: