Browse Source

!13287 [bugfix] Not find MakeTuple in functional.py

From: @zyli2020
Reviewed-by: @cristoval,@limingqi107
Signed-off-by: @limingqi107
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
35a216f84c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc

+ 3
- 1
mindspore/ccsrc/frontend/parallel/ops_info/unique_info.cc View File

@@ -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<std::pair<AnfNodePtr, int64_t>> input_nodes = {std::make_pair(sub, 1), std::make_pair(unique, 1)};
replace_graph_ = std::make_shared<std::pair<std::vector<std::pair<AnfNodePtr, int64_t>>, AnfNodePtr>>(
std::make_pair(input_nodes, make_tuple));


Loading…
Cancel
Save