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
d488c042a5
4 changed files with 13 additions and 7 deletions
  1. +5
    -0
      ge/graph/load/model_manager/davinci_model.cc
  2. +1
    -1
      ge/graph/load/model_manager/davinci_model.h
  3. +5
    -4
      ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc
  4. +2
    -2
      ge/hybrid/node_executor/compiledsubgraph/known_node_executor.h

+ 5
- 0
ge/graph/load/model_manager/davinci_model.cc View File

@@ -1480,6 +1480,11 @@ Status DavinciModel::GetLabelGotoAddr(uint32_t label_index, rtMemType_t mem_type
return SUCCESS;
}

void DavinciModel::SetGlobalStep(void *global_step, uint64_t global_step_size) {
global_step_addr_ = global_step;
global_step_size_ = global_step_size;
}

/// @ingroup ge
/// @brief LabelSet Op Initialize.
/// @param [in] op_desc: LabelSet Op descriptor.


+ 1
- 1
ge/graph/load/model_manager/davinci_model.h View File

@@ -300,7 +300,7 @@ class DavinciModel {
return op_list_.at(index);
}

void SetGlobalStep(void *global_step) { global_step_addr_ = global_step; }
void SetGlobalStep(void *global_step, uint64_t global_step_size);
void *GetGlobalStep() const { return global_step_addr_; }

// get task info for profiling


+ 5
- 4
ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc View File

@@ -182,7 +182,7 @@ Status KnownNodeExecutor::PrepareTask(NodeTask &task, TaskContext &context) cons
return SUCCESS;
}

void KnownNodeExecutor::SetDaviciModel(const HybridModel &model, const NodePtr &node,
Status KnownNodeExecutor::SetDaviciModel(const HybridModel &model, const NodePtr &node,
std::shared_ptr<DavinciModel> &davinci_model) const {
// set known node flag as true
davinci_model->SetKnownNode(true);
@@ -190,10 +190,11 @@ void KnownNodeExecutor::SetDaviciModel(const HybridModel &model, const NodePtr &
davinci_model->SetDumpModelName(model.GetModelName());
davinci_model->SetOmName(model.GetOmName());
TensorValue *global_step_var = model.GetVariable(NODE_NAME_GLOBAL_STEP);
GE_CHK_BOOL_EXEC(global_step_var != nullptr, return);
davinci_model->SetGlobalStep(global_step_var->MutableData());
GE_CHECK_NOTNULL(global_step_var);
davinci_model->SetGlobalStep(global_step_var->MutableData(), global_step_var->GetSize());
// set model id as root node's node id
davinci_model->SetSubModelId(node->GetOpDesc()->GetId());
return SUCCESS;
}

Status KnownNodeExecutor::LoadTask(const HybridModel &model, const NodePtr &node,
@@ -213,7 +214,7 @@ Status KnownNodeExecutor::LoadTask(const HybridModel &model, const NodePtr &node
std::shared_ptr<DavinciModel> davinci_model = MakeShared<DavinciModel>(0, nullptr);
GE_CHECK_NOTNULL(davinci_model);

SetDaviciModel(model, node, davinci_model);
GE_CHK_STATUS_RET_NOLOG(SetDaviciModel(model, node, davinci_model));
GELOGD("KnownNodeExecutor::LoadTask node id %ld.", node->GetOpDesc()->GetId());

GE_CHK_STATUS_RET(davinci_model->Assign(ge_model),


+ 2
- 2
ge/hybrid/node_executor/compiledsubgraph/known_node_executor.h View File

@@ -59,8 +59,8 @@ class KnownNodeExecutor : public NodeExecutor {
const NodePtr &node,
GeModelPtr &ge_model,
ComputeGraphPtr &graph);
void SetDaviciModel(const HybridModel &model, const NodePtr &node,
std::shared_ptr<DavinciModel> &davinci_model) const;
Status SetDaviciModel(const HybridModel &model, const NodePtr &node,
std::shared_ptr<DavinciModel> &davinci_model) const;
};
} // namespace hybrid
} // namespace ge


Loading…
Cancel
Save