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.
| 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 |