未验证 提交 8a6de610 编写于 作者: X xiongkun 提交者: GitHub

[dy2static] fix memory leakage problem in T5 model (#51100)

上级 5fdf7130
......@@ -252,6 +252,8 @@ class ConditionalBlockGradOp : public ConditionalOp {
AssignLocalGradientToParentScope(
dev_place, cur_scope, scope, inside_grads, outside_grads, inputs);
// Release the cur_scope, otherwise memory leakage occurs.
scope.DeleteScope(&cur_scope);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册