提交 9c92d030 编写于 作者: D dzhwinter

fix default value. test=develop

上级 a661d0bd
......@@ -235,7 +235,9 @@ void MemoryOptimizePass::RenameVarInGraphDesc(const std::string& var,
auto* op_desc = op->Op();
op_desc->RenameInput(var, cache_var);
op_desc->RenameOutput(var, cache_var);
if (op_desc->Block()->HasVar(var)) op_desc->Block()->RemoveVar(var);
if (op_desc->Block() != nullptr && op_desc->Block()->HasVar(var)) {
op_desc->Block()->RemoveVar(var);
}
op_desc->Flush();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册