23
23
#include < executorch/runtime/executor/method.h>
24
24
#include < executorch/runtime/platform/log.h>
25
25
26
- using exec_aten ::ArrayRef;
27
- using exec_aten ::Half;
28
- using exec_aten ::ScalarType;
29
- using exec_aten ::Tensor;
26
+ using executorch::aten ::ArrayRef;
27
+ using executorch::aten ::Half;
28
+ using executorch::aten ::ScalarType;
29
+ using executorch::aten ::Tensor;
30
30
using ::executorch::runtime::Error;
31
31
using ::executorch::runtime::EValue;
32
32
using ::executorch::runtime::Method;
@@ -67,16 +67,16 @@ TensorImpl impl_like(bundled_program_flatbuffer::Tensor* bundled_tensor) {
67
67
ScalarType scalar_type =
68
68
static_cast <ScalarType>(bundled_tensor->scalar_type ());
69
69
ssize_t dim = bundled_tensor->sizes ()->size ();
70
- exec_aten ::SizesType* sizes = bundled_tensor->mutable_sizes ()->data ();
70
+ executorch::aten ::SizesType* sizes = bundled_tensor->mutable_sizes ()->data ();
71
71
void * data = bundled_tensor->mutable_data ()->data ();
72
- exec_aten ::DimOrderType* dim_order =
72
+ executorch::aten ::DimOrderType* dim_order =
73
73
bundled_tensor->mutable_dim_order ()->data ();
74
74
75
75
// The strides of created tensorimpl will only be actually used when
76
76
// comparsion (`tensor_are_close` below). To eliminate the usage of memory
77
77
// allocator, here we set the initial strides as null and reconstruct the
78
78
// stride array as temporary varible when comparsion.
79
- exec_aten ::StridesType* strides = nullptr ;
79
+ executorch::aten ::StridesType* strides = nullptr ;
80
80
return TensorImpl (scalar_type, dim, sizes, data, dim_order, strides);
81
81
}
82
82
#endif
@@ -165,7 +165,7 @@ bool tensors_are_close(
165
165
166
166
// Contruct stride array for bundled tensor based on its dim order since
167
167
// strides of bundled_tensor in lean mode is null.
168
- exec_aten ::StridesType strides[kMaxDim ] = {0 };
168
+ executorch::aten ::StridesType strides[kMaxDim ] = {0 };
169
169
auto status = torch::executor::dim_order_to_stride (
170
170
bundled_tensor.sizes ().data (),
171
171
bundled_tensor.dim_order ().data (),
@@ -176,7 +176,7 @@ bool tensors_are_close(
176
176
177
177
// TODO(T132992348): support comparison between tensors of different strides
178
178
ET_CHECK_MSG (
179
- ArrayRef<exec_aten ::StridesType>(strides, bundled_tensor.dim ()) ==
179
+ ArrayRef<executorch::aten ::StridesType>(strides, bundled_tensor.dim ()) ==
180
180
method_output_tensor.strides (),
181
181
" The two inputs of `tensors_are_close` function shall have same strides" );
182
182
#endif
0 commit comments