Helper for RecvTensor. Validates "key" and returns the source device in "*src_dev".
| 450 | // Helper for RecvTensor. Validates "key" and returns the source |
| 451 | // device in "*src_dev". |
| 452 | Status Worker::PrepareRecvTensor(const Rendezvous::ParsedKey& parsed, |
| 453 | Device** src_dev) { |
| 454 | // Figures out which device the tensor is hosted on. |
| 455 | string local_name = DeviceNameUtils::LocalName(parsed.src_device); |
| 456 | TF_RETURN_IF_ERROR(env_->device_mgr->LookupDevice(local_name, src_dev)); |
| 457 | |
| 458 | // Does the device have the right incarnation number we expect? |
| 459 | if (0 != parsed.src_incarnation && |
| 460 | (*src_dev)->attributes().incarnation() != parsed.src_incarnation) { |
| 461 | return errors::Aborted( |
| 462 | "RecvTensor expects a different device incarnation: ", |
| 463 | parsed.src_incarnation, " vs. ", (*src_dev)->attributes().incarnation(), |
| 464 | ". Your worker job (\"", |
| 465 | env_->session_mgr->LegacySession()->worker_name, |
| 466 | "\") was probably restarted. Check your " |
| 467 | "worker job for the reason why it was restarted."); |
| 468 | } |
| 469 | |
| 470 | return Status::OK(); |
| 471 | } |
| 472 | |
| 473 | void Worker::RecvTensorAsync(CallOptions* opts, |
| 474 | const RecvTensorRequest* request, |
nothing calls this directly
no test coverage detected