From 47b3762f6e24f1bf4eccfde786c55d27a5538943 Mon Sep 17 00:00:00 2001 From: lichun Date: Thu, 1 Jul 2021 21:03:31 +0800 Subject: [PATCH] add global step info for known subgraph in unknown model and generate om for remained cases when some single op cases run atc failed --- ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc | 2 +- tests/ut/ge/hybrid/known_node_executor_unittest.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc b/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc index ea6e2965..b903f6af 100755 --- a/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc +++ b/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc @@ -190,7 +190,7 @@ void KnownNodeExecutor::SettingDaviciModel(const HybridModel &model, const NodeP davinci_model->SetDumpModelName(model.GetModelName()); davinci_model->SetOmName(model.GetOmName()); TensorValue *global_step_var = model.GetVariable(NODE_NAME_GLOBAL_STEP); - davinci_model->SetKnownShapeGlobalStep(global_step_var->MutableData()); + davinci_model->SetGlobalStep(global_step_var->MutableData()); // set model id as root node's node id davinci_model->SetSubModelId(node->GetOpDesc()->GetId()); } diff --git a/tests/ut/ge/hybrid/known_node_executor_unittest.cc b/tests/ut/ge/hybrid/known_node_executor_unittest.cc index 435928ee..dd2557d1 100644 --- a/tests/ut/ge/hybrid/known_node_executor_unittest.cc +++ b/tests/ut/ge/hybrid/known_node_executor_unittest.cc @@ -142,5 +142,5 @@ TEST_F(UnknownNodeExecutorTest, TestSetGlobalStep) { KnownNodeExecutor known_node_executor; std::shared_ptr davinci_model = MakeShared(0, nullptr); known_node_executor.SettingDaviciModel(hybrid_model, node, davinci_model); - EXPECT_EQ(davinci_model->global_step_addr_, 520); + EXPECT_EQ(*(static_cast(davinci_model->global_step_addr_)), 520); }