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

Method RemoveHold

tensorflow/core/framework/op_segment.cc:84–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void OpSegment::RemoveHold(const string& session_handle) {
85 Item* item = nullptr;
86 {
87 mutex_lock l(mu_);
88 auto siter = sessions_.find(session_handle);
89 if (siter == sessions_.end()) {
90 VLOG(1) << "Session " << session_handle << " is not found.";
91 return;
92 }
93 item = siter->second;
94 if (--(item->num_holds) > 0) {
95 return;
96 } else {
97 sessions_.erase(siter);
98 }
99 }
100 delete item;
101}
102
103bool OpSegment::ShouldOwnKernel(FunctionLibraryRuntime* lib,
104 const string& node_op) {

Callers 3

TEST_FFunction · 0.80
~DirectSessionMethod · 0.80
~ItemMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 1

TEST_FFunction · 0.64