Browse Source

Bugfix: fix the error in singleop scene

pull/1003/head
lichun 5 years ago
parent
commit
a296811413
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      ge/graph/partition/dynamic_shape_partition.cc

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

@@ -51,6 +51,13 @@ using ClusterPtr = std::shared_ptr<Cluster>;
static bool IsInExperimentalMode(const ComputeGraphPtr &root_graph) {
for (const auto &node : root_graph->GetAllNodes()) {
GE_CHECK_NOTNULL(node->GetOpDesc());
// not do partition in single op scene.
bool is_singleop = false;
(void)AttrUtils::GetBool(node->GetOpDesc(), ATTR_DYNAMIC_SHAPE_SINGLE_AICPU, is_singleop);
if (is_singleop) {
return false;
}

for (const auto &input_desc : node->GetOpDesc()->GetAllInputsDesc()) {
auto type = input_desc.GetDataType();
if (type == DT_STRING || type == DT_RESOURCE || type == DT_STRING_REF) {


Loading…
Cancel
Save