Browse Source

!7270 [DynamicShape] dynamic shape bugfix, support get max shape of NoShape operator

Merge pull request !7270 from caifubi/dump_bugfix
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
42e68b7f4d
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/ccsrc/backend/session/anf_runtime_algorithm.cc

+ 4
- 0
mindspore/ccsrc/backend/session/anf_runtime_algorithm.cc View File

@@ -1327,6 +1327,8 @@ std::vector<int> AnfRuntimeAlgorithm::GetOutputMaxShape(const AnfNodePtr &anf_no
} else if (shape->isa<abstract::SequeueShape>()) {
auto shape_ptr = shape->cast<abstract::SequeueShapePtr>();
return GetShapeFromSequeueShape(shape_ptr, index, kMaxShape);
} else if (shape->isa<abstract::NoShape>()) {
return {};
} else {
MS_LOG(EXCEPTION) << "Invalid Shape Type";
}
@@ -1342,6 +1344,8 @@ std::vector<int> AnfRuntimeAlgorithm::GetOutputMinShape(const AnfNodePtr &anf_no
} else if (shape->isa<abstract::SequeueShape>()) {
auto shape_ptr = shape->cast<abstract::SequeueShapePtr>();
return GetShapeFromSequeueShape(shape_ptr, index, kMinShape);
} else if (shape->isa<abstract::NoShape>()) {
return {};
} else {
MS_LOG(EXCEPTION) << "Invalid Shape Type";
}


Loading…
Cancel
Save