!45969 speed up reshapre transpose fusion pass

Merge pull request !45969 from 王禹程/fix_pass
This commit is contained in:
i-robot 2022-11-25 02:12:24 +00:00 committed by Gitee
commit 71c9fa0ad1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 3 deletions

View File

@ -48,9 +48,8 @@ bool CheckMatmulNeighborNodes(const FuncGraphPtr &func_graph, const AnfNodePtr &
auto manager = func_graph->manager();
MS_EXCEPTION_IF_NULL(manager);
auto user_list = manager->node_users();
auto iter = user_list.find(down_node);
if (iter != user_list.end()) {
auto iter = manager->node_users().find(down_node);
if (iter != manager->node_users().end()) {
if (std::any_of(iter->second.begin(), iter->second.end(), [](const std::pair<AnfNodePtr, int64_t> &kernel) {
return IsPrimitiveCNode(kernel.first, prim::kPrimMatMul) ||
IsPrimitiveCNode(kernel.first, prim::kPrimBatchMatMul);