Browse Source

Modify Codeex

tags/v1.1.0
unknown 3 years ago
parent
commit
557c3ba7ad
4 changed files with 14 additions and 20 deletions
  1. +6
    -6
      ge/graph/build/memory/block_mem_assigner.cc
  2. +4
    -5
      ge/graph/load/new_model_manager/task_info/event_record_task_info.cc
  3. +4
    -6
      ge/graph/load/new_model_manager/task_info/event_wait_task_info.cc
  4. +0
    -3
      ge/graph/passes/data_pass.cc

+ 6
- 6
ge/graph/build/memory/block_mem_assigner.cc View File

@@ -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)) {


+ 4
- 5
ge/graph/load/new_model_manager/task_info/event_record_task_info.cc View File

@@ -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;
} }


+ 4
- 6
ge/graph/load/new_model_manager/task_info/event_wait_task_info.cc View File

@@ -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;


+ 0
- 3
ge/graph/passes/data_pass.cc View File

@@ -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 {


Loading…
Cancel
Save