Skip to content

Conversation

@larryliu0820
Copy link
Contributor

@larryliu0820 larryliu0820 commented Sep 30, 2025

Stack from ghstack (oldest at bottom):

Summary:

This diff introduce aoti_torch_delete_tensor_object for deleting tensors created during cuda backend inference.

Reviewed By:

Summary:

This diff introduce `aoti_torch_delete_tensor_object` for deleting tensors created during cuda backend inference.

Reviewed By:

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 30, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit 49602cd with merge base db8d04f (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 30, 2025
@larryliu0820 larryliu0820 added the release notes: desktop for desktop/laptop workstream label Sep 30, 2025
@larryliu0820 larryliu0820 merged commit ac2cc6c into gh/larryliu0820/76/base Sep 30, 2025
131 of 141 checks passed
@larryliu0820 larryliu0820 deleted the gh/larryliu0820/76/head branch September 30, 2025 16:59
@pytorchbot pytorchbot mentioned this pull request Sep 30, 2025
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
Summary:

This diff introduce `aoti_torch_delete_tensor_object` for deleting tensors created during cuda backend inference.

Reviewed By:

ghstack-source-id: 9b47d11
Pull Request resolved: #14686
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
This PR was created by the merge bot to help merge the original PR into
the main branch.
ghstack PR number: #14686 by
@larryliu0820
^ 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/larryliu0820/76/base
ghstack PR head:
https://github.com/pytorch/executorch/tree/gh/larryliu0820/76/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head:
https://github.com/pytorch/executorch/tree/gh/larryliu0820/76/orig

@diff-train-skip-merge

Co-authored-by: Mengwei Liu <[email protected]>
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at
bottom):
* #14690
* #14689
* #14688
* __->__ #14687
* #14686

Summary:

This function introduce aoti_torch_create_tensor_from_blob_v2, a
function that create tensor from data blob and custom stride and size.

Worth to notice that unlike aoti_torch_empty_strided, the tensor created
by aoti_torch_create_tensor_from_blob_v2 will not have the control of
the memory blob. Therefore when we delete it, the memory will not be
freed.

Reviewed By:

Differential Revision:
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at
bottom):
* #14690
* #14689
* #14688
* __->__ #14700
* #14686

Summary:
This is a manual cherry pick of #14687 

This function introduce aoti_torch_create_tensor_from_blob_v2, a
function that create tensor from data blob and custom stride and size.

Worth to notice that unlike aoti_torch_empty_strided, the tensor created
by aoti_torch_create_tensor_from_blob_v2 will not have the control of
the memory blob. Therefore when we delete it, the memory will not be
freed.

Reviewed By:

Differential Revision:
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at
bottom):
* #14690
* #14689
* __->__ #14688
* #14687
* #14686

Summary:

Introduced aoti_torch__reinterpret_tensor, which creates a new tensor
view that reinterprets the same underlying memory with custom shape and
strides.

Reviewed By:

Differential Revision:
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at
bottom):
* #14690
* __->__ #14689
* #14688
* #14687
* #14686

Summary:

This diff introduce `aoti_torch_copy_`, the function for copying tensor
inside cuda backend.

Right now it only support copy between tensors with same dtype.

Reviewed By:

Differential Revision:
larryliu0820 added a commit that referenced this pull request Sep 30, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at
bottom):
* __->__ #14690
* #14689
* #14688
* #14687
* #14686

Summary:

this is a comprehensive update to use ET_CHECK macro to replace original
if..else check for better follow et's law

Reviewed By:

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: desktop for desktop/laptop workstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants