未验证 提交 c3cd8502 编写于 作者: Z Zhang Jun 提交者: GitHub

[pass] Upgrade Constant Folding Pass (#49908)

上级 c18fddd3
......@@ -143,6 +143,10 @@ void ConstantFoldingPass::ApplyImpl(ir::Graph *graph) const {
}
out_desc->SetShape(out_shape);
out_desc->SetPersistable(true);
auto *var_desc_out = op_node->Op()->Block()->Var(out_name);
var_desc_out->SetShape(out_shape);
var_desc_out->SetPersistable(true);
var_desc_out->Flush();
auto *global_out_tensor =
scope->Var(out_name)->GetMutable<phi::DenseTensor>();
*global_out_tensor = *local_out_tensor;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册