MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / Close

Method Close

oneflow/core/framework/nn_graph.cpp:108–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108Maybe<void> NNGraph::Close() {
109 if (!is_closed_) {
110 VLOG(1) << "Try to close c nn graph name " << name_ << "." << std::endl;
111 CloseRuntimeBuffers();
112 runtime_.reset();
113 session_ctx_->RemoveGraphFreeEagerTensors(name_);
114 VLOG(1) << "Finish close c nn graph name " << name_ << "." << std::endl;
115
116 session_ctx_.reset();
117 is_closed_ = true;
118 }
119 return Maybe<void>::Ok();
120}
121
122const std::vector<std::string>& NNGraph::inputs_op_names() const { return inputs_op_names_; }
123

Callers 1

CloseRuntimeBuffersMethod · 0.45

Calls 2

resetMethod · 0.45

Tested by

no test coverage detected