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

[cherry-pick][pass] Upgrade Constant Folding Pass (#50105)

* constant folding/trt subgrash pass debug
* constant folding set persistalbe var in OP block, and remove unsed log
* set node var persistalbe
上级 dddc5d9d
......@@ -142,6 +142,9 @@ 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);
auto *global_out_tensor = scope->Var(out_name)->GetMutable<LoDTensor>();
*global_out_tensor = *local_out_tensor;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册