Skip to content

mkldnn related irpasses are added triple times when mkldnn is enabled in AnaylsisPredictor #16174

@LeoZhao-BJ

Description

@LeoZhao-BJ

System information
-PaddlePaddle version: develop
-CPU: including CPUMKL/OpenBlas/MKLDNN version
-OS Platform : Linux

To Reproduce
use test in paddle/fluid/inference/tests/api/ and observe how many mkldnn related irpasses are processed.

Describe your current behavior
The rootcause is CpuPassStrategy uses copy constructor to re-initialize PassStrategy, the passes in previous instance is still kept, so mkldnn related irpasses are added multiple times.

Code to reproduce the issue
Other info / logs

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions