Commit 9990b47
[inductor][pattern matcher] revise mkldnn pattern matcher UT (pytorch#141334)
Fixes pytorch#139970, pytorch#139812.
Revise mkldnn pattern matcher UTs, to check the relevant specific matched patterns instead of the total matched number.
1) Add the missing specific counters in pattern matchers, e.g. `mkldnn_unary_fusion_matcher_nodes`/`mkldnn_conv_weight_pack_matcher_count`.
2) In UTs, change the general `matcher_count`/`matcher_nodes` checks to the specific ones, e.g. `mkldnn_unary_fusion_matcher_nodes`/`mkldnn_conv_weight_pack_matcher_count`.
3) In UTs, remove the option of `matcher_count`/`matcher_nodes` params in _test_common and make `matcher_check_fn` a necessary param.
Pull Request resolved: pytorch#141334
Approved by: https://github.com/leslie-fang-intel, https://github.com/jgong5, https://github.com/jansel1 parent ff73e2e commit 9990b47
File tree
2 files changed
+293
-151
lines changed- test/inductor
- torch/_inductor/fx_passes
2 files changed
+293
-151
lines changed
0 commit comments