Browse Source

!1563 overflow bug

From: @zhou_chao1993
Reviewed-by: @youui,@ji_chen
Signed-off-by: @ji_chen
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
f4d3c2088a
2 changed files with 12 additions and 12 deletions
  1. +6
    -5
      ge/graph/load/model_manager/task_info/kernel_ex_task_info.cc
  2. +6
    -7
      ge/graph/load/model_manager/task_info/kernel_task_info.cc

+ 6
- 5
ge/graph/load/model_manager/task_info/kernel_ex_task_info.cc View File

@@ -239,10 +239,6 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin
return RT_ERROR_TO_GE_STATUS(rt_ret);) return RT_ERROR_TO_GE_STATUS(rt_ret);)


InitDumpTask(input_output_addr_, op_desc); InitDumpTask(input_output_addr_, op_desc);
if (davinci_model_->GetOpDugReg()) {
GELOGI("Op debug is open in kernel ex task info");
dump_args_ = input_output_addr_;
}
} }


uint64_t input_output_addr = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(input_output_addr_)); uint64_t input_output_addr = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(input_output_addr_));
@@ -275,10 +271,15 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin
} }


void KernelExTaskInfo::InitDumpTask(void *addr, const OpDescPtr &op_desc) { void KernelExTaskInfo::InitDumpTask(void *addr, const OpDescPtr &op_desc) {
if (davinci_model_->OpNeedDump(op_desc->GetName())) {
if (davinci_model_->OpNeedDump(op_desc->GetName()) || davinci_model_->GetOpDugReg()) {
GELOGD("Op %s need dump in kernel ex task info", op_desc->GetName().c_str());
dump_flag_ = RT_KERNEL_DUMPFLAG; dump_flag_ = RT_KERNEL_DUMPFLAG;
dump_args_ = addr; dump_args_ = addr;
} }
if (davinci_model_->GetOpDugReg()) {
GELOGD("Op debug is open in kernel ex task info");
dump_args_ = addr;
}
} }


Status KernelExTaskInfo::CalculateArgs(const domi::TaskDef &task_def, DavinciModel *davinci_model) { Status KernelExTaskInfo::CalculateArgs(const domi::TaskDef &task_def, DavinciModel *davinci_model) {


+ 6
- 7
ge/graph/load/model_manager/task_info/kernel_task_info.cc View File

@@ -731,9 +731,6 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne
skt_dump_args_ = static_cast<char *>(args_) + offset; skt_dump_args_ = static_cast<char *>(args_) + offset;
InitDumpTask(offset); InitDumpTask(offset);


GE_CHK_BOOL_TRUE_EXEC_INFO(davinci_model_->GetOpDugReg(), dump_args_ = static_cast<char *>(args_) + offset,
"Op debug is open in TVM task info");

vector<void *> virtual_io_addrs; // use virtual address for zero copy key. vector<void *> virtual_io_addrs; // use virtual address for zero copy key.
virtual_io_addrs.insert(virtual_io_addrs.end(), input_data_addrs.begin(), input_data_addrs.end()); virtual_io_addrs.insert(virtual_io_addrs.end(), input_data_addrs.begin(), input_data_addrs.end());
virtual_io_addrs.insert(virtual_io_addrs.end(), output_data_addrs.begin(), output_data_addrs.end()); virtual_io_addrs.insert(virtual_io_addrs.end(), output_data_addrs.begin(), output_data_addrs.end());
@@ -1070,10 +1067,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k
return RT_ERROR_TO_GE_STATUS(rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);
} }
InitDumpTask(sizeof(aicpu::AicpuParamHead)); InitDumpTask(sizeof(aicpu::AicpuParamHead));
if (davinci_model_->GetOpDugReg()) {
GELOGI("Op debug is open in aicpu task info");
dump_args_ = static_cast<char *>(args_) + sizeof(aicpu::AicpuParamHead);
}
if (kernel_type_ == ccKernelType::CUST_AI_CPU) { if (kernel_type_ == ccKernelType::CUST_AI_CPU) {
dump_flag_ |= RT_KERNEL_CUSTOM_AICPU; dump_flag_ |= RT_KERNEL_CUSTOM_AICPU;
} }
@@ -1085,6 +1079,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k


void KernelTaskInfo::InitDumpTask(uint32_t offset) { void KernelTaskInfo::InitDumpTask(uint32_t offset) {
if (davinci_model_->OpNeedDump(op_desc_->GetName())) { if (davinci_model_->OpNeedDump(op_desc_->GetName())) {
GELOGD("Op %s need dump in task info", op_desc_->GetName().c_str());
if (IsL1FusionOp(op_desc_)) { if (IsL1FusionOp(op_desc_)) {
dump_flag_ = RT_FUSION_KERNEL_DUMPFLAG; dump_flag_ = RT_FUSION_KERNEL_DUMPFLAG;
} else { } else {
@@ -1092,6 +1087,10 @@ void KernelTaskInfo::InitDumpTask(uint32_t offset) {
} }
dump_args_ = static_cast<char *>(args_) + offset; dump_args_ = static_cast<char *>(args_) + offset;
} }
if (davinci_model_->GetOpDugReg()) {
GELOGD("Op debug is open in kernel task info");
dump_args_ = static_cast<char *>(args_) + offset;
}
} }


Status KernelTaskInfo::InitAicpuTaskExtInfo(const std::string &ext_info) { Status KernelTaskInfo::InitAicpuTaskExtInfo(const std::string &ext_info) {


Loading…
Cancel
Save