-
Notifications
You must be signed in to change notification settings - Fork 766
Add aoti_torch_item_bool and aoti_torch_assign_tensors_out shims #16345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16345
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Unrelated FailureAs of commit d5c53ec with merge base 0f5a252 ( NEW FAILURES - The following jobs have failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Add two new shim implementations for the CUDA AOTI backend: 1. aoti_torch_item_bool: Extracts a boolean value from a 0D boolean tensor. Handles both CPU and CUDA tensors by using cudaPointerGetAttributes to determine the memory location and copying from device if needed. 2. aoti_torch_assign_tensors_out: Creates a new tensor view that shares the same underlying data as the source tensor. The new tensor has the same shape, strides, and dtype as the source. Also adds: - Declaration of aoti_torch_dtype_bool() in common_shims.h - Unit tests for both new functions - Update CMakeLists.txt with new test targets - Update targets.bzl with new test targets ghstack-source-id: de89b09 ghstack-comment-id: 3676249127 Pull-Request: #16345
Add two new shim implementations for the CUDA AOTI backend: 1. aoti_torch_item_bool: Extracts a boolean value from a 0D boolean tensor. Handles both CPU and CUDA tensors by using cudaPointerGetAttributes to determine the memory location and copying from device if needed. 2. aoti_torch_assign_tensors_out: Creates a new tensor view that shares the same underlying data as the source tensor. The new tensor has the same shape, strides, and dtype as the source. Also adds: - Declaration of aoti_torch_dtype_bool() in common_shims.h - Unit tests for both new functions - Update CMakeLists.txt with new test targets - Update targets.bzl with new test targets ghstack-source-id: 4aaf6d8 ghstack-comment-id: 3676249127 Pull-Request: #16345
Add two new shim implementations for the CUDA AOTI backend: 1. aoti_torch_item_bool: Extracts a boolean value from a 0D boolean tensor. Handles both CPU and CUDA tensors by using cudaPointerGetAttributes to determine the memory location and copying from device if needed. 2. aoti_torch_assign_tensors_out: Creates a new tensor view that shares the same underlying data as the source tensor. The new tensor has the same shape, strides, and dtype as the source. Also adds: - Declaration of aoti_torch_dtype_bool() in common_shims.h - Unit tests for both new functions - Update CMakeLists.txt with new test targets - Update targets.bzl with new test targets ghstack-source-id: 74b9474 ghstack-comment-id: 3676249127 Pull-Request: #16345
Add two new shim implementations for the CUDA AOTI backend: 1. aoti_torch_item_bool: Extracts a boolean value from a 0D boolean tensor. Handles both CPU and CUDA tensors by using cudaPointerGetAttributes to determine the memory location and copying from device if needed. 2. aoti_torch_assign_tensors_out: Creates a new tensor view that shares the same underlying data as the source tensor. The new tensor has the same shape, strides, and dtype as the source. Also adds: - Declaration of aoti_torch_dtype_bool() in common_shims.h - Unit tests for both new functions - Update CMakeLists.txt with new test targets - Update targets.bzl with new test targets ghstack-source-id: 845c6fa ghstack-comment-id: 3676249127 Pull-Request: #16345
Gasoonjia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR needs a
|
Add two new shim implementations for the CUDA AOTI backend:
aoti_torch_item_bool: Extracts a boolean value from a 0D boolean tensor.
Handles both CPU and CUDA tensors by using cudaPointerGetAttributes to
determine the memory location and copying from device if needed.
aoti_torch_assign_tensors_out: Creates a new tensor view that shares the
same underlying data as the source tensor. The new tensor has the same
shape, strides, and dtype as the source.
Also adds: