Skip to content

Fix bug of prune when the program desc has been modified and var.op info is not up-to-date #10147

@kexinzhao

Description

@kexinzhao

var.op is usually set to the operator that generates this variable in the prune method in framework.py.

If we firstly prune the program desc to save the original model, and then use float16_transpiler to modify the program desc again. var.op in some cases will be out of date.

So we need to force the prune method to find the latest info about which operator generates the variable in inquiry so that we can find the correct operator as the prune target.

Metadata

Metadata

Assignees

Labels

预测原名Inference,包含Capi预测问题等

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions