Skip to content

Conversation

@pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #15857 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/65/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/65/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/65/orig
Differential Revision: D87254968
@diff-train-skip-merge

Pull Request resolved: #15857

# aoti_torch_new_tensor_handle Shim for Cuda Backend

## summary

This diff introduces the `aoti_torch_new_tensor_handle` shim for the CUDA backend. The shim is a wrapper around the `aoti_torch_new_tensor_handle` function, which creates a new tensor handle from an existing tensor, to unblock the custom triton kernel usage

The diff affects the following files:

*   `fbcode/executorch/backends/aoti/common_shims.h`: The function prototype is declared.
*   `fbcode/executorch/backends/apple/metal/runtime/shims/memory.cpp`: A fallback implementation is provided for the Apple Metal backend to keep its behavior.
*   `fbcode/executorch/backends/cuda/runtime/shims/tests/test_aoti_torch_new_tensor_handle.cpp`: A test file is added for the CUDA backend.
ghstack-source-id: 323864197
@exported-using-ghexport

Differential Revision: [D87254968](https://our.internmc.facebook.com/intern/diff/D87254968/)
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 18, 2025

🔗 Helpful Links

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

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

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 Nov 18, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@Gasoonjia Gasoonjia merged commit bee30ac into main Nov 18, 2025
151 of 153 checks passed
@Gasoonjia Gasoonjia deleted the gh/gasoonjia/65/orig branch November 18, 2025 00:54
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants