Browse Source

Add ut.

pull/1308/head
zhaozhixuan 4 years ago
parent
commit
9d1d3583c0
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      tests/ut/ge/graph/load/davinci_model_unittest.cc
  2. +1
    -0
      tests/ut/ge/hybrid/ge_hybrid_unittest.cc

+ 1
- 0
tests/ut/ge/graph/load/davinci_model_unittest.cc View File

@@ -900,6 +900,7 @@ TEST_F(UtestDavinciModel, Sink_time_profile) {

TEST_F(UtestDavinciModel, Step_info_profile) {
ProfilingManager::Instance().prof_cb_.msprofReporterCallback = MsprofReport;
ProfilingManager::Instance().device_id_.emplace_back(0);
DavinciModel model(0, nullptr);
EXPECT_EQ(DavinciModel::ProfileStepInfo(&model, 0), SUCCESS);
}


+ 1
- 0
tests/ut/ge/hybrid/ge_hybrid_unittest.cc View File

@@ -265,6 +265,7 @@ TEST_F(UtestGeHybrid, hybrid_model_executor) {

TEST_F(UtestGeHybrid, Step_info_profile) {
ProfilingManager::Instance().prof_cb_.msprofReporterCallback = MsprofReport;
ProfilingManager::Instance().device_id_.emplace_back(0);
auto graph = make_shared<ComputeGraph>("graph");
auto root_model = make_shared<GeRootModel>(graph);
HybridModel model(root_model);


Loading…
Cancel
Save