Browse Source

!1349 modify dump single op

From: @zhou_chao1993
Reviewed-by: 
Signed-off-by:
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
20d014daee
2 changed files with 12 additions and 4 deletions
  1. +3
    -3
      ge/single_op/single_op_model.cc
  2. +9
    -1
      ge/single_op/task/op_task.cc

+ 3
- 3
ge/single_op/single_op_model.cc View File

@@ -132,7 +132,7 @@ void SingleOpModel::ParseOpModelParams(ModelHelper &model_helper, SingleOpModelP
ret = ge::AttrUtils::GetInt(model, ATTR_MODEL_CORE_TYPE, value);
param.core_type = ret ? value : 0;

GELOGI("ParseOpModelParams(), total_memory_size:%lu, zero_copy_size:%lu, weight_size:%lu. core_type = %lu",
GELOGI("ParseOpModelParams(), total_memory_size:%lu, zero_copy_size:%lu, weight_size:%lu, core_type = %lu",
param.memory_size, param.zero_copy_mem_size, param.weight_size, param.core_type);
}

@@ -518,7 +518,7 @@ Status SingleOpModel::BuildModelTaskKernel(StreamResource *stream_resource, cons

auto kernel_type = static_cast<ccKernelType>(context.kernel_type());
if (kernel_type == ccKernelType::TE) {
GELOGD("Building TBE task");
GELOGD("Building TBE task.");
TbeOpTask *tbe_task = nullptr;
GE_CHK_STATUS_RET_NOLOG(BuildKernelTask(task_def, &tbe_task));
tbe_task->SetModelArgs(model_name_, model_id_);
@@ -557,7 +557,7 @@ Status SingleOpModel::BuildTaskListForDynamicOp(StreamResource *stream_resource,
auto tasks = ge_model->GetModelTaskDefPtr()->task();
for (int i = 0; i < tasks.size(); ++i) {
const TaskDef &task_def = tasks[i];
GELOGI("[%s] Task[%d], type = %u, DebugString = %s", model_name_.c_str(), i, task_def.type(),
GELOGI("[%s] Task[%d], type = [%u], DebugString = [%s]", model_name_.c_str(), i, task_def.type(),
task_def.DebugString().c_str());
auto task_type = static_cast<rtModelTaskType_t>(task_def.type());
if (task_type == RT_MODEL_TASK_KERNEL || task_type == RT_MODEL_TASK_ALL_KERNEL) {


+ 9
- 1
ge/single_op/task/op_task.cc View File

@@ -124,7 +124,7 @@ Status OpTask::GetProfilingArgs(TaskDescInfo &task_desc_info, uint32_t &model_id
}
GE_CHECK_NOTNULL(op_desc_);
string op_name = op_desc_->GetName();
GELOGD("Get profiling args of op [%s] end, task_id[%u], stream_id[%u]", op_name.c_str(), task_id, stream_id);
GELOGD("Get profiling args of op [%s] end, task_id[%u], stream_id[%u].", op_name.c_str(), task_id, stream_id);
model_id = model_id_;
task_desc_info.model_name = model_name_;
task_desc_info.block_dim = block_dim_;
@@ -504,6 +504,10 @@ Status AiCpuBaseTask::UpdateExtInfo(const std::vector<GeTensorDesc> &input_desc,
"[Check][Size]Input_desc size is %zu, but get non_const_index is %zu", input_desc.size(), non_const_index);
GE_CHK_STATUS_RET(aicpu_ext_handle_->UpdateInputShapeAndType(input_index, input_desc[non_const_index]),
"[Update][InputShapeAndType]failed, input_index:%zu.", input_index);
if (DumpManager::GetInstance().GetDumpProperties(kInferSessionId).IsSingleOpNeedDump()) {
GE_CHK_STATUS_RET(op_desc_->UpdateInputDesc(input_index, input_desc[non_const_index]),
"AiCpuTask Update [%zu]th input desc failed.",input_index);
}
non_const_index++;
}

@@ -511,6 +515,10 @@ Status AiCpuBaseTask::UpdateExtInfo(const std::vector<GeTensorDesc> &input_desc,
for (size_t j = 0; j < num_outputs_; ++j) {
GE_CHK_STATUS_RET(aicpu_ext_handle_->UpdateOutputShapeAndType(j, output_desc[j]),
"[Update][OutputShapeAndType] failed, Output:%zu.", j);
if (DumpManager::GetInstance().GetDumpProperties(kInferSessionId).IsSingleOpNeedDump()) {
GE_CHK_STATUS_RET(op_desc_->UpdateOutputDesc(j, output_desc[j]),
"AiCpuTask Update [%zu]th output desc failed.",j);
}
}
}



Loading…
Cancel
Save