Skip to content

Commit 82f118d

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 23a83fb + 77aba2a commit 82f118d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backends/cuda/runtime/shims/memory_slim.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ 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
107-
aoti_torch_new_tensor_handle(Tensor* orig_handle, Tensor** new_handle);
106+
AOTI_SHIM_EXPORT AOTITorchError aoti_torch_new_tensor_handle(
107+
Tensor* orig_handle,
108+
Tensor** new_handle);
108109

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

0 commit comments

Comments
 (0)