Clear memory in singlel op graph after pre build

This commit is contained in:
tanghuikang 2021-02-25 21:51:20 +08:00
parent 9ab234369b
commit 4faadcfec6
1 changed files with 1 additions and 0 deletions

View File

@ -760,6 +760,7 @@ void AscendSession::BuildOpsInGraph(const GraphId &graph_id, const std::map<AnfN
BuildKernel(kernels);
// Record single op graphs in run_op_graphs_ so that these graphs can be reused in BuildOpImpl
for (const auto &single_op_graph : single_op_graphs) {
RunOpMemoryClear(single_op_graph.first.get());
for (const auto &graph_info : single_op_graph.second) {
run_op_graphs_[graph_info] = single_op_graph.first;
MS_LOG(DEBUG) << "Pre build op finished, graph info: " << graph_info;