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

Function MakeTensorFromProto

tensorflow/core/framework/device_base.h:256–260  ·  view source on GitHub ↗

Materializes the given TensorProto into 'tensor' stored in Device memory. Most devices will want to override this. TODO(vrv): We should be able to put this function into OpKernelContext and handle the copies from device memory via send and receive nodes, instead of requiring that each device handle the copies here as well as in copy ops.

Source from the content-addressed store, hash-verified

254 // and receive nodes, instead of requiring that each device handle
255 // the copies here as well as in copy ops.
256 virtual Status MakeTensorFromProto(const TensorProto& tensor_proto,
257 const AllocatorAttributes alloc_attrs,
258 Tensor* tensor) {
259 return errors::Internal("Device does not implement MakeTensorFromProto()");
260 }
261
262 // Some devices (i.e. GPUs) may free device memory prior to its actual use
263 // being completed on the assumption that subsequent allocations can only be

Callers 6

MakeTensorFromProtoMethod · 0.85
gpu_device.ccFile · 0.85
ExecuteGraphMethod · 0.85
RegisterConstantNodeMethod · 0.85
RegisterPadNodeMethod · 0.85

Calls 1

InternalFunction · 0.85

Tested by 1

ExecuteGraphMethod · 0.68