diff --git a/ge/hybrid/node_executor/node_executor.cc b/ge/hybrid/node_executor/node_executor.cc index 4055ec4d..842dce82 100755 --- a/ge/hybrid/node_executor/node_executor.cc +++ b/ge/hybrid/node_executor/node_executor.cc @@ -34,6 +34,15 @@ const char *const kEngineNameHccl = "ops_kernel_info_hccl"; const char *const kEngineNameRts = "DNN_VM_RTS_OP_STORE"; const char *const kEngineNameHostCpu = "DNN_VM_HOST_CPU_OP_STORE"; const char *const kOwnerGraphIsUnknown = "OwnerGraphIsUnknown"; + +bool IsGraphUnknown(ComputeGraph &graph) { + for (const auto &node : graph.GetDirectNode()) { + bool is_unknown_shape = false; + (void)AttrUtils::GetBool(node->GetOpDesc(), kOwnerGraphIsUnknown, is_unknown_shape); + return is_unknown_shape; + } + return false; +} } Status NodeExecutor::PrepareTask(NodeTask &task, TaskContext &context) const { GE_CHK_STATUS_RET_NOLOG(context.AllocateOutputs()); @@ -82,17 +91,16 @@ NodeExecutorManager::ExecutorType NodeExecutorManager::ResolveExecutorType(Node auto op_type = node.GetType(); if (op_type == PARTITIONEDCALL) { const auto &subgraph = NodeUtils::GetSubgraph(node, 0); - if (subgraph != nullptr) { - for (const auto &node : subgraph->GetDirectNode()) { - bool is_unknown_shape = false; - (void)AttrUtils::GetBool(node->GetOpDesc(), kOwnerGraphIsUnknown, is_unknown_shape); - if (is_unknown_shape) { - return ExecutorType::DYNAMIC_SUBGRAPH; - } else { - return ExecutorType::COMPILED_SUBGRAPH; - } - } + if (subgraph != nullptr && IsGraphUnknown(*subgraph)) { + GELOGD("node %s was marked as unknown shape in node executor.", node.GetName().c_str()); + return ExecutorType::DYNAMIC_SUBGRAPH; + } + bool is_dynamic = false; + (void) NodeUtils::GetNodeUnknownShapeStatus(node, is_dynamic); + if (is_dynamic) { + return ExecutorType::DYNAMIC_SUBGRAPH; } + return ExecutorType::COMPILED_SUBGRAPH; } // rts kernel store is assigned to NetOutput diff --git a/metadef b/metadef index 0f5ddb10..6354e14e 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 0f5ddb10ce79ea2c01b8b9cab5ec3102879610bb +Subproject commit 6354e14ecce138626b5804ff7db5739d29d563c4 diff --git a/parser b/parser index cf60b0c0..742f940d 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit cf60b0c02d1a6e844fcec4202d18a069e9502b0f +Subproject commit 742f940d8868fbd2f5de19f726d6d28142bc0a6e