@@ -881,14 +881,14 @@ MemoryBlock *BlockMemAssigner::ApplyMemory(size_t block_size, size_t real_size, | |||||
continue; | continue; | ||||
} | } | ||||
std::string batch_label; | std::string batch_label; | ||||
if (reusable_block->IsSameLabel(batch_label)) { | |||||
std::string op_label; | |||||
(void)ge::AttrUtils::GetStr(node_op_desc, ATTR_NAME_BATCH_LABEL, op_label); | |||||
if (batch_label != op_label) { | |||||
if (reusable_block->IsSameLabel(batch_label)) { | |||||
std::string op_label; | |||||
(void)ge::AttrUtils::GetStr(node_op_desc, ATTR_NAME_BATCH_LABEL, op_label); | |||||
if (batch_label != op_label) { | |||||
GELOGI("label diff, op name %s", node_op_desc->GetName().c_str()); | GELOGI("label diff, op name %s", node_op_desc->GetName().c_str()); | ||||
continue; | continue; | ||||
} | |||||
} | |||||
} | |||||
} | |||||
// A node can reuse blocks of the same stream and preorder streams | // A node can reuse blocks of the same stream and preorder streams | ||||
if (CanReuseBySize(reusable_block_counts_, *reusable_block, block_size, real_size, continuous)) { | if (CanReuseBySize(reusable_block_counts_, *reusable_block, block_size, real_size, continuous)) { | ||||
@@ -32,14 +32,13 @@ Status EventRecordTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da | |||||
return ret; | return ret; | ||||
} | } | ||||
if (task_def.event_id() >= davinci_model->EventNum()) { | |||||
GELOGE(INTERNAL_ERROR, "event_list_ size = %u cur =%u!", davinci_model->EventNum(), task_def.event_id()); | |||||
const auto &eventList = davinci_model->GetEventList(); | |||||
if (task_def.event_id() >= eventList.size()) { | |||||
GELOGE(INTERNAL_ERROR, "event list size:%zu, cur:%u!", eventList.size(), task_def.event_id()); | |||||
return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
} | } | ||||
if (!davinci_model->GetEventList().empty()) { | |||||
event_ = davinci_model->GetEventList()[task_def.event_id()]; | |||||
} | |||||
event_ = eventList[task_def.event_id()]; | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -32,15 +32,13 @@ Status EventWaitTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davi | |||||
return ret; | return ret; | ||||
} | } | ||||
if (task_def.event_id() >= davinci_model->EventNum()) { | |||||
GELOGE(INTERNAL_ERROR, "event_list_ size = %u cur =%u!", davinci_model->EventNum(), task_def.event_id()); | |||||
const auto &eventList = davinci_model->GetEventList(); | |||||
if (task_def.event_id() >= eventList.size()) { | |||||
GELOGE(INTERNAL_ERROR, "event list size:%zu, cur:%u!", eventList.size(), task_def.event_id()); | |||||
return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
} | } | ||||
if (!davinci_model->GetEventList().empty()) { | |||||
event_ = davinci_model->GetEventList()[task_def.event_id()]; | |||||
} | |||||
event_ = eventList[task_def.event_id()]; | |||||
event_type_ = task_def.event_ex().event_type(); | event_type_ = task_def.event_ex().event_type(); | ||||
return SUCCESS; | return SUCCESS; | ||||
@@ -16,11 +16,8 @@ | |||||
#include "graph/passes/data_pass.h" | #include "graph/passes/data_pass.h" | ||||
#include <string> | |||||
#include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
#include "graph/utils/graph_utils.h" | #include "graph/utils/graph_utils.h" | ||||
#include "register/op_registry.h" | |||||
namespace ge { | namespace ge { | ||||
namespace { | namespace { | ||||