From a29681141390634a6263ad4ebf60bd44b3dbe1d4 Mon Sep 17 00:00:00 2001 From: lichun Date: Sat, 23 Jan 2021 18:08:43 +0800 Subject: [PATCH] Bugfix: fix the error in singleop scene --- ge/graph/partition/dynamic_shape_partition.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ge/graph/partition/dynamic_shape_partition.cc b/ge/graph/partition/dynamic_shape_partition.cc index 1c82eaf3..327a9f5b 100755 --- a/ge/graph/partition/dynamic_shape_partition.cc +++ b/ge/graph/partition/dynamic_shape_partition.cc @@ -51,6 +51,13 @@ using ClusterPtr = std::shared_ptr; 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) {