MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeTensorFromProto

Method MakeTensorFromProto

tensorflow/core/kernels/hexagon/graph_transferer.cc:1100–1111  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

1098}
1099
1100/* static */ Status GraphTransferer::MakeTensorFromProto(
1101 const TensorProto& tensor_proto, Tensor* tensor) {
1102 if (tensor_proto.dtype() > 0 && tensor_proto.dtype() <= DataType_MAX) {
1103 Tensor parsed(tensor_proto.dtype());
1104 if (parsed.FromProto(cpu_allocator(), tensor_proto)) {
1105 *tensor = parsed;
1106 return Status::OK();
1107 }
1108 }
1109 return errors::InvalidArgument("Cannot parse tensor from proto: ",
1110 tensor_proto.DebugString());
1111}
1112
1113void GraphTransferer::ClearCache() {
1114 node_name_cache_list_.clear();

Callers 4

_HostConstantOpMethod · 0.45
SummaryImageOpMethod · 0.45
ConstantOpMethod · 0.45
ComputeMethod · 0.45

Calls 5

cpu_allocatorFunction · 0.85
InvalidArgumentFunction · 0.85
dtypeMethod · 0.45
FromProtoMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected