未验证 提交 17c1dae9 编写于 作者: H hong 提交者: GitHub

Add no need output to gc check list (#34754)

* add not used output var to gc_check_list; test=develop

* add useless output to gc check list; test=develop
上级 79be8427
......@@ -500,6 +500,17 @@ class InterpreterCore {
}
vec_instruction_[i].next_instruction_.direct_run_ = filter_next;
// checkout ouput
for (auto& item : vec_instruction_[i].output_index_) {
for (auto id : item.second) {
if (input_var2op_info_[id].size() == 0) {
// output var not be used by any kernel
vec_instruction_[i].gc_check_var_list.push_back(id);
global_scope.vec_meta_info_[id].var_ref_count_++;
}
}
}
for (auto inst_id : filter_next) {
dependecy_count_[inst_id]++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册