Browse Source

!6521 [Auto parallel] Checking the return value of find() in rec-searching

Merge pull request !6521 from Xiaoda/24-fix-a-return-value-checking-bug-in-rec-searching
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
05d5ac9096
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_generate_strategy.cc

+ 3
- 0
mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_generate_strategy.cc View File

@@ -487,6 +487,9 @@ Dimensions PrepareIncomingOperatorInputStrategy(const std::vector<std::shared_pt
} }
if (ops[incoming_op_index]->type() == GATHERV2) { if (ops[incoming_op_index]->type() == GATHERV2) {
auto pos = ops[incoming_op_index]->name().find("Info"); auto pos = ops[incoming_op_index]->name().find("Info");
if (pos == std::string::npos) {
return s;
}
auto name = ops[incoming_op_index]->name().substr(0, pos); auto name = ops[incoming_op_index]->name().substr(0, pos);
if (name == "GatherV2") { if (name == "GatherV2") {
return s; return s;


Loading…
Cancel
Save