Helper for RecvTensor. Validates "key" and returns the source device in "*src_dev".
| 1016 | // Helper for RecvTensor. Validates "key" and returns the source |
| 1017 | // device in "*src_dev". |
| 1018 | Status RdmaTensorResponse::PrepareRecvTensor( |
| 1019 | const Rendezvous::ParsedKey& parsed, Device** src_dev) { |
| 1020 | // Figures out which device the tensor is hosted on. |
| 1021 | string local_name = DeviceNameUtils::LocalName(parsed.src_device); |
| 1022 | TF_RETURN_IF_ERROR(channel_->adapter_->worker_env_->device_mgr->LookupDevice( |
| 1023 | local_name, src_dev)); |
| 1024 | |
| 1025 | // Does the device have the right incarnation number we expect? |
| 1026 | if (0 != parsed.src_incarnation && |
| 1027 | (*src_dev)->attributes().incarnation() != parsed.src_incarnation) { |
| 1028 | return errors::Aborted( |
| 1029 | "RecvTensor expects a different device incarnation: ", |
| 1030 | parsed.src_incarnation, " vs. ", (*src_dev)->attributes().incarnation(), |
| 1031 | ". Your worker job (\"", |
| 1032 | channel_->adapter_->worker_env_->session_mgr->LegacySession() |
| 1033 | ->worker_name, |
| 1034 | "\") was probably restarted. Check your " |
| 1035 | "worker job for the reason why it was restarted."); |
| 1036 | } |
| 1037 | |
| 1038 | return Status::OK(); |
| 1039 | } |
| 1040 | |
| 1041 | void RdmaTensorResponse::RecvHandler(Rendezvous::ParsedKey parsed, |
| 1042 | const Rendezvous::Args& send_args, |
nothing calls this directly
no test coverage detected