| 383 | } |
| 384 | |
| 385 | Status TensorHandle::AddRemoteMirror(std::unique_ptr<RemoteTensorHandleData> t, |
| 386 | Device* d) { |
| 387 | mutex_lock l(remote_mirrors_mutex_); |
| 388 | auto ret = remote_mirrors_.insert(std::make_pair(d, std::move(t))); |
| 389 | if (!ret.second) { |
| 390 | return errors::Internal("Attempted to duplicate a remote mirror."); |
| 391 | } |
| 392 | |
| 393 | return Status::OK(); |
| 394 | } |
| 395 | |
| 396 | Status TensorHandle::SetRemoteShape(const TensorShape& shape, |
| 397 | tensorflow::Device* d) { |