!1478 Don't reset -2 when there is aicore op.

From: @zhao_zhixuan
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @lbisdaddy
r1.3.0
mindspore-ci-bot 4 years ago committed by Gitee
commit 7f73eedb8a

@ -692,6 +692,22 @@ namespace {
}
return SUCCESS;
}
bool CheckNoAicore(const ComputeGraphPtr &graph) {
for (const auto &node : graph->GetDirectNode()) {
if (node == nullptr) {
continue;
}
auto op_desc = node->GetOpDesc();
if (op_desc == nullptr) {
continue;
}
if (op_desc->GetOpEngineName() == kAIcoreEngine) {
return false;
}
}
return true;
}
}
void GeGenerator::RemoveConst(const vector<GeTensor> &inputs, vector<GeTensor> &outputs) {
@ -787,7 +803,7 @@ Status GeGenerator::BuildSingleOp(OpDescPtr &op_desc, const vector<GeTensor> &in
bool all_shape = false;
(void)AttrUtils::GetBool(op_desc, kAicpuAllshape, all_shape);
if (all_shape) {
if (all_shape && CheckNoAicore(root_graph)) {
GELOGD("Get aicpu all_shape kernel!");
vector<GeTensor> inputs_dynamic;
vector<GeTensor> outputs_dynamic;

Loading…
Cancel
Save