Skip to content

Commit 61c9cf7

Browse files
committed
Update on "[slimtensor] Add aoti_torch__reinterpret_tensor for SlimTensor"
Add SlimTensor-based `aoti_torch__reinterpret_tensor()` - Creates a reinterpreted view of a tensor with new sizes, strides, and storage offset using SlimTensor's `as_strided()` method. The view shares the same underlying storage. Differential Revision: [D90126249](https://our.internmc.facebook.com/intern/diff/D90126249/) [ghstack-poisoned]
2 parents 82f118d + cc6d3dd commit 61c9cf7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

backends/cuda/runtime/shims/memory_slim.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ AOTI_SHIM_EXPORT AOTITorchError aoti_torch_delete_tensor_object(Tensor* tensor);
103103
* @param new_handle Output parameter for the new tensor handle
104104
* @return AOTITorchError error code (Error::Ok on success)
105105
*/
106-
AOTI_SHIM_EXPORT AOTITorchError aoti_torch_new_tensor_handle(
107-
Tensor* orig_handle,
108-
Tensor** new_handle);
106+
AOTI_SHIM_EXPORT AOTITorchError
107+
aoti_torch_new_tensor_handle(Tensor* orig_handle, Tensor** new_handle);
109108

110109
/**
111110
* Creates a reinterpreted view of a tensor with new sizes, strides, and offset.

0 commit comments

Comments
 (0)