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

Method ExecutorDone

tensorflow/core/distributed_runtime/partial_run_mgr.cc:40–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void PartialRunMgr::ExecutorDone(int step_id, const Status& executor_status) {
41 StatusCallback done;
42 Status callback_status;
43 {
44 mutex_lock l(mu_);
45 auto run_it = step_id_to_partial_run_.find(step_id);
46 if (run_it == step_id_to_partial_run_.end()) {
47 return;
48 }
49 // If we found the partial_run, we call the final callback, if it
50 // exists.
51 // It is guaranteed that run_it->second->final_callback is left empty
52 // after the std::move call.
53 done = std::move(run_it->second->final_callback);
54 if (!executor_status.ok()) {
55 run_it->second->final_status = executor_status;
56 }
57 callback_status = run_it->second->final_status;
58 run_it->second->executor_done = true;
59 }
60 if (done != nullptr) {
61 done(callback_status);
62 mutex_lock l(mu_);
63 step_id_to_partial_run_.erase(step_id);
64 }
65}
66
67void PartialRunMgr::PartialRunDone(int step_id, StatusCallback done,
68 const Status& status) {

Callers 3

TESTFunction · 0.80
TEST_PFunction · 0.80
DoPartialRunGraphMethod · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45
okMethod · 0.45
eraseMethod · 0.45

Tested by 2

TESTFunction · 0.64
TEST_PFunction · 0.64