[slimtensor] Add aoti_torch_new_tensor_handle for SlimTensor#16926
Merged
[slimtensor] Add aoti_torch_new_tensor_handle for SlimTensor#16926
Conversation
Pull Request resolved: #16448 Add `aoti_torch_delete_tensor_object()` - Deletes a tensor object. SlimTensor uses SharedPtr-based reference counting, so simply deleting the tensor automatically handles storage deallocation when the last reference is removed. ghstack-source-id: 336294935 @exported-using-ghexport Differential Revision: [D90126248](https://our.internmc.facebook.com/intern/diff/D90126248/)
Pull Request resolved: #16449 Add `aoti_torch_new_tensor_handle()` - Creates a new tensor handle that shares storage with the original tensor. Uses SlimTensor's copy constructor which shares the SharedPtr<Storage>, so both tensors reference the same memory. ghstack-source-id: 336304835 @exported-using-ghexport Differential Revision: [D90126245](https://our.internmc.facebook.com/intern/diff/D90126245/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16926
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 117 PendingAs of commit 2b9c3e1 with merge base d136471 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Gasoonjia
approved these changes
Jan 28, 2026
This PR needs a
|
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.
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #16449 by @Gasoonjia
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/91/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/91/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/90/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/91/orig
Differential Revision: D90126245
@diff-train-skip-merge