Browse Source

modified: ge/graph/partition/dynamic_shape_partition.cc

tags/v1.2.0
zhaoxinxin 4 years ago
parent
commit
5fe85f3f85
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      ge/graph/partition/dynamic_shape_partition.cc

+ 11
- 0
ge/graph/partition/dynamic_shape_partition.cc View File

@@ -57,6 +57,17 @@ static bool IsInExperimentalMode(const ComputeGraphPtr &root_graph) {
if (is_singleop) { if (is_singleop) {
return false; return false;
} }
// if input_node in root_graph is dynamic shape, skip dynamic partition
// whole graph as one unknown graph
if (node->GetType() == DATA && node->GetOwnerComputeGraph()->GetParentNode() == nullptr) {
auto op_desc = node->GetOpDesc();
GE_CHECK_NOTNULL(op_desc);
auto data_output_desc = op_desc->GetOutputDescPtr(0);
GE_CHECK_NOTNULL(data_output_desc);
if (data_output_desc->GetShape().IsUnknownShape()) {
return false;
}
}


for (const auto &input_desc : node->GetOpDesc()->GetAllInputsDesc()) { for (const auto &input_desc : node->GetOpDesc()->GetAllInputsDesc()) {
auto type = input_desc.GetDataType(); auto type = input_desc.GetDataType();


Loading…
Cancel
Save