Home
last modified time | relevance | path

Searched refs:TensorHandle (Results 1 – 25 of 74) sorted by relevance

123

/external/tensorflow/tensorflow/core/common_runtime/eager/
Dtensor_handle.cc67 TensorHandle::PackedTensorHandleData::PackedTensorHandleData( in PackedTensorHandleData()
68 std::vector<TensorHandle*>&& handles, const TensorShape& shape) in PackedTensorHandleData()
75 TensorHandle::PackedTensorHandleData::~PackedTensorHandleData() { in ~PackedTensorHandleData()
81 Status TensorHandle::PackedTensorHandleData::Shape(TensorShape* shape) const { in Shape()
86 Status TensorHandle::PackedTensorHandleData::NumDims(int* num_dims) const { in NumDims()
91 Status TensorHandle::PackedTensorHandleData::Dim(int dim_index, in Dim()
97 Status TensorHandle::PackedTensorHandleData::NumElements( in NumElements()
103 Status TensorHandle::PackedTensorHandleData::Unprotect() { in Unprotect()
111 bool TensorHandle::PackedTensorHandleData::IsReady() const { in IsReady()
126 Status TensorHandle::PackedTensorHandleData::WaitReady( in WaitReady()
[all …]
Dtensor_handle.h56 class TensorHandle : public ImmediateExecutionTensorHandle {
58 TensorHandle(tensorflow::Tensor&& t, Device* d, Device* op_device,
61 TensorHandle(tensorflow::Tensor&& t, Device* d, Device* op_device,
63 TensorHandle(Device* d, Device* op_device, Device* resource_device,
67 TensorHandle(int64_t op_id, int32_t output_num, const string& remote_task,
70 TensorHandle(int64_t op_id, int32_t output_num, tensorflow::DataType dtype,
76 static TensorHandle* CreateLocalHandle(const tensorflow::Tensor& t);
77 static TensorHandle* CreateLocalHandle(tensorflow::Tensor&& t, Device* d,
79 static TensorHandle* CreateLocalHandle(tensorflow::Tensor&& t, Device* d,
83 static TensorHandle* CreateEmptyLocalHandle(Device* d, Device* op_device,
[all …]
Dtensor_handle_test.cc43 TensorHandle* sync_th = in TEST()
44 TensorHandle::CreateLocalHandle(std::move(t), nullptr, nullptr, ctx); in TEST()
45 TensorHandle* async_th = TensorHandle::CreateEmptyLocalHandle( in TEST()
124 bool IsReady(TensorHandle* handle) const { return handle->IsReady(); } in IsReady()
145 std::vector<TensorHandle*> handles; in TEST_F()
148 TensorHandle* h0 = in TEST_F()
149 TensorHandle::CreateLocalHandle(std::move(t0), d0, d0, d0, context()); in TEST_F()
154 TensorHandle* h1 = in TEST_F()
155 TensorHandle::CreateLocalHandle(std::move(t1), d1, d1, d1, context()); in TEST_F()
162 TensorHandle* h2 = TensorHandle::CreateUnshapedRemoteHandle( in TEST_F()
[all …]
Dexecute_node.cc23 TensorHandle* handle) { in IsRemote()
25 if (handle->Type() == TensorHandle::REMOTE || in IsRemote()
38 TensorHandle* packed_handle) { in InitPackedHandle()
43 TensorHandle* h = nullptr; in InitPackedHandle()
54 if (h->Type() == TensorHandle::PACKED) { in InitPackedHandle()
65 EagerContext* ctx, const gtl::InlinedVector<TensorHandle*, 4>& op_inputs, in Init() argument
74 TensorHandle* const* op_inputs_flat = &op_inputs[0]; in Init()
77 TensorHandle* in = op_inputs_flat[i]; in Init()
86 if (in->Type() != TensorHandle::PACKED) { in Init()
104 TensorHandle* h = op_inputs[index.index]; in Init()
[all …]
Dexecute_node.h55 const absl::InlinedVector<TensorHandle*, 4>& op_inputs,
75 bool IsRemote(EagerContext* ctx, Device* input_device, TensorHandle* handle);
80 Device* input_device, TensorHandle* packed_handle);
95 const absl::InlinedVector<TensorHandle*, 4>& inputs, in ExecuteNode() argument
100 absl::Span<TensorHandle*> retvals, in ExecuteNode()
114 for (TensorHandle* h : inputs_) { in Run()
139 const absl::InlinedVector<TensorHandle*, 4>& inputs_;
144 absl::Span<TensorHandle*> retvals_;
151 const absl::InlinedVector<TensorHandle*, 4>& inputs, in AsyncExecuteNode() argument
156 absl::Span<TensorHandle*> retvals, in AsyncExecuteNode()
[all …]
Dexecute_node_test.cc93 TensorHandle* h0 = in TEST()
94 TensorHandle::CreateLocalHandle(std::move(t0), device0, device0, ctx); in TEST()
97 TensorHandle* h1 = in TEST()
98 TensorHandle::CreateLocalHandle(std::move(t1), device0, device0, ctx); in TEST()
100 TensorHandle* h2 = TensorHandle::CreateLazyRemoteHandle( in TEST()
102 TensorHandle* h3 = TensorHandle::CreateLazyRemoteHandle( in TEST()
105 TensorHandle* packed_h = nullptr; in TEST()
106 TF_ASSERT_OK(TensorHandle::CreatePackedHandle({h1, h2}, ctx, &packed_h)); in TEST()
109 absl::InlinedVector<TensorHandle*, 4> inputs = {h0, packed_h, h3}; in TEST()
Dcore.cc37 AbstractTensorInterface* TensorHandle::Resolve(Status* status) { in Resolve()
44 TensorHandle* h_cpu = nullptr; in Resolve()
118 TensorHandle* input = TensorHandleFromInterface(handle); in CopyTensorHandleToDevice()
121 reinterpret_cast<tensorflow::TensorHandle**>(&result)); in CopyTensorHandleToDevice()
135 return TensorHandle::CreateLocalHandle(std::move(tensor), /*d=*/HostCPU(), in CreateLocalHandle()
143 return TensorHandle::CreateLocalHandle(std::move(t), /*d=*/HostCPU(), in CreateLocalHandleFromTFTensor()
148 return TensorHandle::CreateLocalHandle(std::move(t), /*d=*/d, in CreateLocalHandleFromTFTensor()
178 if (TensorHandle::classof(handle)) { in Execute()
179 TF_RETURN_IF_ERROR(down_cast<TensorHandle*>(handle)->WaitUnknownDevice()); in Execute()
202 tensorflow::TensorHandle** retval_array = in Execute()
[all …]
Dexecute.h45 Status EagerExecute(EagerOperation* op, TensorHandle** retvals,
51 EagerContext* ctx, const absl::InlinedVector<TensorHandle*, 4>& op_inputs,
55 absl::Span<TensorHandle*> retvals,
63 Status EagerCopyToDevice(TensorHandle* h, EagerContext* ctx,
65 TensorHandle** result);
85 void EagerLocalExecuteAsync(EagerOperation* op, TensorHandle** retvals,
Dcopy_to_device_node.h29 CopyToDeviceNode(TensorHandle* src, TensorHandle* dst, Device* dstd, in CopyToDeviceNode()
80 TensorHandle* dst() { return dst_; } in dst()
83 TensorHandle* src_;
84 TensorHandle* dst_;
Dexecute.cc124 TensorHandle* handle, // op->Inputs()[i] in CopyInputToExpectedDevice()
127 TensorHandle** result) { in CopyInputToExpectedDevice()
181 TensorHandle* result_handle = nullptr; in CopyInputToExpectedDevice()
221 const absl::InlinedVector<TensorHandle*, 4>* handles; in ValidateInputTypeAndPlacement()
224 TensorHandle* handle = (*handles)[i]; in ValidateInputTypeAndPlacement()
226 if (!kernel->IsFunction() && handle->Type() == TensorHandle::PACKED) { in ValidateInputTypeAndPlacement()
232 TensorHandle* h = nullptr; in ValidateInputTypeAndPlacement()
244 !is_function || handle->Type() != TensorHandle::REMOTE; in ValidateInputTypeAndPlacement()
322 TensorHandle* tensor_handle, Device** result) { in GetDeviceForInput()
325 if (tensor_handle->Type() != TensorHandle::LOCAL) { in GetDeviceForInput()
[all …]
/external/tensorflow/tensorflow/cc/experimental/base/public/
Dtensorhandle.h37 class TensorHandle {
45 static TensorHandle FromTensor(const Tensor& tensor, const Runtime& runtime,
49 TensorHandle(TensorHandle&&) = default;
50 TensorHandle& operator=(TensorHandle&&) = default;
54 explicit TensorHandle(TFE_TensorHandle* handle) : handle_(handle) {} in TensorHandle() function
57 TensorHandle(const TensorHandle&) = delete;
58 TensorHandle& operator=(const TensorHandle&) = delete;
74 inline Tensor TensorHandle::Resolve(Status* status) { in Resolve()
83 inline TensorHandle TensorHandle::FromTensor(const Tensor& tensor, in FromTensor()
89 return TensorHandle(nullptr); in FromTensor()
[all …]
/external/tensorflow/tensorflow/go/
Dtensor_handle.go42 type TensorHandle struct { struct
47 func NewTensorHandle(t *Tensor) (*TensorHandle, error) {
54 th := &TensorHandle{c: cHandle}
55 runtime.SetFinalizer(th, (*TensorHandle).finalizer)
59 func (th *TensorHandle) finalizer() { argument
64 func newTensorHandleFromC(c *C.TFE_TensorHandle) *TensorHandle {
65 th := &TensorHandle{c: c}
66 runtime.SetFinalizer(th, (*TensorHandle).finalizer)
71 func (th *TensorHandle) DataType() DataType { argument
76 func (th *TensorHandle) Shape() ([]int64, error) { argument
[all …]
/external/armnn/include/armnn/backends/
DTensorHandle.hpp79 class TensorHandle : public ConstTensorHandle class
96 TensorHandle(const TensorInfo& tensorInfo);
106 TensorHandle(const TensorHandle& other) = delete;
107 TensorHandle& operator=(const TensorHandle& other) = delete;
112 void* TensorHandle::GetTensor<void>() const;
115 class ScopedTensorHandle : public TensorHandle
147 class PassthroughTensorHandle : public TensorHandle
151 : TensorHandle(tensorInfo) in PassthroughTensorHandle()
185 void* TensorHandle::GetTensor() const;
/external/tensorflow/tensorflow/core/distributed_runtime/eager/
Dremote_mgr_test.cc75 TensorHandle* handle = TensorHandle::CreateLocalHandle( in TEST_F()
98 TensorHandle* handle = TensorHandle::CreateLazyRemoteHandle( in TEST_F()
114 TensorHandle* handle = TensorHandle::CreateLocalHandle( in TEST_F()
139 TensorHandle* handle = TensorHandle::CreateUnshapedRemoteHandle( in TEST_F()
148 handle = TensorHandle::CreateUnshapedRemoteHandle( in TEST_F()
162 TensorHandle* handle = TensorHandle::CreateLazyRemoteHandle( in TEST_F()
177 TensorHandle* out; in TEST_F()
Dremote_mgr.h46 const gtl::ArraySlice<tensorflow::TensorHandle*> handles,
49 void AddOperationOutput(tensorflow::TensorHandle* handles,
53 tensorflow::TensorHandle** handle);
69 TensorHandle* in, const bool wait_until_ready, RemoteTensorHandle* out,
76 TensorHandle** out);
89 Status GetRemoteTensorHandle(const tensorflow::TensorHandle* handle,
95 tensorflow::TensorHandle** handle)
105 gtl::FlatMap<RemoteTensorHandleInternal, tensorflow::TensorHandle*,
Dremote_copy_node.h64 RemoteCopyNode(EagerContext* ctx, EagerExecutor* executor, TensorHandle* src,
65 TensorHandle* dst, Device* recv_device, uint64 recv_op_id);
133 explicit CapturedSharedState(TensorHandle* d) : dst_(d) { dst_->Ref(); } in CapturedSharedState()
151 TensorHandle* dst() { return dst_; } in dst()
155 TensorHandle* const dst_;
164 TensorHandle* const src_;
Dremote_mgr.cc44 const gtl::ArraySlice<tensorflow::TensorHandle*> handles, in AddOperationOutputs()
54 void RemoteMgr::AddOperationOutput(tensorflow::TensorHandle* handle, in AddOperationOutput()
63 tensorflow::TensorHandle** handle) { in GetTensorHandleImpl()
84 tensorflow::TensorHandle** handle) { in GetTensorHandle()
111 Status RemoteMgr::GetRemoteTensorHandle(const tensorflow::TensorHandle* handle, in GetRemoteTensorHandle()
116 tensorflow::TensorHandle* h; in GetRemoteTensorHandle()
152 TensorHandle* in, const bool wait_until_ready, RemoteTensorHandle* out, in SerializeRemoteTensorHandle()
183 TensorHandle** out) { in DeserializeRemoteTensorHandle()
196 *out = TensorHandle::CreateLazyRemoteHandle(in.op_id(), in.output_num(), in DeserializeRemoteTensorHandle()
Dremote_execute_node.h46 const gtl::InlinedVector<TensorHandle*, 4>& inputs, in RemoteExecuteNode() argument
47 absl::Span<TensorHandle*> retvals) in RemoteExecuteNode()
73 for (const TensorHandle* input : inputs_) { in RemoteExecuteNode()
135 gtl::InlinedVector<TensorHandle*, 4> inputs_;
136 gtl::InlinedVector<TensorHandle*, 2> retvals_;
Deager_service_impl.cc117 tensorflow::TensorHandle* handle; in GetEagerOperationAndNumRetvals()
129 handle = TensorHandle::CreateLocalHandle(std::move(tensor), nullptr, in GetEagerOperationAndNumRetvals()
148 Status TensorHandleProto(TensorHandle* handle, TensorProto* proto) { in TensorHandleProto()
155 Status TensorHandleShape(TensorHandle* handle, TensorShapeProto* proto) { in TensorHandleShape()
159 if (handle->Type() == TensorHandle::LOCAL) { in TensorHandleShape()
174 const std::vector<int32>& output_nums, TensorHandle** retvals, in AddOpRetvalsToResponse()
197 if (retvals[i]->Type() == TensorHandle::REMOTE) { in AddOpRetvalsToResponse()
511 auto* retvals = new absl::FixedArray<TensorHandle*>(*num_retvals); in RunComponentFunction()
566 absl::FixedArray<tensorflow::TensorHandle*> retvals(num_retvals); in ExecuteOp()
716 tensorflow::gtl::InlinedVector<tensorflow::TensorHandle*, 2> tensors; in SendTensor()
[all …]
/external/tensorflow/tensorflow/python/ops/
Dsession_ops.py38 class TensorHandle: class
131 return feeder.op.name + ";" + TensorHandle._get_reader_key(handle)
210 handle_device = TensorHandle._get_device_name(handle)
235 handle_device = TensorHandle._get_device_name(handle)
252 graph_key = TensorHandle._get_reader_key(handle)
256 handle_device = TensorHandle._get_device_name(handle)
271 handle_device = TensorHandle._get_device_name(handle)
275 graph_key = TensorHandle._get_mover_key(feeder, handle)
292 handle_device = TensorHandle._get_device_name(handle)
/external/tensorflow/tensorflow/c/experimental/saved_model/core/revived_types/
Dvariable.cc89 std::vector<TensorHandle*> handles; in CreateUninitialized()
95 if (!tensorflow::isa<TensorHandle>(handlePtr.get())) { in CreateUninitialized()
98 handles.push_back(reinterpret_cast<TensorHandle*>(handlePtr.release())); in CreateUninitialized()
100 TensorHandle* packed_handle; in CreateUninitialized()
101 TF_RETURN_IF_ERROR(TensorHandle::CreatePackedHandle( in CreateUninitialized()
108 TensorHandle* component; in CreateUninitialized()
/external/armnn/src/backends/backendsCommon/
DTensorHandle.cpp43 TensorHandle::TensorHandle(const TensorInfo& tensorInfo) in TensorHandle() function in armnn::TensorHandle
50 void* TensorHandle::GetTensor<void>() const in GetTensor()
56 : TensorHandle(tensorInfo) in ScopedTensorHandle()
73 : TensorHandle(other.GetTensorInfo()) in ScopedTensorHandle()
/external/tensorflow/tensorflow/cc/experimental/base/tests/
Dtensorhandle_test.cc38 using tensorflow::experimental::cc::TensorHandle;
68 TensorHandle handle = in TYPED_TEST()
69 TensorHandle::FromTensor(original_tensor, *runtime, &status); in TYPED_TEST()
110 TensorHandle handle = in TYPED_TEST()
111 TensorHandle::FromTensor(original_tensor, *runtime, &status); in TYPED_TEST()
160 TensorHandle handle = in TYPED_TEST()
161 TensorHandle::FromTensor(original_tensor, *runtime, &status); in TYPED_TEST()
/external/tensorflow/tensorflow/core/tfrt/utils/
Dtensor_util.h31 AsyncValueRef<TensorHandle> TFTensorToTFRTTensorHandle(
35 tensorflow::StatusOr<TensorHandle> CreateTensorHandleFromTFTensor(
40 const TensorHandle& tensor_handle);
Dtensor_util.cc134 AsyncValueRef<TensorHandle> TFTensorToTFRTTensorHandle( in TFTensorToTFRTTensorHandle()
138 return MakeAvailableAsyncValueRef<TensorHandle>( in TFTensorToTFRTTensorHandle()
143 StatusOr<TensorHandle> CreateTensorHandleFromTFTensor( in CreateTensorHandleFromTFTensor()
160 return TensorHandle(host->GetHostDeviceRef(), metadata, std::move(sht_ref)); in CreateTensorHandleFromTFTensor()
171 return TensorHandle(host->GetHostDeviceRef(), metadata, std::move(dht_ref)); in CreateTensorHandleFromTFTensor()
175 const TensorHandle& tensor_handle) { in CreateTFTensorFromTensorHandle()

123