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

Method ParseSlow

tensorflow/core/distributed_runtime/tensor_coding.cc:280–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280bool TensorResponse::ParseSlow(Source* source) {
281 if (!meta_.ParseFromZeroCopyStream(source->contents())) {
282 return false;
283 }
284
285 Tensor parsed(meta_.tensor().dtype());
286 if (!parsed.FromProto(allocator_, meta_.tensor())) {
287 return false;
288 }
289 tensor_ = std::move(parsed);
290
291 // Reduce memory usage for big tensors.
292 {
293 TensorProto empty;
294 meta_.mutable_tensor()->Swap(&empty);
295 }
296 meta_.clear_tensor();
297
298 return true;
299}
300
301void FuseTensorResponse::InitAlloc(DeviceBase* d,
302 const AllocatorAttributes& aa) {

Callers

nothing calls this directly

Calls 5

contentsMethod · 0.45
dtypeMethod · 0.45
tensorMethod · 0.45
FromProtoMethod · 0.45
SwapMethod · 0.45

Tested by

no test coverage detected