Browse Source

reviewbot modification

pull/1517/head
wuweikang 4 years ago
parent
commit
e73fdf198b
2 changed files with 4 additions and 9 deletions
  1. +2
    -5
      ge/graph/load/model_manager/model_manager.cc
  2. +2
    -4
      ge/hybrid/executor/hybrid_model_async_executor.cc

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

@@ -317,10 +317,7 @@ Status ModelManager::LoadModelOnline(uint32_t &model_id, const shared_ptr<ge::Ge


mmTimespec timespec = mmGetTickCount(); mmTimespec timespec = mmGetTickCount();
std::shared_ptr<DavinciModel> davinci_model = MakeShared<DavinciModel>(0, listener); std::shared_ptr<DavinciModel> davinci_model = MakeShared<DavinciModel>(0, listener);
if (davinci_model == nullptr) {
GELOGE(FAILED, "davinci_model is nullptr");
return FAILED;
}
GE_CHECK_NOTNULL(davinci_model);
davinci_model->SetProfileTime(MODEL_LOAD_START, (timespec.tv_sec * kTimeSpecNano + davinci_model->SetProfileTime(MODEL_LOAD_START, (timespec.tv_sec * kTimeSpecNano +
timespec.tv_nsec)); // 1000 ^ 3 converts second to nanosecond timespec.tv_nsec)); // 1000 ^ 3 converts second to nanosecond
davinci_model->SetId(model_id); davinci_model->SetId(model_id);
@@ -1726,7 +1723,7 @@ Status ModelManager::CheckAicpuOpList(GeModelPtr ge_model) {
bool aicpu_need_check = ge::AttrUtils::GetListStr(ge_model, "needCheckCpu", aicpu_optype_list); bool aicpu_need_check = ge::AttrUtils::GetListStr(ge_model, "needCheckCpu", aicpu_optype_list);
bool tf_need_check = ge::AttrUtils::GetListStr(ge_model, "needCheckTf", aicpu_tf_optype_list); bool tf_need_check = ge::AttrUtils::GetListStr(ge_model, "needCheckTf", aicpu_tf_optype_list);
if (!aicpu_need_check && !tf_need_check) { if (!aicpu_need_check && !tf_need_check) {
GELOGI("Graph:%s No need to check aicpu optype.", ge_model->GetGraph().GetName().c_str());
GELOGI("No need to check aicpu optype for graph.");
return SUCCESS; return SUCCESS;
} }
GE_CHK_STATUS_RET(LaunchKernelCheckAicpuOp(aicpu_optype_list, aicpu_tf_optype_list), GE_CHK_STATUS_RET(LaunchKernelCheckAicpuOp(aicpu_optype_list, aicpu_tf_optype_list),


+ 2
- 4
ge/hybrid/executor/hybrid_model_async_executor.cc View File

@@ -139,10 +139,8 @@ Status HybridModelAsyncExecutor::RunInternal() {
Status ret = data_inputer_->Pop(data_wrapper); Status ret = data_inputer_->Pop(data_wrapper);
// Model indeedly start running // Model indeedly start running
SetRunningFlag(true); SetRunningFlag(true);
if (data_wrapper == nullptr || ret != SUCCESS) {
GELOGI("data_wrapper is null!, ret = %u", ret);
continue;
}
GE_IF_BOOL_EXEC(data_wrapper == nullptr || ret != SUCCESS, GELOGI("data_wrapper is null!, ret = %u", ret);
continue);


GELOGI("Getting the input data, model_id:%u", model_id_); GELOGI("Getting the input data, model_id:%u", model_id_);
GE_IF_BOOL_EXEC(!run_flag_, break); GE_IF_BOOL_EXEC(!run_flag_, break);


Loading…
Cancel
Save