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

Method FindOrCreate

tensorflow/core/distributed_runtime/partial_run_mgr.cc:22–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace tensorflow {
21
22bool PartialRunMgr::FindOrCreate(int step_id,
23 CancellationManager** cancellation_manager) {
24 mutex_lock l(mu_);
25 auto it = step_id_to_partial_run_.find(step_id);
26 if (it != step_id_to_partial_run_.end()) {
27 *cancellation_manager = it->second->cancellation_manager.get();
28 return false;
29 }
30
31 std::unique_ptr<PartialRunState> partial_run =
32 tensorflow::MakeUnique<PartialRunState>();
33 partial_run->cancellation_manager =
34 tensorflow::MakeUnique<CancellationManager>();
35 *cancellation_manager = partial_run->cancellation_manager.get();
36 step_id_to_partial_run_[step_id] = std::move(partial_run);
37 return true;
38}
39
40void PartialRunMgr::ExecutorDone(int step_id, const Status& executor_status) {
41 StatusCallback done;

Callers 7

TEST_FFunction · 0.45
TESTFunction · 0.45
TEST_PFunction · 0.45
DoPartialRunGraphMethod · 0.45
InitItemMethod · 0.45
ExecuteAsyncMethod · 0.45
RecvBufAsyncMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by 3

TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_PFunction · 0.36