From 675c088f1732afebbc1a985bc38f9005c01b52c7 Mon Sep 17 00:00:00 2001 From: lizhenyu Date: Sat, 13 Mar 2021 17:45:42 +0800 Subject: [PATCH] [bugfix] not find MakeTuple in functional.py --- mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc b/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc index c0fb08971b..e3c455f882 100644 --- a/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc +++ b/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc @@ -219,7 +219,9 @@ Status UniqueInfo::ComputeReplaceGraph(const CNodePtr &cnode) { OperatorAttrs attrs = {attr_op}; AnfNodePtr reduce_op; reduce_op = gen_g.PushBack({gen_g.NewOpInst(ALL_REDUCE, attrs), mul}); - auto make_tuple = gen_g.PushBack({gen_g.NewOpInst(MAKE_TUPLE), tuple_getitem_0, reduce_op}); + // Use name of make_tuple instance in mindspore.ops.functional, not the Primitive name + const std::string &make_tuple_op = "make_tuple"; + auto make_tuple = gen_g.PushBack({gen_g.NewOpInst(make_tuple_op), tuple_getitem_0, reduce_op}); std::vector> input_nodes = {std::make_pair(sub, 1), std::make_pair(unique, 1)}; replace_graph_ = std::make_shared>, AnfNodePtr>>( std::make_pair(input_nodes, make_tuple));