From 91d70e5f93df1adea8f8bcdbd1ef9fde3582284f Mon Sep 17 00:00:00 2001 From: lichun Date: Sat, 3 Jul 2021 10:43:42 +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/graph/load/model_manager/davinci_model.cc | 2 +- ge/graph/load/model_manager/davinci_model.h | 7 +++++++ ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ge/graph/load/model_manager/davinci_model.cc b/ge/graph/load/model_manager/davinci_model.cc index 87e0c6f2..7d82879f 100755 --- a/ge/graph/load/model_manager/davinci_model.cc +++ b/ge/graph/load/model_manager/davinci_model.cc @@ -4365,7 +4365,7 @@ void DavinciModel::SetDataDumperArgs(const ComputeGraphPtr &graph, const map void *{ diff --git a/ge/graph/load/model_manager/davinci_model.h b/ge/graph/load/model_manager/davinci_model.h index 6cb79804..daf0c7e6 100755 --- a/ge/graph/load/model_manager/davinci_model.h +++ b/ge/graph/load/model_manager/davinci_model.h @@ -499,6 +499,10 @@ class DavinciModel { return exception_dumper_.DumpExceptionInfo(exception_infos); } + void SetKnownShapeGlobalStep(void *global_step) { + known_shape_global_step_ = global_step; + } + void DumperShrink() { data_dumper_.DumpShrink(); } @@ -1105,6 +1109,9 @@ class DavinciModel { vector output_descs_; vector output_formats_; + // known shape node for dump + void *known_shape_global_step_; + // op name to attrs mapping std::map>> op_name_to_attrs_; }; diff --git a/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc b/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc index 29c829be..96392fe1 100755 --- a/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc +++ b/ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc @@ -145,6 +145,8 @@ Status KnownNodeTask::InitDavinciModel(const HybridModel &model, TensorBuffer *w auto dump_properties = DumpManager::GetInstance().GetDumpProperties(model.GetSessionId()); if (dump_properties.IsDumpOpen() || dump_properties.IsOpDebugOpen()) { davinci_model_->SetDumpProperties(dump_properties); + void *global_step = model.GetGlobalStep(); + davinci_model_->SetKnownShapeGlobalStep(); } void *weight = nullptr;