mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Revert "[PyTorch] AOTI: add more basic aoti_torch getters (#112799)"
This reverts commit 3de2596abe.
Reverted https://github.com/pytorch/pytorch/pull/112799 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/112799#issuecomment-1852076887))
This commit is contained in:
parent
f98b0f3ebc
commit
bc51a0c22f
|
|
@ -113,12 +113,6 @@ AOTI_TORCH_EXPORT AOTITorchError aoti_torch_get_data_ptr(
|
|||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_storage_size(AtenTensorHandle tensor, int64_t* ret_size);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_dim(AtenTensorHandle tensor, int64_t* ret_dim);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_numel(AtenTensorHandle tensor, int64_t* ret_numel);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError aoti_torch_get_sizes(
|
||||
AtenTensorHandle tensor,
|
||||
int64_t** ret_sizes // returns borrowed reference
|
||||
|
|
@ -135,15 +129,6 @@ AOTI_TORCH_EXPORT AOTITorchError aoti_torch_get_strides(
|
|||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_stride(AtenTensorHandle tensor, int64_t d, int64_t* ret_stride);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_dtype(AtenTensorHandle tensor, int32_t* ret_dtype);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_device_type(AtenTensorHandle tensor, int32_t* ret_device_type);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError
|
||||
aoti_torch_get_device_index(AtenTensorHandle tensor, int32_t* ret_device_index);
|
||||
|
||||
AOTI_TORCH_EXPORT AOTITorchError aoti_torch_get_storage_offset(
|
||||
AtenTensorHandle tensor,
|
||||
int64_t* ret_storage_offset);
|
||||
|
|
|
|||
|
|
@ -145,22 +145,6 @@ AOTITorchError aoti_torch_get_storage_size(
|
|||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_dim(AtenTensorHandle tensor, int64_t* ret_dim) {
|
||||
AOTI_TORCH_CONVERT_EXCEPTION_TO_ERROR_CODE({
|
||||
at::Tensor* t = tensor_handle_to_tensor_pointer(tensor);
|
||||
*ret_dim = t->dim();
|
||||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_numel(
|
||||
AtenTensorHandle tensor,
|
||||
int64_t* ret_numel) {
|
||||
AOTI_TORCH_CONVERT_EXCEPTION_TO_ERROR_CODE({
|
||||
at::Tensor* t = tensor_handle_to_tensor_pointer(tensor);
|
||||
*ret_numel = t->numel();
|
||||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_sizes(
|
||||
AtenTensorHandle tensor,
|
||||
int64_t** ret_sizes) {
|
||||
|
|
@ -199,33 +183,6 @@ AOTITorchError aoti_torch_get_stride(
|
|||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_dtype(
|
||||
AtenTensorHandle tensor,
|
||||
int32_t* ret_dtype) {
|
||||
AOTI_TORCH_CONVERT_EXCEPTION_TO_ERROR_CODE({
|
||||
at::Tensor* t = tensor_handle_to_tensor_pointer(tensor);
|
||||
*ret_dtype = static_cast<int32_t>(t->scalar_type());
|
||||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_device_type(
|
||||
AtenTensorHandle tensor,
|
||||
int32_t* ret_device_type) {
|
||||
AOTI_TORCH_CONVERT_EXCEPTION_TO_ERROR_CODE({
|
||||
at::Tensor* t = tensor_handle_to_tensor_pointer(tensor);
|
||||
*ret_device_type = static_cast<int32_t>(t->device().type());
|
||||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_device_index(
|
||||
AtenTensorHandle tensor,
|
||||
int32_t* ret_device_index) {
|
||||
AOTI_TORCH_CONVERT_EXCEPTION_TO_ERROR_CODE({
|
||||
at::Tensor* t = tensor_handle_to_tensor_pointer(tensor);
|
||||
*ret_device_index = t->device().index();
|
||||
});
|
||||
}
|
||||
|
||||
AOTITorchError aoti_torch_get_storage_offset(
|
||||
AtenTensorHandle tensor,
|
||||
int64_t* ret_storage_offset) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user