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

Method ~DirectSession

tensorflow/core/common_runtime/direct_session.cc:923–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

921}
922
923DirectSession::~DirectSession() {
924 if (!closed_) Close().IgnoreError();
925 for (auto& it : partial_runs_) {
926 it.second.reset(nullptr);
927 }
928 for (auto& it : executors_) {
929 it.second.reset();
930 }
931 callables_.clear();
932 for (auto d : device_mgr_->ListDevices()) {
933 d->op_segment()->RemoveHold(session_handle_);
934 }
935 functions_.clear();
936 delete cancellation_manager_;
937 for (const auto& p_and_owned : thread_pools_) {
938 if (p_and_owned.second) delete p_and_owned.first;
939 }
940
941 for (const auto& p_inter_and_intra : stage_subgraph_thread_pools_) {
942 delete p_inter_and_intra.first;
943 delete p_inter_and_intra.second;
944 }
945
946 execution_state_.reset(nullptr);
947 flib_def_.reset(nullptr);
948
949 delete device_mgr_;
950
951 if (multi_stream_shared_rmgr_) {
952 delete multi_stream_shared_rmgr_;
953 }
954}
955
956Status DirectSession::Create(const GraphDef& graph) {
957 return Create(GraphDef(graph));

Callers

nothing calls this directly

Calls 6

RemoveHoldMethod · 0.80
op_segmentMethod · 0.80
IgnoreErrorMethod · 0.45
resetMethod · 0.45
clearMethod · 0.45
ListDevicesMethod · 0.45

Tested by

no test coverage detected