From 0d7fee0c53b58ba864ce2174b92f38fc38e07146 Mon Sep 17 00:00:00 2001 From: lizhenyu Date: Tue, 2 Feb 2021 21:01:19 +0800 Subject: [PATCH] hange tuple_getitem name to op instance name --- mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc b/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc index 5684b3f722b..c0fb08971bb 100644 --- a/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc +++ b/mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc @@ -207,8 +207,10 @@ Status UniqueInfo::ComputeReplaceGraph(const CNodePtr &cnode) { auto minimum = gen_g.PushBack({gen_g.NewOpInst(MINIMUM), relu, CreateInt32Tensor(slice_size - 1)}); auto equal = gen_g.PushBack({gen_g.NewOpInst(EQUAL), sub, minimum}); auto unique = gen_g.PushBack({gen_g.NewOpInst(replace_op_name_), gen_g.virtual_input_node()}); - auto tuple_getitem_0 = gen_g.PushBack({gen_g.NewOpInst(prim::kTupleGetItem), unique, CreatInt64Imm(0)}); - auto tuple_getitem_1 = gen_g.PushBack({gen_g.NewOpInst(prim::kTupleGetItem), unique, CreatInt64Imm(1)}); + // Use name of tuple_getitem instance in mindspore.ops.functional, not the Primitive name + const std::string &tuple_getitem_op = "tuple_getitem"; + auto tuple_getitem_0 = gen_g.PushBack({gen_g.NewOpInst(tuple_getitem_op), unique, CreatInt64Imm(0)}); + auto tuple_getitem_1 = gen_g.PushBack({gen_g.NewOpInst(tuple_getitem_op), unique, CreatInt64Imm(1)}); auto dtype = gen_g.PushBack({gen_g.NewOpInst(DTYPE), tuple_getitem_1}); auto cast = gen_g.PushBack({gen_g.NewOpInst(CAST), equal, dtype}); auto mul = gen_g.PushBack({gen_g.NewOpInst(MUL), tuple_getitem_1, cast});