Browse Source

add global step info for known subgraph in unknown model and generate om for remained cases when some single op cases run atc failed

tags/v1.5.1
lichun 3 years ago
parent
commit
6314c48f92
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      tests/ut/ge/hybrid/known_node_executor_unittest.cc

+ 3
- 4
tests/ut/ge/hybrid/known_node_executor_unittest.cc View File

@@ -135,10 +135,9 @@ TEST_F(UnknownNodeExecutorTest, TestSetGlobalStep) {
HybridModel hybrid_model(ge_root_model); HybridModel hybrid_model(ge_root_model);
auto *step_id = new int64_t[1]; auto *step_id = new int64_t[1];
step_id[0] = 520; step_id[0] = 520;
std::unique_ptr<TensorValue> tensor_value;
tensor_value.reset(new(std::nothrow)TensorValue((void*)step_id, sizeof(step_id)));
hybrid_model.variable_tensors_.insert({"ge_global_step", std::move(tensor_value)});

std::unique_ptr<TensorValue> tensor_buf;
tensor_buf = tensor_buf->Create((void *)step_id, sizeof(int64_t));
hybrid_model.global_step_ = std::move(tensor_buf);
KnownNodeExecutor known_node_executor; KnownNodeExecutor known_node_executor;
std::shared_ptr<DavinciModel> davinci_model = MakeShared<DavinciModel>(0, nullptr); std::shared_ptr<DavinciModel> davinci_model = MakeShared<DavinciModel>(0, nullptr);
known_node_executor.SetDaviciModel(hybrid_model, node, davinci_model); known_node_executor.SetDaviciModel(hybrid_model, node, davinci_model);


Loading…
Cancel
Save