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

Method Run

tensorflow/core/distributed_runtime/eager/remote_copy_node.cc:316–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316Status RemoteCopyNode::Run() {
317 if (ctx_->UseSendTensorRPC() && send_device_->IsLocal() &&
318 !recv_device_->IsLocal()) {
319 return StartRemoteSendTensor();
320 }
321 Status s = StartSend();
322 if (!s.ok()) {
323 Abort(s);
324 return s;
325 }
326
327 // StartRecv() takes care of doing the right thing to dst handle.
328 // No need to poison it after this point.
329 s = StartRecv();
330 if (!s.ok() && errors::IsCancelled(s)) {
331 Status send_status = captured_state_->GetSendStatus();
332 if (!send_status.ok()) {
333 // In this case, Recv is cancelled because the Send op failed. Return the
334 // status of the Send op instead.
335 s = send_status;
336 }
337 }
338
339 src_->Unref();
340 ctx_->Unref();
341 return s;
342}
343
344void RemoteCopyNode::Abort(Status status) {
345 captured_state_->dst()->Poison(status);

Callers 4

RunLocalSendMethod · 0.45
RunLocalRecvMethod · 0.45
EnqueueMethod · 0.45

Calls 6

AbortFunction · 0.85
UseSendTensorRPCMethod · 0.80
GetSendStatusMethod · 0.80
IsLocalMethod · 0.45
okMethod · 0.45
UnrefMethod · 0.45

Tested by

no test coverage detected