/aosp_15_r20/external/executorch/extension/tensor/test/ |
H A D | tensor_impl_ptr_test.cpp | 28 auto tensor_impl = make_tensor_impl_ptr({}, &scalar_data); in TEST_F() local 30 EXPECT_EQ(tensor_impl->numel(), 1); in TEST_F() 31 EXPECT_EQ(tensor_impl->dim(), 0); in TEST_F() 32 EXPECT_EQ(tensor_impl->sizes().size(), 0); in TEST_F() 33 EXPECT_EQ(tensor_impl->strides().size(), 0); in TEST_F() 34 EXPECT_EQ((float*)tensor_impl->data(), &scalar_data); in TEST_F() 35 EXPECT_EQ(((float*)tensor_impl->data())[0], 3.14f); in TEST_F() 39 auto tensor_impl = make_tensor_impl_ptr({}, {3.14f}); in TEST_F() local 41 EXPECT_EQ(tensor_impl->numel(), 1); in TEST_F() 42 EXPECT_EQ(tensor_impl->dim(), 0); in TEST_F() [all …]
|
/aosp_15_r20/external/executorch/extension/aten_util/test/ |
H A D | aten_bridge_test.cpp | 42 torch::executor::TensorImpl tensor_impl( in TEST() local 49 torch::executor::Tensor etensor(&tensor_impl); in TEST() 62 std::unique_ptr<torch::executor::TensorImpl> tensor_impl = in TEST() local 65 torch::executor::Tensor etensor(tensor_impl.get()); in TEST() 70 tensor_impl = std::make_unique<torch::executor::TensorImpl>( in TEST() 77 etensor = torch::executor::Tensor(tensor_impl.get()); in TEST() 94 torch::executor::TensorImpl tensor_impl( in TEST() local 101 torch::executor::Tensor etensor(&tensor_impl); in TEST() 119 torch::executor::TensorImpl tensor_impl( in TEST() local 126 torch::executor::Tensor etensor(&tensor_impl); in TEST() [all …]
|
/aosp_15_r20/external/executorch/extension/tensor/ |
H A D | tensor_ptr.cpp | 28 exec_aten::TensorImpl tensor_impl; member 36 exec_aten::TensorImpl&& tensor_impl, in Storage() 41 : tensor_impl(std::move(tensor_impl)), in Storage() 42 tensor(&this->tensor_impl), in Storage() 50 deleter(tensor_impl.mutable_data()); in ~Storage() 93 exec_aten::TensorImpl tensor_impl( in make_tensor_ptr() local 102 std::move(tensor_impl), in make_tensor_ptr() 121 auto tensor_impl = c10::make_intrusive<exec_aten::TensorImpl>( in make_tensor_ptr() local 125 tensor_impl->set_sizes_and_strides(sizes, strides); in make_tensor_ptr() 126 return std::make_shared<exec_aten::Tensor>(std::move(tensor_impl)); in make_tensor_ptr()
|
H A D | tensor_impl_ptr.cpp | 92 auto tensor_impl = std::make_unique<exec_aten::TensorImpl>( in make_tensor_impl_ptr() local 101 tensor_impl.release(), in make_tensor_impl_ptr() 122 auto tensor_impl = c10::make_intrusive<at::TensorImpl>( in make_tensor_impl_ptr() local 126 tensor_impl->set_sizes_and_strides(sizes, strides); in make_tensor_impl_ptr() 127 return tensor_impl; in make_tensor_impl_ptr()
|
/aosp_15_r20/external/executorch/runtime/executor/ |
H A D | tensor_parser_portable.cpp | 116 auto* tensor_impl = in parseTensor() local 120 new (tensor_impl) TensorImpl( in parseTensor() 133 tensor_impl->nbytes(), in parseTensor() 142 tensor_impl->set_data(data_ptr.get()); in parseTensor() 144 return Tensor(tensor_impl); in parseTensor()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/core/ |
H A D | UnsafeFromTH.h | 7 …auto tensor_impl = c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl>::reclaim(static_cast<Tensor… in unsafeTensorFromTH() local 8 if (retain && tensor_impl.get() != UndefinedTensorImpl::singleton()) { in unsafeTensorFromTH() 9 c10::raw::intrusive_ptr::incref(tensor_impl.get()); in unsafeTensorFromTH() 11 return Tensor(std::move(tensor_impl)); in unsafeTensorFromTH()
|
H A D | TensorBase.h | 99 c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl> tensor_impl) in TensorBase() argument 100 : impl_(std::move(tensor_impl)) { in TensorBase() 112 c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl> tensor_impl) { in wrap_tensor_impl() argument 113 TensorBase r(std::move(tensor_impl)); in wrap_tensor_impl()
|
/aosp_15_r20/external/executorch/kernels/portable/cpu/util/ |
H A D | broadcast_util.cpp | 58 auto tensor_impl = static_cast<TensorImpl*>(malloc(sizeof(TensorImpl))); in make_tensor() local 59 ET_CHECK_MSG(tensor_impl != nullptr, "Failed to malloc for data TensorImpl"); in make_tensor() 61 new (tensor_impl) TensorImpl( in make_tensor() 69 void* data_ptr = malloc(tensor_impl->nbytes()); in make_tensor() 71 tensor_impl->set_data(data_ptr); in make_tensor() 73 return Tensor{tensor_impl}; in make_tensor()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/templates/ |
H A D | Functions.cpp | 46 TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); in make_tensor() local 48 tensor_impl->set_sizes_and_strides(sizes_, *strides_); in make_tensor() 50 tensor_impl->set_sizes_contiguous(sizes_); in make_tensor() 53 tensor_impl->set_storage_offset(*storage_offset_); in make_tensor()
|
H A D | TensorBody.h | 107 c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl> tensor_impl) in Tensor() argument 108 : TensorBase(std::move(tensor_impl)) {} in Tensor() 119 c10::intrusive_ptr<TensorImpl, UndefinedTensorImpl> tensor_impl) { in wrap_tensor_impl() argument 120 return TensorBase::wrap_tensor_impl(std::move(tensor_impl)); in wrap_tensor_impl()
|
/aosp_15_r20/external/pytorch/torch/csrc/profiler/standalone/ |
H A D | execution_trace_observer.cpp | 363 const auto tensor_impl = tensor.unsafeGetTensorImpl(); in convertIValue() local 364 if (tensor.defined() && !tensor_impl->has_symbolic_sizes_strides()) { in convertIValue() 377 ExecutionTraceObserver::ID tensor_id = getObjectID(ob, tensor_impl); in convertIValue() 384 if (tensor_impl->has_storage() && in convertIValue() 385 !tensor_impl->has_symbolic_sizes_strides()) { in convertIValue() 386 auto& t_storage = tensor_impl->storage(); in convertIValue() 388 offset = tensor_impl->storage_offset(); in convertIValue() 389 numel = tensor_impl->numel(); in convertIValue() 390 itemsize = tensor_impl->itemsize(); in convertIValue() 391 device_str = tensor_impl->device().str(); in convertIValue()
|
/aosp_15_r20/external/pytorch/test/cpp_extensions/ |
H A D | open_registration_extension.cpp | 340 c10::TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); in unsafe_create_cpu_tensor_from_dummy_tensor() local 341 tensor_impl->set_sizes_and_strides(sizes_, strides_); in unsafe_create_cpu_tensor_from_dummy_tensor() 342 tensor_impl->set_storage_offset(storage_offset_); in unsafe_create_cpu_tensor_from_dummy_tensor() 423 at::TensorImpl* tensor_impl = self.unsafeGetTensorImpl(); in custom_resize_() local 424 tensor_impl->set_sizes_contiguous(size); in custom_resize_() 425 const auto itemsize = tensor_impl->dtype().itemsize(); in custom_resize_() 426 const auto offset = tensor_impl->storage_offset(); in custom_resize_() 431 at::native::maybe_resize_storage_cpu(tensor_impl, storage_size); in custom_resize_() 439 tensor_impl->empty_tensor_restride(memory_format); in custom_resize_()
|
H A D | maia_extension.cpp | 9 auto tensor_impl = c10::make_intrusive<TensorImpl, UndefinedTensorImpl>( in get_tensor() local 19 tensor_impl->set_sizes_contiguous(size); in get_tensor() 20 return Tensor(std::move(tensor_impl)); in get_tensor()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/test/ |
H A D | lazy_tensor_test.cpp | 6 auto tensor_impl = in LazyTensorTest() local 11 at::Tensor t(std::move(tensor_impl)); in LazyTensorTest()
|
H A D | xla_tensor_test.cpp | 34 auto tensor_impl = c10::make_intrusive<TensorImpl, UndefinedTensorImpl>( in TEST() local 38 at::Tensor t(std::move(tensor_impl)); in TEST()
|
H A D | extension_backend_test.cpp | 21 auto tensor_impl = c10::make_intrusive<TensorImpl, UndefinedTensorImpl>( in empty_override() local 30 return Tensor(std::move(tensor_impl)); in empty_override()
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/nested/cuda/ |
H A D | NestedTensorTransformerUtils.cpp | 177 const auto* tensor_impl = get_nested_tensor_impl(input_nestedtensor); in view_as_dense() local 178 Tensor storage_as_tensor = tensor_impl->get_unsafe_storage_as_tensor(); in view_as_dense() 182 tensor_impl->get_nested_strides().data_ptr<int64_t>(); in view_as_dense() 184 tensor_impl->get_storage_offsets().data_ptr<int64_t>(); in view_as_dense()
|
/aosp_15_r20/external/executorch/runtime/core/portable_type/ |
H A D | targets.bzl | 14 srcs = ["tensor_impl.cpp"], 20 "tensor_impl.h",
|
/aosp_15_r20/external/executorch/backends/apple/coreml/runtime/sdk/ |
H A D | model_event_logger_impl.mm | 155 auto tensor_impl = TensorImpl( 162 auto tensor = Tensor(&tensor_impl);
|
/aosp_15_r20/external/pytorch/torch/csrc/autograd/ |
H A D | python_variable.cpp | 374 c10::TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); in THPVariable_tryResurrect() local 375 auto maybe_pyobj = tensor_impl->pyobj_slot()->check_pyobj( in THPVariable_tryResurrect() 383 tensor_impl->pyobj_slot()->set_owns_pyobj(true); in THPVariable_tryResurrect() 855 TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); in THPVariable_make_wrapper_subclass() local 858 tensor_impl->set_sizes_and_strides( in THPVariable_make_wrapper_subclass() 864 tensor_impl->generic_set_sizes_contiguous(sym_sizes); in THPVariable_make_wrapper_subclass()
|
/aosp_15_r20/external/executorch/devtools/etdump/ |
H A D | scalar_type.fbs | 10 // Must match executorch/runtime/core/portable_type/tensor_impl.h
|
/aosp_15_r20/external/executorch/devtools/bundled_program/schema/ |
H A D | scalar_type.fbs | 10 // Must match executorch/runtime/core/portable_type/tensor_impl.h
|
/aosp_15_r20/external/executorch/schema/ |
H A D | scalar_type.fbs | 10 // Must match executorch/runtime/core/portable_type/tensor_impl.h
|
/aosp_15_r20/external/executorch/extension/flat_tensor/ |
H A D | scalar_type.fbs | 11 // Must match executorch/runtime/core/portable_type/tensor_impl.h
|
/aosp_15_r20/external/executorch/backends/apple/coreml/runtime/test/ |
H A D | CoreMLBackendDelegateTests.mm | 110 …executorch::aten::TensorImpl tensor_impl(tensor_meta->scalar_type(), std::size(sizes), const_cast<… 111 executorch::aten::Tensor tensor(&tensor_impl);
|