|
|
|
@@ -173,6 +173,7 @@ DavinciModel::DavinciModel(int32_t priority, const std::shared_ptr<ModelListener |
|
|
|
runtime_model_id_(0), |
|
|
|
version_(0), |
|
|
|
ge_model_(nullptr), |
|
|
|
is_shrink_created_(false), |
|
|
|
listener_(listener), |
|
|
|
run_flg_(false), |
|
|
|
priority_(priority), |
|
|
|
@@ -765,7 +766,6 @@ Status DavinciModel::Init(void *dev_ptr, size_t mem_size, void *weight_ptr, size |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CREATE_STD_THREAD(shrink_id_, &DavinciModel::Shrink, this); |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -3708,6 +3708,10 @@ Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputDa |
|
|
|
GELOGD("current_data.index=%u", input_data.index); |
|
|
|
GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), SetProfileTime(MODEL_PRE_PROC_END)); |
|
|
|
|
|
|
|
if (!is_shrink_created_) { |
|
|
|
CREATE_STD_THREAD(shrink_id_, &DavinciModel::Shrink, this); |
|
|
|
is_shrink_created_ = true; |
|
|
|
} |
|
|
|
if (!task_list_.empty()) { |
|
|
|
GELOGD("rtModelExecute do"); |
|
|
|
GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), SetProfileTime(MODEL_INFER_START)); |
|
|
|
|