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

Function TF_DeleteSession

tensorflow/c/c_api.cc:2243–2256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2241}
2242
2243void TF_DeleteSession(TF_Session* s, TF_Status* status) {
2244 status->status = Status::OK();
2245 if (s == nullptr) return;
2246 TF_Graph* const graph = s->graph;
2247 if (graph != nullptr) {
2248 graph->mu.lock();
2249 graph->sessions.erase(s);
2250 const bool del = graph->delete_requested && graph->sessions.empty();
2251 graph->mu.unlock();
2252 if (del) delete graph;
2253 }
2254 delete s->session;
2255 delete s;
2256}
2257
2258void TF_SessionRun(TF_Session* session, const TF_Buffer* run_options,
2259 const TF_Output* inputs, TF_Tensor* const* input_values,

Callers 6

CloseAndDeleteMethod · 0.85
GPUDeviceNameFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85

Calls 4

lockMethod · 0.45
eraseMethod · 0.45
emptyMethod · 0.45
unlockMethod · 0.45

Tested by 4

CloseAndDeleteMethod · 0.68
GPUDeviceNameFunction · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68