From: @zhengyuanhua Reviewed-by: @youui,@liujunzhu Signed-off-by: @liujunzhutags/v1.1.0
| @@ -30,6 +30,7 @@ AicpuTask::AicpuTask(const ModelContext &model_context, const std::shared_ptr<Ai | |||||
| input_output_addr_(nullptr) { | input_output_addr_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| @@ -30,6 +30,7 @@ CceTask::CceTask(const ModelContext &model_context, const std::shared_ptr<CceTas | |||||
| is_flowtable_(false) { | is_flowtable_(false) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| @@ -27,6 +27,7 @@ EventRecordTask::EventRecordTask(const ModelContext &model_context, | |||||
| event_(nullptr) { | event_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| auto event_list = model_context.event_list(); | auto event_list = model_context.event_list(); | ||||
| @@ -35,6 +36,7 @@ EventRecordTask::EventRecordTask(const ModelContext &model_context, | |||||
| if (stream_id >= stream_list.size() || event_id >= event_list.size()) { | if (stream_id >= stream_list.size() || event_id >= event_list.size()) { | ||||
| GELOGW("stream_list size:%zu, stream_id:%u, event_list size:%zu, event_id:%u", stream_list.size(), stream_id, | GELOGW("stream_list size:%zu, stream_id:%u, event_list size:%zu, event_id:%u", stream_list.size(), stream_id, | ||||
| event_list.size(), event_id); | event_list.size(), event_id); | ||||
| return; | |||||
| } | } | ||||
| stream_ = stream_list[stream_id]; | stream_ = stream_list[stream_id]; | ||||
| event_ = event_list[event_id]; | event_ = event_list[event_id]; | ||||
| @@ -26,6 +26,7 @@ EventWaitTask::EventWaitTask(const ModelContext &model_context, const std::share | |||||
| event_(nullptr) { | event_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| auto event_list = model_context.event_list(); | auto event_list = model_context.event_list(); | ||||
| @@ -34,6 +35,7 @@ EventWaitTask::EventWaitTask(const ModelContext &model_context, const std::share | |||||
| if (stream_id >= stream_list.size() || event_id >= event_list.size()) { | if (stream_id >= stream_list.size() || event_id >= event_list.size()) { | ||||
| GELOGW("stream_list size:%zu, stream_id:%u, event_list size:%zu, event_id:%u", stream_list.size(), stream_id, | GELOGW("stream_list size:%zu, stream_id:%u, event_list size:%zu, event_id:%u", stream_list.size(), stream_id, | ||||
| event_list.size(), event_id); | event_list.size(), event_id); | ||||
| return; | |||||
| } | } | ||||
| stream_ = stream_list[stream_id]; | stream_ = stream_list[stream_id]; | ||||
| event_ = event_list[event_id]; | event_ = event_list[event_id]; | ||||
| @@ -36,6 +36,7 @@ HcclTask::HcclTask(const ModelContext &model_context, const std::shared_ptr<Hccl | |||||
| secondary_stream_list_() { | secondary_stream_list_() { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| priority_ = model_context.priority(); | priority_ = model_context.priority(); | ||||
| @@ -24,6 +24,7 @@ MemcpyAsyncTask::MemcpyAsyncTask(const ModelContext &model_context, | |||||
| : TaskRepeater<MemcpyAsyncTaskInfo>(model_context, task_info), task_info_(task_info), stream_(nullptr) { | : TaskRepeater<MemcpyAsyncTaskInfo>(model_context, task_info), task_info_(task_info), stream_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| uint32_t stream_id = task_info->stream_id(); | uint32_t stream_id = task_info->stream_id(); | ||||
| @@ -31,6 +32,7 @@ MemcpyAsyncTask::MemcpyAsyncTask(const ModelContext &model_context, | |||||
| GELOGI("Stream list size:%zu, stream id:%u.", stream_list.size(), stream_id); | GELOGI("Stream list size:%zu, stream id:%u.", stream_list.size(), stream_id); | ||||
| if (stream_id >= stream_list.size()) { | if (stream_id >= stream_list.size()) { | ||||
| GELOGW("Stream id invalid"); | GELOGW("Stream id invalid"); | ||||
| return; | |||||
| } | } | ||||
| stream_ = stream_list[stream_id]; | stream_ = stream_list[stream_id]; | ||||
| } | } | ||||
| @@ -23,12 +23,14 @@ ProfilerTask::ProfilerTask(const ModelContext &model_context, const std::shared_ | |||||
| : TaskRepeater<ProfilerTraceTaskInfo>(model_context, task_info), task_info_(task_info), stream_(nullptr) { | : TaskRepeater<ProfilerTraceTaskInfo>(model_context, task_info), task_info_(task_info), stream_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| uint32_t stream_id = task_info->stream_id(); | uint32_t stream_id = task_info->stream_id(); | ||||
| GELOGI("Stream list size:%zu, stream id:%u.", stream_list.size(), stream_id); | GELOGI("Stream list size:%zu, stream id:%u.", stream_list.size(), stream_id); | ||||
| if (stream_id >= stream_list.size()) { | if (stream_id >= stream_list.size()) { | ||||
| GELOGW("Stream id invalid"); | GELOGW("Stream id invalid"); | ||||
| return; | |||||
| } | } | ||||
| stream_ = stream_list[stream_id]; | stream_ = stream_list[stream_id]; | ||||
| } | } | ||||
| @@ -27,6 +27,7 @@ StreamActiveTask::StreamActiveTask(const ModelContext &model_context, | |||||
| active_stream_(nullptr) { | active_stream_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||
| uint32_t stream_id = task_info->stream_id(); | uint32_t stream_id = task_info->stream_id(); | ||||
| @@ -34,6 +35,7 @@ StreamActiveTask::StreamActiveTask(const ModelContext &model_context, | |||||
| GELOGI("Stream list size:%zu, stream id:%u, active stream id:%u", stream_list.size(), stream_id, active_stream_id); | GELOGI("Stream list size:%zu, stream id:%u, active stream id:%u", stream_list.size(), stream_id, active_stream_id); | ||||
| if (stream_id >= stream_list.size() || active_stream_id >= stream_list.size()) { | if (stream_id >= stream_list.size() || active_stream_id >= stream_list.size()) { | ||||
| GELOGW("Stream id invalid"); | GELOGW("Stream id invalid"); | ||||
| return; | |||||
| } | } | ||||
| stream_ = stream_list[stream_id]; | stream_ = stream_list[stream_id]; | ||||
| active_stream_ = stream_list[active_stream_id]; | active_stream_ = stream_list[active_stream_id]; | ||||
| @@ -27,6 +27,7 @@ StreamSwitchTask::StreamSwitchTask(const ModelContext &model_context, | |||||
| stream_list_() { | stream_list_() { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| stream_list_ = model_context.stream_list(); | stream_list_ = model_context.stream_list(); | ||||
| @@ -28,6 +28,7 @@ TbeTask::TbeTask(const ModelContext &model_context, const std::shared_ptr<TbeTas | |||||
| args_(nullptr) { | args_(nullptr) { | ||||
| if (task_info_ == nullptr) { | if (task_info_ == nullptr) { | ||||
| GELOGW("task_info_ is null!"); | GELOGW("task_info_ is null!"); | ||||
| return; | |||||
| } | } | ||||
| auto stream_list = model_context.stream_list(); | auto stream_list = model_context.stream_list(); | ||||