Home
last modified time | relevance | path

Searched refs:host_tensor (Results 1 – 11 of 11) sorted by relevance

/external/tensorflow/tensorflow/compiler/tf2xla/
Dliteral_util.cc25 Status HostTensorToBorrowingLiteral(const Tensor& host_tensor, in HostTensorToBorrowingLiteral() argument
28 TF_RETURN_IF_ERROR(TensorShapeToXLAShape(host_tensor.dtype(), in HostTensorToBorrowingLiteral()
29 host_tensor.shape(), &xla_shape)); in HostTensorToBorrowingLiteral()
30 return HostTensorToBorrowingLiteral(xla_shape, host_tensor, literal); in HostTensorToBorrowingLiteral()
34 const Tensor& host_tensor, in HostTensorToBorrowingLiteral() argument
36 const auto& tshape = host_tensor.shape(); in HostTensorToBorrowingLiteral()
42 static_cast<const char*>(DMAHelper::base(&host_tensor)), xla_shape); in HostTensorToBorrowingLiteral()
46 StatusOr<xla::Literal> HostTensorToLiteral(const Tensor& host_tensor) { in HostTensorToLiteral() argument
48 TF_RETURN_IF_ERROR(HostTensorToBorrowingLiteral(host_tensor, &literal)); in HostTensorToLiteral()
53 Tensor* host_tensor, xla::MutableBorrowingLiteral* literal) { in HostTensorToMutableBorrowingLiteral() argument
[all …]
Dliteral_util_test.cc32 Tensor host_tensor; in TEST() local
34 LiteralToHostTensor(int64_values_literal, DT_INT32, &host_tensor) in TEST()
37 LiteralToHostTensor(int64_values_literal, DT_QINT32, &host_tensor) in TEST()
40 LiteralToHostTensor(int64_values_literal, DT_INT64, &host_tensor).ok()); in TEST()
41 test::ExpectTensorEqual<int64_t>(host_tensor, in TEST()
58 Tensor host_tensor; in TYPED_TEST() local
63 DataTypeToEnum<int_type>::value, &host_tensor) in TYPED_TEST()
65 test::ExpectTensorEqual<int_type>(host_tensor, in TYPED_TEST()
70 &host_tensor) in TYPED_TEST()
73 test::ExpectTensorEqual<qint_type>(host_tensor, in TYPED_TEST()
[all …]
Dliteral_util.h31 Status HostTensorToBorrowingLiteral(const Tensor& host_tensor,
37 const Tensor& host_tensor,
42 StatusOr<xla::Literal> HostTensorToLiteral(const Tensor& host_tensor);
47 Tensor* host_tensor, xla::MutableBorrowingLiteral* literal);
52 const xla::Shape& xla_shape, Tensor* host_tensor,
68 DataType target_type, Tensor* host_tensor);
74 Tensor* host_tensor);
Dxla_op_kernel.h240 void SetConstantOutput(int index, const Tensor& host_tensor);
/external/tensorflow/tensorflow/core/tfrt/utils/
Dtensor_util.cc180 const auto& host_tensor = tensor_handle.GetAsyncTensor()->get<HostTensor>(); in CreateTFTensorFromTensorHandle() local
183 llvm::dyn_cast<tensorflow::KernelFallbackTensor>(&host_tensor)) { in CreateTFTensorFromTensorHandle()
187 if (llvm::isa<StringHostTensor>(host_tensor)) { in CreateTFTensorFromTensorHandle()
189 const auto& sht = llvm::cast<StringHostTensor>(host_tensor); in CreateTFTensorFromTensorHandle()
202 if (llvm::isa<DenseHostTensor>(host_tensor)) { in CreateTFTensorFromTensorHandle()
203 const auto& dht = llvm::cast<DenseHostTensor>(host_tensor); in CreateTFTensorFromTensorHandle()
/external/tensorflow/tensorflow/cc/experimental/libtf/tests/
Druntime_test.cc63 TF_ASSERT_OK_AND_ASSIGN(Tensor host_tensor, in TEST_P()
66 TF_ASSERT_OK_AND_ASSIGN(Tensor tensor, fn.Call<Tensor>(Tensor(host_tensor))); in TEST_P()
/external/tensorflow/tensorflow/compiler/mlir/tfrt/runtime_fallback/
Druntime_fallback_ops.td134 : (!tfd.tf_tensor, !tfrt.chain) -> (!dht.host_tensor, !tfrt.chain)
153 : (!tfd.tf_tensor, !tfrt.chain) -> (!dht.host_tensor, !tfrt.chain)
/external/tensorflow/tensorflow/core/tfrt/graph_executor/
Dgraph_executor.cc255 const auto& host_tensor = result->get<FallbackTensor>().tensor(); in GraphExecutionRunOnFunction() local
258 outputs->push_back(host_tensor); in GraphExecutionRunOnFunction()
/external/tensorflow/tensorflow/core/kernels/
Dresource_variable_ops.cc942 Tensor* host_tensor) { in CopyTensorToHost() argument
948 device_tensor.dtype(), device_tensor.shape(), host_tensor, alloc_attr)); in CopyTensorToHost()
952 stream->ThenMemcpy(host_tensor->flat<T>().data(), device_ptr, in CopyTensorToHost()
/external/tensorflow/tensorflow/core/common_runtime/gpu/
Dgpu_device.cc590 Tensor host_tensor(gpu_tensor.dtype(), gpu_tensor.shape()); in CopyGpuTensorToHostDebugOnly() local
592 ->ThenMemcpy(host_tensor.data(), in CopyGpuTensorToHostDebugOnly()
598 return host_tensor; in CopyGpuTensorToHostDebugOnly()
/external/tensorflow/tensorflow/core/common_runtime/
Ddirect_session_test.cc2475 Tensor host_tensor(dtype, {3}); in TestFeedAndFetchTensorsInDeviceMemory() local
2485 TF_ASSERT_OK(session->RunCallable(handle, {host_tensor}, &outputs, nullptr)) in TestFeedAndFetchTensorsInDeviceMemory()
2506 const StringPiece expected_data = host_tensor.tensor_data(); in TestFeedAndFetchTensorsInDeviceMemory()