已合并
fix(cpu_engine): 按 CANN 日志规范修正日志文案 #4568
Ding_Jing创建于 8月26日
fix(cpu_engine): 按 CANN 日志规范修正日志文案 #4568
已合并
共 43 个文件变更+292-303
| @@ -54,7 +54,7 @@ ge::Status AicpuGraphOptimizer::Initialize(const map<string, string> &options, | |||
| 54 | if (ConfigFile::GetInstance().GetValue(kAutoCastMode, auto_cast_mode)) { | 54 | if (ConfigFile::GetInstance().GetValue(kAutoCastMode, auto_cast_mode)) { |
| 55 | auto_cast_mode_ = kAutoCastModeOff; | 55 | auto_cast_mode_ = kAutoCastModeOff; |
| 56 | if (StringToNum(auto_cast_mode, auto_cast_mode_).state != ge::SUCCESS) { | 56 | if (StringToNum(auto_cast_mode, auto_cast_mode_).state != ge::SUCCESS) { |
| 57 | - AICPUE_LOGW("Tran auto_cast_mode[%s] to integer failed. default value is [%d].", auto_cast_mode.c_str(), | 57 | + AICPUE_LOGW("Convert auto_cast_mode[%s] to integer failed, use default value[%d].", auto_cast_mode.c_str(), |
| 58 | auto_cast_mode_); | 58 | auto_cast_mode_); |
| 59 | } | 59 | } |
| 60 | } else { | 60 | } else { |
| @@ -301,7 +301,7 @@ ge::Status AicpuGraphOptimizer::OptimizeOriginalGraphJudgeInsert(ComputeGraph &g | |||
| 301 | ge::Status AicpuGraphOptimizer::OptimizeFusedGraph(ComputeGraph &graph) { | 301 | ge::Status AicpuGraphOptimizer::OptimizeFusedGraph(ComputeGraph &graph) { |
| 302 | std::string graph_name = graph.GetName(); | 302 | std::string graph_name = graph.GetName(); |
| 303 | ge::TraceManager::GetInstance().SetTraceOwner(kModuleName, kTraceFusedOptimizer, graph_name); | 303 | ge::TraceManager::GetInstance().SetTraceOwner(kModuleName, kTraceFusedOptimizer, graph_name); |
| 304 | - AICPUE_LOGI("begin to optimizer graph[%s]", graph_name.c_str()); | 304 | + AICPUE_LOGI("Begin to optimize graph[%s]", graph_name.c_str()); |
| 305 | if (IsEmptyGraph(graph)) { | 305 | if (IsEmptyGraph(graph)) { |
| 306 | ge::TraceManager::GetInstance().ClearTraceOwner(); | 306 | ge::TraceManager::GetInstance().ClearTraceOwner(); |
| 307 | return SUCCESS; | 307 | return SUCCESS; |
| @@ -351,7 +351,7 @@ ge::Status AicpuGraphOptimizer::OptimizeFusedGraph(ComputeGraph &graph) { | |||
| 351 | suffix = "After_Aicpu_Optimized"; | 351 | suffix = "After_Aicpu_Optimized"; |
| 352 | GraphOptimizerUtils::DumpGraph(graph, suffix); | 352 | GraphOptimizerUtils::DumpGraph(graph, suffix); |
| 353 | 353 | ||
| 354 | - AICPUE_LOGI("optimizer fused graph[%s] success.", graph_name.c_str()); | 354 | + AICPUE_LOGI("Optimize fused graph[%s] success.", graph_name.c_str()); |
| 355 | ge::TraceManager::GetInstance().ClearTraceOwner(); | 355 | ge::TraceManager::GetInstance().ClearTraceOwner(); |
| 356 | return ge::SUCCESS; | 356 | return ge::SUCCESS; |
| 357 | } | 357 | } |
| @@ -434,7 +434,7 @@ ge::Status AicpuGraphOptimizer::GetOpsParallelInfo(std::unordered_set<string> &o | |||
| 434 | ops_parallel_info.insert(op); | 434 | ops_parallel_info.insert(op); |
| 435 | AICPUE_LOGD("Insert a op[%s] in set success.", op.c_str()); | 435 | AICPUE_LOGD("Insert a op[%s] in set success.", op.c_str()); |
| 436 | if (ops_parallel_info.size() >= kMaxOpsParallelNum) { | 436 | if (ops_parallel_info.size() >= kMaxOpsParallelNum) { |
| 437 | - AICPUE_LOGW("ops parallel rule support the max num is %zu.", ops_parallel_info.size()); | 437 | + AICPUE_LOGW("The max num supported by ops parallel rule is %zu.", ops_parallel_info.size()); |
| 438 | break; | 438 | break; |
| 439 | } | 439 | } |
| 440 | } | 440 | } |
| @@ -447,8 +447,8 @@ ge::Status AicpuGraphOptimizer::SetStreamLabel(const ge::NodePtr &node, const st | |||
| 447 | AICPU_CHECK_NOTNULL(tmp_desc); | 447 | AICPU_CHECK_NOTNULL(tmp_desc); |
| 448 | 448 | ||
| 449 | if (!AttrUtils::SetStr(tmp_desc, "_stream_label", label)) { | 449 | if (!AttrUtils::SetStr(tmp_desc, "_stream_label", label)) { |
| 450 | - REPORT_INNER_ERR_MSG("E19999", "Set Attr:fail for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); | 450 | + REPORT_INNER_ERR_MSG("E19999", "Set Attr:failed for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); |
| 451 | - AICPUE_LOGE("[Set][Attr] fail for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); | 451 | + AICPUE_LOGE("[Set][Attr] failed for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); |
| 452 | return ge::FAILED; | 452 | return ge::FAILED; |
| 453 | } | 453 | } |
| 454 | 454 | ||
| @@ -466,7 +466,7 @@ ge::Status AicpuGraphOptimizer::SetStreamLabelForOpsParallel(ge::ComputeGraph &g | |||
| 466 | 466 | ||
| 467 | auto iter = ops_parallel_info.find(op_type); | 467 | auto iter = ops_parallel_info.find(op_type); |
| 468 | if (iter == ops_parallel_info.end()) { | 468 | if (iter == ops_parallel_info.end()) { |
| 469 | - AICPUE_LOGD("Current op type [%s]. Don't exist in ops parallel rule list.", op_type.c_str()); | 469 | + AICPUE_LOGD("Current op type [%s] does not exist in ops parallel rule list.", op_type.c_str()); |
| 470 | continue; | 470 | continue; |
| 471 | } | 471 | } |
| 472 | 472 | ||
| @@ -487,7 +487,7 @@ void AicpuGraphOptimizer::SetAicpuAsyncOpTimeout(const ge::OpDescPtr &op_desc_pt | |||
| 487 | auto op_iter = async_ops_timeout.find(op_type); | 487 | auto op_iter = async_ops_timeout.find(op_type); |
| 488 | if (op_iter != async_ops_timeout.end()) { | 488 | if (op_iter != async_ops_timeout.end()) { |
| 489 | (void)ge::AttrUtils::SetInt(op_desc_ptr, ATTR_NAME_BLOCKING_OP_TIMEOUT, op_iter->second); | 489 | (void)ge::AttrUtils::SetInt(op_desc_ptr, ATTR_NAME_BLOCKING_OP_TIMEOUT, op_iter->second); |
| 490 | - AICPUE_LOGI("Set op:%s timeout:%d", op_type.c_str(), op_iter->second); | 490 | + AICPUE_LOGI("Set op:%s timeout:%ld", op_type.c_str(), op_iter->second); |
| 491 | } | 491 | } |
| 492 | } | 492 | } |
| 493 | 493 | ||
| @@ -137,7 +137,7 @@ ge::Status CacheGraph::CreateAndInsertCacheUpdate(const OutDataAnchorPtr &src_an | |||
| 137 | AICPU_CHECK_RES_WITH_LOG(cache_update_op_desc->UpdateInputDesc(0, src_tensor_desc), | 137 | AICPU_CHECK_RES_WITH_LOG(cache_update_op_desc->UpdateInputDesc(0, src_tensor_desc), |
| 138 | "Call UpdateInputDesc function failed to update input[0] desc, op[CacheUpdate].") | 138 | "Call UpdateInputDesc function failed to update input[0] desc, op[CacheUpdate].") |
| 139 | AICPU_CHECK_RES_WITH_LOG(cache_update_op_desc->UpdateOutputDesc(0, dst_tensor_desc), | 139 | AICPU_CHECK_RES_WITH_LOG(cache_update_op_desc->UpdateOutputDesc(0, dst_tensor_desc), |
| 140 | - "Call UpdateInputDesc function failed to update output[0] desc, op[CacheUpdate].") | 140 | + "Call UpdateOutputDesc function failed to update output[0] desc, op[CacheUpdate].") |
| 141 | 141 | ||
| 142 | if ((sgt_flag) && (slice_info_ptr != nullptr)) { | 142 | if ((sgt_flag) && (slice_info_ptr != nullptr)) { |
| 143 | (void)cache_update_op_desc->SetExtAttr(kAttrNameSgtStruct, slice_info_ptr); | 143 | (void)cache_update_op_desc->SetExtAttr(kAttrNameSgtStruct, slice_info_ptr); |
| @@ -187,7 +187,7 @@ Status CacheGraph::GenerateNoCacheGraph(ComputeGraph &graph) { | |||
| 187 | AICPU_CHECK_NOTNULL(src_anchor) | 187 | AICPU_CHECK_NOTNULL(src_anchor) |
| 188 | auto nodes_and_anchors = curr_node->GetOutDataNodesAndAnchors(); | 188 | auto nodes_and_anchors = curr_node->GetOutDataNodesAndAnchors(); |
| 189 | AICPU_IF_BOOL_EXEC(nodes_and_anchors.empty(), | 189 | AICPU_IF_BOOL_EXEC(nodes_and_anchors.empty(), |
| 190 | - AICPUE_LOGI("no output data adge, op[%s]", curr_node->GetName().c_str()); | 190 | + AICPUE_LOGI("no output data edge, op[%s]", curr_node->GetName().c_str()); |
| 191 | continue) | 191 | continue) |
| 192 | InDataAnchorPtr dst_anchor = nodes_and_anchors.at(0).second; | 192 | InDataAnchorPtr dst_anchor = nodes_and_anchors.at(0).second; |
| 193 | AICPU_CHECK_NOTNULL(dst_anchor) | 193 | AICPU_CHECK_NOTNULL(dst_anchor) |
| @@ -198,7 +198,7 @@ Status CacheGraph::GenerateNoCacheGraph(ComputeGraph &graph) { | |||
| 198 | (void)GraphOptimizerUtils::CheckIsFftsPlus(curr_op_desc_ptr, slice_info_ptr, sgt_flag); | 198 | (void)GraphOptimizerUtils::CheckIsFftsPlus(curr_op_desc_ptr, slice_info_ptr, sgt_flag); |
| 199 | 199 | ||
| 200 | AICPU_CHECK_RES_WITH_LOG(CreateAndInsertCacheUpdate(src_anchor, dst_anchor, graph, slice_info_ptr, sgt_flag), | 200 | AICPU_CHECK_RES_WITH_LOG(CreateAndInsertCacheUpdate(src_anchor, dst_anchor, graph, slice_info_ptr, sgt_flag), |
| 201 | - "Call CreateAndInsertCacheUpdatef failed to insert CacheUpdate op" | 201 | + "Call CreateAndInsertCacheUpdate failed to insert CacheUpdate op" |
| 202 | " between op[%s] and op[%s].", | 202 | " between op[%s] and op[%s].", |
| 203 | curr_node->GetName().c_str(), nodes_and_anchors.at(0).first->GetName().c_str()) | 203 | curr_node->GetName().c_str(), nodes_and_anchors.at(0).first->GetName().c_str()) |
| 204 | } | 204 | } |
| @@ -221,7 +221,7 @@ Status CacheGraph::GenerateNoCacheGraph(ComputeGraph &graph) { | |||
| 221 | if (*end_rear_node_engine == "AIcoreEngine" || *parent_op_type == "NetOutput") { | 221 | if (*end_rear_node_engine == "AIcoreEngine" || *parent_op_type == "NetOutput") { |
| 222 | auto nodes_and_anchors = curr_node->GetInDataNodesAndAnchors(); | 222 | auto nodes_and_anchors = curr_node->GetInDataNodesAndAnchors(); |
| 223 | AICPU_IF_BOOL_EXEC( | 223 | AICPU_IF_BOOL_EXEC( |
| 224 | - nodes_and_anchors.empty(), AICPUE_LOGI("no in data adge, op[%s]", curr_node->GetName().c_str()); continue) | 224 | + nodes_and_anchors.empty(), AICPUE_LOGI("no in data edge, op[%s]", curr_node->GetName().c_str()); continue) |
| 225 | OutDataAnchorPtr src_anchor = nodes_and_anchors.at(0).second; | 225 | OutDataAnchorPtr src_anchor = nodes_and_anchors.at(0).second; |
| 226 | AICPU_CHECK_NOTNULL(src_anchor) | 226 | AICPU_CHECK_NOTNULL(src_anchor) |
| 227 | InDataAnchorPtr dst_anchor = curr_node->GetInDataAnchor(0); | 227 | InDataAnchorPtr dst_anchor = curr_node->GetInDataAnchor(0); |
| @@ -245,7 +245,7 @@ ge::Status AutoCastGraph::GenerateAutoCastGraph(ge::ComputeGraph &graph, | |||
| 245 | AICPU_CHECK_NOTNULL(op_desc_ptr) | 245 | AICPU_CHECK_NOTNULL(op_desc_ptr) |
| 246 | std::string op_type = op_desc_ptr->GetType(); | 246 | std::string op_type = op_desc_ptr->GetType(); |
| 247 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceHolderOpType) || (op_type == kEndOpType) || (op_type == kFunctionOp)), | 247 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceHolderOpType) || (op_type == kEndOpType) || (op_type == kFunctionOp)), |
| 248 | - AICPUE_LOGI("Current op type is [%s]. Don't need to AutoCast.", op_type.c_str()); | 248 | + AICPUE_LOGI("Current op type is [%s]. It does not need AutoCast.", op_type.c_str()); |
| 249 | continue) | 249 | continue) |
| 250 | // if op type is framework_op, get original op | 250 | // if op type is framework_op, get original op |
| 251 | AICPU_IF_BOOL_EXEC((op_type == kFrameworkOp), AICPU_CHECK_RES(GetFrameworkOpType(op_desc_ptr, op_type))) | 251 | AICPU_IF_BOOL_EXEC((op_type == kFrameworkOp), AICPU_CHECK_RES(GetFrameworkOpType(op_desc_ptr, op_type))) |
| @@ -85,7 +85,7 @@ void Optimizer::InitOpCheckMode() { | |||
| 85 | if (ConfigFile::GetInstance().GetValue(kOpCheckMode, op_check_mode)) { | 85 | if (ConfigFile::GetInstance().GetValue(kOpCheckMode, op_check_mode)) { |
| 86 | uint64_t result = kOpCheckModeOff; | 86 | uint64_t result = kOpCheckModeOff; |
| 87 | if (StringToNum(op_check_mode, result).state != ge::SUCCESS) { | 87 | if (StringToNum(op_check_mode, result).state != ge::SUCCESS) { |
| 88 | - AICPUE_LOGW("Tran op_check_mode [%s] to integer failed. default value is 0.", op_check_mode.c_str()); | 88 | + AICPUE_LOGW("Convert op_check_mode [%s] to integer failed, use default value 0.", op_check_mode.c_str()); |
| 89 | return; | 89 | return; |
| 90 | } | 90 | } |
| 91 | if (result == kOpCheckModeOn) { | 91 | if (result == kOpCheckModeOn) { |
| @@ -123,7 +123,7 @@ ge::Status Optimizer::InitSlicePattern(const std::string &slice, const ge::NodeP | |||
| 123 | } | 123 | } |
| 124 | Status state = fe::OpSliceUtil::SetOpSliceInfo(node, iter->second, kAicpuSupportStrideWrite); | 124 | Status state = fe::OpSliceUtil::SetOpSliceInfo(node, iter->second, kAicpuSupportStrideWrite); |
| 125 | if (state != SUCCESS) { | 125 | if (state != SUCCESS) { |
| 126 | - AICPU_REPORT_INNER_ERR_MSG("op[%s] SetOpSliceInfo[%s] fail[%u]", node->GetName().c_str(), slice.c_str(), state); | 126 | + AICPU_REPORT_INNER_ERR_MSG("op[%s] SetOpSliceInfo[%s] failed[%u]", node->GetName().c_str(), slice.c_str(), state); |
| 127 | return state; | 127 | return state; |
| 128 | } | 128 | } |
| 129 | return SUCCESS; | 129 | return SUCCESS; |
| @@ -138,7 +138,7 @@ Status Optimizer::OptimizeOriginalGraphJudgeInsert(const ComputeGraph &graph, | |||
| 138 | string op_type = curr_op_desc_ptr->GetType(); | 138 | string op_type = curr_op_desc_ptr->GetType(); |
| 139 | // if op type is placeholder or function_op or framework_op, skip it | 139 | // if op type is placeholder or function_op or framework_op, skip it |
| 140 | if (op_type == kPlaceHolderOpType || op_type == kFunctionOp || op_type == kFrameworkOp) { | 140 | if (op_type == kPlaceHolderOpType || op_type == kFunctionOp || op_type == kFrameworkOp) { |
| 141 | - AICPUE_LOGD("Current op type is [%s]. Don't need to set format.", op_type.c_str()); | 141 | + AICPUE_LOGD("Current op type is [%s]. It does not need to set format.", op_type.c_str()); |
| 142 | continue; | 142 | continue; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| @@ -182,7 +182,7 @@ Status Optimizer::UpdateInputFormatAndShape(const OpFullInfo &op_info, const OpD | |||
| 182 | for (GeTensorDescPtr input_desc_ptr : op_desc_ptr->GetAllInputsDescPtr()) { | 182 | for (GeTensorDescPtr input_desc_ptr : op_desc_ptr->GetAllInputsDescPtr()) { |
| 183 | ge::Format src_format = input_desc_ptr->GetFormat(); | 183 | ge::Format src_format = input_desc_ptr->GetFormat(); |
| 184 | if (!kGeFormatSet.count(src_format)) { | 184 | if (!kGeFormatSet.count(src_format)) { |
| 185 | - AICPUE_LOGD("input %u is not need update format and shape.", index); | 185 | + AICPUE_LOGD("input %u does not need to update format and shape.", index); |
| 186 | return SUCCESS; | 186 | return SUCCESS; |
| 187 | } | 187 | } |
| 188 | 188 | ||
| @@ -209,7 +209,7 @@ void Optimizer::UpdateTensorDesc(GeTensorDesc &tensor_desc, const ge::Format &sr | |||
| 209 | tensor_desc.SetFormat(dst_format); | 209 | tensor_desc.SetFormat(dst_format); |
| 210 | vector<int64_t> dims = tensor_desc.GetShape().GetDims(); | 210 | vector<int64_t> dims = tensor_desc.GetShape().GetDims(); |
| 211 | if (dims.size() != kShape4d) { | 211 | if (dims.size() != kShape4d) { |
| 212 | - AICPUE_LOGW("Input tensor is not 4D, but it's format is 4D."); | 212 | + AICPUE_LOGW("Input tensor is not 4D, but its format is 4D."); |
| 213 | return; | 213 | return; |
| 214 | } | 214 | } |
| 215 | vector<int64_t> newDims(dims); | 215 | vector<int64_t> newDims(dims); |
| @@ -232,7 +232,7 @@ void Optimizer::UpdateTensorDesc(GeTensorDesc &tensor_desc, const ge::Format &sr | |||
| 232 | return; | 232 | return; |
| 233 | } | 233 | } |
| 234 | if (shape_range.size() != kShape4d) { | 234 | if (shape_range.size() != kShape4d) { |
| 235 | - AICPUE_LOGW("shape range size is [%u], is not 4", shape_range.size()); | 235 | + AICPUE_LOGW("shape range size is [%zu], expected 4.", shape_range.size()); |
| 236 | } else { | 236 | } else { |
| 237 | std::vector<std::pair<int64_t, int64_t>> new_range; | 237 | std::vector<std::pair<int64_t, int64_t>> new_range; |
| 238 | if (src_format == ge::FORMAT_NCHW) { | 238 | if (src_format == ge::FORMAT_NCHW) { |
| @@ -257,7 +257,7 @@ Status Optimizer::UpdateOutputFormatAndShape(const OpFullInfo &op_info, const Op | |||
| 257 | for (GeTensorDescPtr output_desc_ptr : op_desc_ptr->GetAllOutputsDescPtr()) { | 257 | for (GeTensorDescPtr output_desc_ptr : op_desc_ptr->GetAllOutputsDescPtr()) { |
| 258 | ge::Format src_format = output_desc_ptr->GetFormat(); | 258 | ge::Format src_format = output_desc_ptr->GetFormat(); |
| 259 | if (!kGeFormatSet.count(src_format)) { | 259 | if (!kGeFormatSet.count(src_format)) { |
| 260 | - AICPUE_LOGD("output[%u] is not need update format and shape.", index); | 260 | + AICPUE_LOGD("output[%u] does not need to update format and shape.", index); |
| 261 | return SUCCESS; | 261 | return SUCCESS; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| @@ -120,7 +120,7 @@ Status KernelBuilder::GetWorkspaceInfo(const OpDescPtr &op_desc_ptr, const uint8 | |||
| 120 | AICPUE_LOGI("The workspace byte size is [%lu], op[%s]", workspace_bytes_size, op_desc_ptr->GetName().c_str()); | 120 | AICPUE_LOGI("The workspace byte size is [%lu], op[%s]", workspace_bytes_size, op_desc_ptr->GetName().c_str()); |
| 121 | // Check workspace mem | 121 | // Check workspace mem |
| 122 | CHECK_INT64_ADD_OVERFLOW(workspace_mem_base, workspace_bytes_size, DATA_OVERFLOW, | 122 | CHECK_INT64_ADD_OVERFLOW(workspace_mem_base, workspace_bytes_size, DATA_OVERFLOW, |
| 123 | - "Overflow when offset workspace bytes[%lu] base on workspace addr[%ld], op[%s]", | 123 | + "Overflow when offset workspace bytes[%lu] based on workspace addr[%ld], op[%s]", |
| 124 | workspace_bytes_size, workspace_mem_base, op_desc_ptr->GetName().c_str()) | 124 | workspace_bytes_size, workspace_mem_base, op_desc_ptr->GetName().c_str()) |
| 125 | 125 | ||
| 126 | return SUCCESS; | 126 | return SUCCESS; |
| @@ -290,13 +290,13 @@ Status KernelBuilder::GetFftsPlusInAddrOffset(const ge::OpDescPtr &op_desc_ptr, | |||
| 290 | int64_t temp_size = 1; | 290 | int64_t temp_size = 1; |
| 291 | for (size_t j = 0; j < ffts_info.thread_input_shape[index][i].size(); j++) { | 291 | for (size_t j = 0; j < ffts_info.thread_input_shape[index][i].size(); j++) { |
| 292 | CHECK_INT64_MUL_OVERFLOW(temp_size, ffts_info.thread_input_shape[index][i][j], ErrorCode::DATA_OVERFLOW, | 292 | CHECK_INT64_MUL_OVERFLOW(temp_size, ffts_info.thread_input_shape[index][i][j], ErrorCode::DATA_OVERFLOW, |
| 293 | - "Mul Operator for int64 is data overflow, temp_size is[%ld]," | 293 | + "Int64 multiplication overflow, temp_size is[%ld]," |
| 294 | " thread_input_shape is [%ld]", | 294 | " thread_input_shape is [%ld]", |
| 295 | temp_size, ffts_info.thread_input_shape[index][i][j]) | 295 | temp_size, ffts_info.thread_input_shape[index][i][j]) |
| 296 | temp_size *= ffts_info.thread_input_shape[index][i][j]; | 296 | temp_size *= ffts_info.thread_input_shape[index][i][j]; |
| 297 | } | 297 | } |
| 298 | CHECK_INT64_MUL_OVERFLOW(temp_size, data_size, ErrorCode::DATA_OVERFLOW, | 298 | CHECK_INT64_MUL_OVERFLOW(temp_size, data_size, ErrorCode::DATA_OVERFLOW, |
| 299 | - "Mul Operator for int64 is data overflow, temp_size is[%ld]," | 299 | + "Int64 multiplication overflow, temp_size is[%ld]," |
| 300 | " data_size is [%d]", | 300 | " data_size is [%d]", |
| 301 | temp_size, data_size) | 301 | temp_size, data_size) |
| 302 | ffts_info.input_addr_offset.push_back(temp_size * data_size); | 302 | ffts_info.input_addr_offset.push_back(temp_size * data_size); |
| @@ -308,8 +308,8 @@ Status KernelBuilder::GetFftsPlusInAddrOffset(const ge::OpDescPtr &op_desc_ptr, | |||
| 308 | Status KernelBuilder::GetFftsPlusOutAddrOffset(const ge::OpDescPtr &op_desc_ptr, FftsPlusInfo &ffts_info) const { | 308 | Status KernelBuilder::GetFftsPlusOutAddrOffset(const ge::OpDescPtr &op_desc_ptr, FftsPlusInfo &ffts_info) const { |
| 309 | const uint32_t index = ffts_info.slice_instance_index; | 309 | const uint32_t index = ffts_info.slice_instance_index; |
| 310 | if (index >= ffts_info.thread_output_shape.size()) { | 310 | if (index >= ffts_info.thread_output_shape.size()) { |
| 311 | - AICPU_REPORT_INNER_ERR_MSG("Node[%s] index[%u], thread_output_shape[%zu], ", op_desc_ptr->GetName().c_str(), index, | 311 | + AICPU_REPORT_INNER_ERR_MSG("Node[%s] index[%u] is out of range, thread_output_shape size[%zu].", |
| 312 | - ffts_info.thread_output_shape.size()); | 312 | + op_desc_ptr->GetName().c_str(), index, ffts_info.thread_output_shape.size()); |
| 313 | return ge::GE_GRAPH_INIT_FAILED; | 313 | return ge::GE_GRAPH_INIT_FAILED; |
| 314 | } | 314 | } |
| 315 | const size_t output_size = op_desc_ptr->GetAllOutputsDescSize(); | 315 | const size_t output_size = op_desc_ptr->GetAllOutputsDescSize(); |
| @@ -330,13 +330,13 @@ Status KernelBuilder::GetFftsPlusOutAddrOffset(const ge::OpDescPtr &op_desc_ptr, | |||
| 330 | int64_t temp_size = 1; | 330 | int64_t temp_size = 1; |
| 331 | for (size_t j = 0; j < ffts_info.thread_output_shape[index][i].size(); j++) { | 331 | for (size_t j = 0; j < ffts_info.thread_output_shape[index][i].size(); j++) { |
| 332 | CHECK_INT64_MUL_OVERFLOW(temp_size, ffts_info.thread_output_shape[index][i][j], ErrorCode::DATA_OVERFLOW, | 332 | CHECK_INT64_MUL_OVERFLOW(temp_size, ffts_info.thread_output_shape[index][i][j], ErrorCode::DATA_OVERFLOW, |
| 333 | - "Mul Operator for int64 is data overflow, temp_size is[%ld]," | 333 | + "Int64 multiplication overflow, temp_size is[%ld]," |
| 334 | " thread_output_shape is [%ld]", | 334 | " thread_output_shape is [%ld]", |
| 335 | temp_size, ffts_info.thread_output_shape[index][i][j]) | 335 | temp_size, ffts_info.thread_output_shape[index][i][j]) |
| 336 | temp_size *= ffts_info.thread_output_shape[index][i][j]; | 336 | temp_size *= ffts_info.thread_output_shape[index][i][j]; |
| 337 | } | 337 | } |
| 338 | CHECK_INT64_MUL_OVERFLOW(temp_size, data_size, ErrorCode::DATA_OVERFLOW, | 338 | CHECK_INT64_MUL_OVERFLOW(temp_size, data_size, ErrorCode::DATA_OVERFLOW, |
| 339 | - "Mul Operator for int64 is data overflow, temp_size is[%ld]," | 339 | + "Int64 multiplication overflow, temp_size is[%ld]," |
| 340 | " data_size is [%d]", | 340 | " data_size is [%d]", |
| 341 | temp_size, data_size) | 341 | temp_size, data_size) |
| 342 | ffts_info.output_addr_offset.push_back(temp_size * data_size); | 342 | ffts_info.output_addr_offset.push_back(temp_size * data_size); |
| @@ -144,7 +144,7 @@ bool AicpuOpsKernelInfoStore::CheckSupported(const OpDescPtr &op_desc_ptr, strin | |||
| 144 | // check whether the op is in aicpu ops kernel info store | 144 | // check whether the op is in aicpu ops kernel info store |
| 145 | auto iter = op_full_infos_.find(op_type); | 145 | auto iter = op_full_infos_.find(op_type); |
| 146 | if (iter == op_full_infos_.end()) { | 146 | if (iter == op_full_infos_.end()) { |
| 147 | - AICPUE_LOGI("Internal kernel info store not include this op[%s].", op_type.c_str()); | 147 | + AICPUE_LOGI("Internal kernel info store does not include this op[%s].", op_type.c_str()); |
| 148 | unsupported_reason = "Aicpu kernel info store not include this op "; | 148 | unsupported_reason = "Aicpu kernel info store not include this op "; |
| 149 | unsupported_reason.append(op_type); | 149 | unsupported_reason.append(op_type); |
| 150 | return false; | 150 | return false; |
| @@ -401,7 +401,7 @@ ge::Status AicpuOpsKernelInfoStore::CompileOp(vector<ge::NodePtr> &node_vec) { | |||
| 401 | return ge::SUCCESS; | 401 | return ge::SUCCESS; |
| 402 | } | 402 | } |
| 403 | 403 | ||
| 404 | - AICPUE_LOGI("AicpuOpsKernelInfoStore's start CompileOp."); | 404 | + AICPUE_LOGI("AicpuOpsKernelInfoStore starts CompileOp."); |
| 405 | map<string, OpFullInfo> all_op_info; | 405 | map<string, OpFullInfo> all_op_info; |
| 406 | GetAllOpsFullKernelInfo(all_op_info); | 406 | GetAllOpsFullKernelInfo(all_op_info); |
| 407 | for (ge::NodePtr &node : node_vec) { | 407 | for (ge::NodePtr &node : node_vec) { |
| @@ -427,7 +427,7 @@ ge::Status AicpuOpsKernelInfoStore::CompileOp(vector<ge::NodePtr> &node_vec) { | |||
| 427 | AICPU_CHECK_RES(kernel_lib_ptr->CompileOp(node)); | 427 | AICPU_CHECK_RES(kernel_lib_ptr->CompileOp(node)); |
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | - AICPUE_LOGI("AicpuOpsKernelInfoStore's last Op run CompileOp Success."); | 430 | + AICPUE_LOGI("The last op of AicpuOpsKernelInfoStore ran CompileOp successfully."); |
| 431 | return ge::SUCCESS; | 431 | return ge::SUCCESS; |
| 432 | } | 432 | } |
| 433 | } // namespace aicpu | 433 | } // namespace aicpu |
| @@ -441,7 +441,7 @@ bool OpsJsonFile::CheckAndGetWorkspaceSize(const nlohmann::json &buff, const std | |||
| 441 | workspace_size, kMaxWorkspaceSize, op_name.c_str()); | 441 | workspace_size, kMaxWorkspaceSize, op_name.c_str()); |
| 442 | return false; | 442 | return false; |
| 443 | } else if (workspace_size > kMaxWorkspaceSize) { | 443 | } else if (workspace_size > kMaxWorkspaceSize) { |
| 444 | - AICPUE_LOGW("workspaceSize is morn than 500kb and set it to 500kb"); | 444 | + AICPUE_LOGW("workspaceSize is more than %d bytes, set it to %d bytes", kMaxWorkspaceSize, kMaxWorkspaceSize); |
| 445 | workspace_size = kMaxWorkspaceSize; | 445 | workspace_size = kMaxWorkspaceSize; |
| 446 | } | 446 | } |
| 447 | } else { | 447 | } else { |
| @@ -47,11 +47,11 @@ bool OpsParallelRuleJsonFile::ConvertOpsParallelRuleJsonFormat(json &json_read) | |||
| 47 | return false) | 47 | return false) |
| 48 | new_json[kOpNameList] = ops_name_list; | 48 | new_json[kOpNameList] = ops_name_list; |
| 49 | json_read = new_json; | 49 | json_read = new_json; |
| 50 | - AICPUE_LOGI("Convert ops parallel json [rule:%s]success.", kOpsParallelRule.c_str()); | 50 | + AICPUE_LOGI("Convert ops parallel json [rule:%s] success.", kOpsParallelRule.c_str()); |
| 51 | return true; | 51 | return true; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | - AICPUE_LOGI("Convert ops parallel json [rule:%s] fail.", kOpsParallelRule.c_str()); | 54 | + AICPUE_LOGI("Convert ops parallel json [rule:%s] failed.", kOpsParallelRule.c_str()); |
| 55 | return false; | 55 | return false; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| @@ -436,7 +436,7 @@ bool ReadBytesFromBinaryFile(const std::string &file_name, std::vector<char> &bu | |||
| 436 | buffer.resize(size); | 436 | buffer.resize(size); |
| 437 | file.read(&buffer[0], size); | 437 | file.read(&buffer[0], size); |
| 438 | file.close(); | 438 | file.close(); |
| 439 | - AICPUE_LOGI("Binary file size is[%ld]", size); | 439 | + AICPUE_LOGI("Binary file size is[%ld] bytes", size); |
| 440 | return true; | 440 | return true; |
| 441 | } | 441 | } |
| 442 | 442 | ||
| @@ -535,7 +535,7 @@ Status SetOutPutsSize(shared_ptr<OpDesc> &op_desc_ptr) { | |||
| 535 | if (!dims.empty()) { | 535 | if (!dims.empty()) { |
| 536 | aicpu::State state = GetTotalSizeByDimsAndType(output_data_type, dims, output_mem_size); | 536 | aicpu::State state = GetTotalSizeByDimsAndType(output_data_type, dims, output_mem_size); |
| 537 | AICPU_IF_BOOL_EXEC(state.state != ge::SUCCESS, | 537 | AICPU_IF_BOOL_EXEC(state.state != ge::SUCCESS, |
| 538 | - AICPU_REPORT_INNER_ERR_MSG("Overflow occurred when calculate total " | 538 | + AICPU_REPORT_INNER_ERR_MSG("Overflow occurred when calculating total " |
| 539 | "bytes of output[%zu], %s, op[%s]", | 539 | "bytes of output[%zu], %s, op[%s]", |
| 540 | i, state.msg.c_str(), op_desc_ptr->GetName().c_str()); | 540 | i, state.msg.c_str(), op_desc_ptr->GetName().c_str()); |
| 541 | return state.state) | 541 | return state.state) |
| @@ -559,7 +559,7 @@ Status SetOutPutsSize(shared_ptr<OpDesc> &op_desc_ptr) { | |||
| 559 | const GeShape &output_shape = output_tensor.GetShape(); | 559 | const GeShape &output_shape = output_tensor.GetShape(); |
| 560 | aicpu::State state = GetTotalSizeByShapeAndType(output_data_type, output_shape, output_mem_size); | 560 | aicpu::State state = GetTotalSizeByShapeAndType(output_data_type, output_shape, output_mem_size); |
| 561 | AICPU_IF_BOOL_EXEC(state.state != ge::SUCCESS, | 561 | AICPU_IF_BOOL_EXEC(state.state != ge::SUCCESS, |
| 562 | - AICPU_REPORT_INNER_ERR_MSG("Overflow occurred when calculate total " | 562 | + AICPU_REPORT_INNER_ERR_MSG("Overflow occurred when calculating total " |
| 563 | "bytes of output[%zu], %s, op[%s]", | 563 | "bytes of output[%zu], %s, op[%s]", |
| 564 | i, state.msg.c_str(), op_desc_ptr->GetName().c_str()); | 564 | i, state.msg.c_str(), op_desc_ptr->GetName().c_str()); |
| 565 | return state.state) | 565 | return state.state) |
| @@ -568,16 +568,16 @@ Status SetOutPutsSize(shared_ptr<OpDesc> &op_desc_ptr) { | |||
| 568 | const GeShape &output_shape = output_tensor.GetShape(); | 568 | const GeShape &output_shape = output_tensor.GetShape(); |
| 569 | aicpu::State state = GetTotalSizeByShapeAndType(output_data_type, output_shape, output_mem_size); | 569 | aicpu::State state = GetTotalSizeByShapeAndType(output_data_type, output_shape, output_mem_size); |
| 570 | AICPU_IF_BOOL_EXEC(state.state != ge::SUCCESS, | 570 | AICPU_IF_BOOL_EXEC(state.state != ge::SUCCESS, |
| 571 | - AICPU_REPORT_INNER_ERR_MSG("Overflow occurred when calculate total " | 571 | + AICPU_REPORT_INNER_ERR_MSG("Overflow occurred when calculating total " |
| 572 | "bytes of output[%zu], %s, op[%s]", | 572 | "bytes of output[%zu], %s, op[%s]", |
| 573 | i, state.msg.c_str(), op_desc_ptr->GetName().c_str()); | 573 | i, state.msg.c_str(), op_desc_ptr->GetName().c_str()); |
| 574 | return state.state) | 574 | return state.state) |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | - AICPUE_LOGI("After the output [%zu]'s calc, the total size is [%ld]", i, output_mem_size); | 577 | + AICPUE_LOGI("After the output [%zu]'s calc, the total size is [%ld] bytes", i, output_mem_size); |
| 578 | if (output_mem_size > LONG_MAX) { | 578 | if (output_mem_size > LONG_MAX) { |
| 579 | AICPU_REPORT_INNER_ERR_MSG( | 579 | AICPU_REPORT_INNER_ERR_MSG( |
| 580 | - "Overflow occurred when calculate %zuth output " | 580 | + "Overflow occurred when calculating %zuth output " |
| 581 | "total bytes, data type[%s], shape[%s], op[%s].", | 581 | "total bytes, data type[%s], shape[%s], op[%s].", |
| 582 | i, ge::TypeUtils::DataTypeToSerialString(output_data_type).c_str(), | 582 | i, ge::TypeUtils::DataTypeToSerialString(output_data_type).c_str(), |
| 583 | DebugString(output_tensor.GetShape().GetDims()).c_str(), op_desc_ptr->GetName().c_str()); | 583 | DebugString(output_tensor.GetShape().GetDims()).c_str(), op_desc_ptr->GetName().c_str()); |
| @@ -622,7 +622,8 @@ Status SetOutSizeForSummary(shared_ptr<OpDesc> &op_desc_ptr) { | |||
| 622 | AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetListInt failed to set attr[%s], op[%s]", | 622 | AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetListInt failed to set attr[%s], op[%s]", |
| 623 | kOutputAlignmentVector.c_str(), op_desc_ptr->GetName().c_str())) | 623 | kOutputAlignmentVector.c_str(), op_desc_ptr->GetName().c_str())) |
| 624 | 624 | ||
| 625 | - AICPUE_LOGI("Set output size with ResultSummary for unknown type 4 ok, op: %s.", op_desc_ptr->GetName().c_str()); | 625 | + AICPUE_LOGI("Set output size with ResultSummary for unknown shape type[DEPEND_COMPUTE] ok, op: %s.", |
| 626 | + op_desc_ptr->GetName().c_str()); | ||
| 626 | return SUCCESS; | 627 | return SUCCESS; |
| 627 | } | 628 | } |
| 628 | 629 | ||
| @@ -648,13 +649,13 @@ State GetTotalSizeByDimsAndType(const ge::DataType &data_type, const vector<int6 | |||
| 648 | return state; | 649 | return state; |
| 649 | } | 650 | } |
| 650 | CHECK_INT64_MUL_OVERFLOW(total_num, dims[i], aicpu::State(DATA_OVERFLOW), | 651 | CHECK_INT64_MUL_OVERFLOW(total_num, dims[i], aicpu::State(DATA_OVERFLOW), |
| 651 | - "Overflow when calculate tensor total bytes, shape[%s], data type[%s],", | 652 | + "Overflow when calculating tensor total bytes, shape[%s], data type[%s].", |
| 652 | DebugString(dims).c_str(), ge::TypeUtils::DataTypeToSerialString(data_type).c_str()) | 653 | DebugString(dims).c_str(), ge::TypeUtils::DataTypeToSerialString(data_type).c_str()) |
| 653 | total_num *= dims[i]; | 654 | total_num *= dims[i]; |
| 654 | } | 655 | } |
| 655 | 656 | ||
| 656 | CHECK_INT64_MUL_OVERFLOW(total_num, data_size, aicpu::State(DATA_OVERFLOW), | 657 | CHECK_INT64_MUL_OVERFLOW(total_num, data_size, aicpu::State(DATA_OVERFLOW), |
| 657 | - "Overflow when calculate tensor total bytes, shape[%s], data type[%s],", | 658 | + "Overflow when calculating tensor total bytes, shape[%s], data type[%s].", |
| 658 | DebugString(dims).c_str(), ge::TypeUtils::DataTypeToSerialString(data_type).c_str()) | 659 | DebugString(dims).c_str(), ge::TypeUtils::DataTypeToSerialString(data_type).c_str()) |
| 659 | total_size = total_num * data_size; | 660 | total_size = total_num * data_size; |
| 660 | return aicpu::State(SUCCESS); | 661 | return aicpu::State(SUCCESS); |
| @@ -678,13 +679,13 @@ Status GetOutSizeByShapeRange(const DataType &data_type, const vector<pair<int64 | |||
| 678 | AICPU_CHECK_SHAPE_RANGE_GREATER_THAN_OR_EQUAL_TO_ZERO(dim_item.second, GE_SHAPE_SIZE_INVAILD, | 679 | AICPU_CHECK_SHAPE_RANGE_GREATER_THAN_OR_EQUAL_TO_ZERO(dim_item.second, GE_SHAPE_SIZE_INVAILD, |
| 679 | "Invalid value[%ld] of dim[%zu].", dim_item.second, index) | 680 | "Invalid value[%ld] of dim[%zu].", dim_item.second, index) |
| 680 | CHECK_INT64_MUL_OVERFLOW(total_num, dim_item.second, DATA_OVERFLOW, | 681 | CHECK_INT64_MUL_OVERFLOW(total_num, dim_item.second, DATA_OVERFLOW, |
| 681 | - "Overflow when calculate tensor shape range total bytes") | 682 | + "Overflow when calculating tensor shape range total bytes") |
| 682 | total_num *= dim_item.second; | 683 | total_num *= dim_item.second; |
| 683 | } | 684 | } |
| 684 | CHECK_INT64_MUL_OVERFLOW(total_num, data_size, DATA_OVERFLOW, | 685 | CHECK_INT64_MUL_OVERFLOW(total_num, data_size, DATA_OVERFLOW, |
| 685 | - "Overflow when calculate tensor shape range total bytes") | 686 | + "Overflow when calculating tensor shape range total bytes") |
| 686 | total_size = total_num * data_size; | 687 | total_size = total_num * data_size; |
| 687 | - AICPUE_LOGI("Calc output size by shape range ok, total_size[%ld].", total_size); | 688 | + AICPUE_LOGI("Calc output size by shape range ok, total_size[%ld] bytes.", total_size); |
| 688 | return SUCCESS; | 689 | return SUCCESS; |
| 689 | } | 690 | } |
| 690 | 691 | ||
| @@ -725,9 +726,9 @@ ge::Status GetOriginalType(const ge::OpDescPtr &op_desc_ptr, std::string &type) | |||
| 725 | AICPU_IF_BOOL_EXEC(type != kFrameworkOp, return SUCCESS) | 726 | AICPU_IF_BOOL_EXEC(type != kFrameworkOp, return SUCCESS) |
| 726 | const std::string *type_ptr = ge::AttrUtils::GetStr(op_desc_ptr, kOriginalType); | 727 | const std::string *type_ptr = ge::AttrUtils::GetStr(op_desc_ptr, kOriginalType); |
| 727 | if (type_ptr == nullptr) { | 728 | if (type_ptr == nullptr) { |
| 728 | - AICPU_REPORT_INNER_ERR_MSG("Get Attr:%s fail from op:%s(%s)", kOriginalType.c_str(), op_desc_ptr->GetName().c_str(), | 729 | + AICPU_REPORT_INNER_ERR_MSG("Get Attr:%s failed from op:%s(%s)", kOriginalType.c_str(), |
| 729 | - op_desc_ptr->GetType().c_str()); | 730 | + op_desc_ptr->GetName().c_str(), op_desc_ptr->GetType().c_str()); |
| 730 | - AICPUE_LOGE("[Get][Attr] %s fail from op:%s(%s)", kOriginalType.c_str(), op_desc_ptr->GetName().c_str(), | 731 | + AICPUE_LOGE("[Get][Attr] %s failed from op:%s(%s)", kOriginalType.c_str(), op_desc_ptr->GetName().c_str(), |
| 731 | op_desc_ptr->GetType().c_str()); | 732 | op_desc_ptr->GetType().c_str()); |
| 732 | return GET_ATTR_FAILED; | 733 | return GET_ATTR_FAILED; |
| 733 | } | 734 | } |
| @@ -802,12 +803,12 @@ bool ReadConfigFile(const string &file_path, std::vector<string> &result) { | |||
| 802 | size_t pos_of_equal = line.find('='); | 803 | size_t pos_of_equal = line.find('='); |
| 803 | if (pos_of_equal == std::string::npos) { | 804 | if (pos_of_equal == std::string::npos) { |
| 804 | ifs.close(); | 805 | ifs.close(); |
| 805 | - AICPU_REPORT_INNER_ERR_MSG("[ReadConfigFile] Config format is error."); | 806 | + AICPU_REPORT_INNER_ERR_MSG("[ReadConfigFile] Config format is invalid."); |
| 806 | return false; | 807 | return false; |
| 807 | } | 808 | } |
| 808 | std::string value = line.substr(pos_of_equal + 1); | 809 | std::string value = line.substr(pos_of_equal + 1); |
| 809 | SplitLine(value, kConfigItemSeparator, result); | 810 | SplitLine(value, kConfigItemSeparator, result); |
| 810 | - AICPUE_LOGI("Get number %zu custom path.", result.size()); | 811 | + AICPUE_LOGI("Get %zu custom paths.", result.size()); |
| 811 | break; | 812 | break; |
| 812 | } | 813 | } |
| 813 | ifs.close(); | 814 | ifs.close(); |
| @@ -187,7 +187,7 @@ int32_t AddStringAttrToNodeDef(const ge::Operator &op, const char *name, [[maybe | |||
| 187 | 187 | ||
| 188 | attr_value.set_s(s); | 188 | attr_value.set_s(s); |
| 189 | 189 | ||
| 190 | - AICPUE_LOGD("Finish add string attr to neod def, name[%s].", name); | 190 | + AICPUE_LOGD("Finish add string attr to node def, name[%s].", name); |
| 191 | return 0; | 191 | return 0; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| @@ -208,7 +208,7 @@ int32_t AddListStringAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 208 | array->add_s(value); | 208 | array->add_s(value); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | - AICPUE_LOGD("Finish add list string attr to neod def, name[%s].", name); | 211 | + AICPUE_LOGD("Finish add list string attr to node def, name[%s].", name); |
| 212 | return 0; | 212 | return 0; |
| 213 | } | 213 | } |
| 214 | 214 | ||
| @@ -222,7 +222,7 @@ int32_t AddFloatAttrToNodeDef(const ge::Operator &op, const char *name, [[maybe_ | |||
| 222 | 222 | ||
| 223 | attr_value.set_f(f); | 223 | attr_value.set_f(f); |
| 224 | 224 | ||
| 225 | - AICPUE_LOGD("Finish add float attr to neod def, name[%s].", name); | 225 | + AICPUE_LOGD("Finish add float attr to node def, name[%s].", name); |
| 226 | return 0; | 226 | return 0; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| @@ -243,7 +243,7 @@ int32_t AddListFloatAttrToNodeDef(const ge::Operator &op, const char *name, [[ma | |||
| 243 | array->add_f(value); | 243 | array->add_f(value); |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | - AICPUE_LOGD("Finish add list float attr to neod def, name[%s].", name); | 246 | + AICPUE_LOGD("Finish add list float attr to node def, name[%s].", name); |
| 247 | return 0; | 247 | return 0; |
| 248 | } | 248 | } |
| 249 | 249 | ||
| @@ -257,7 +257,7 @@ int32_t AddBoolAttrToNodeDef(const ge::Operator &op, const char *name, [[maybe_u | |||
| 257 | 257 | ||
| 258 | attr_value.set_b(b); | 258 | attr_value.set_b(b); |
| 259 | 259 | ||
| 260 | - AICPUE_LOGD("Finish add bool attr to neod def, name[%s].", name); | 260 | + AICPUE_LOGD("Finish add bool attr to node def, name[%s].", name); |
| 261 | return 0; | 261 | return 0; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| @@ -278,7 +278,7 @@ int32_t AddListBoolAttrToNodeDef(const ge::Operator &op, const char *name, [[may | |||
| 278 | array->add_b(value); | 278 | array->add_b(value); |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | - AICPUE_LOGD("Finish add list bool attr to neod def, name[%s].", name); | 281 | + AICPUE_LOGD("Finish add list bool attr to node def, name[%s].", name); |
| 282 | return 0; | 282 | return 0; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| @@ -292,7 +292,7 @@ int32_t AddIntAttrToNodeDef(const ge::Operator &op, const char *name, [[maybe_un | |||
| 292 | 292 | ||
| 293 | attr_value.set_i(i); | 293 | attr_value.set_i(i); |
| 294 | 294 | ||
| 295 | - AICPUE_LOGD("Finish add int attr to neod def, name[%s].", name); | 295 | + AICPUE_LOGD("Finish add int attr to node def, name[%s].", name); |
| 296 | return 0; | 296 | return 0; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| @@ -313,7 +313,7 @@ int32_t AddListIntAttrToNodeDef(const ge::Operator &op, const char *name, [[mayb | |||
| 313 | array->add_i(value); | 313 | array->add_i(value); |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | - AICPUE_LOGD("Finish add list int attr to neod def, name[%s].", name); | 316 | + AICPUE_LOGD("Finish add list int attr to node def, name[%s].", name); |
| 317 | return 0; | 317 | return 0; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| @@ -338,7 +338,7 @@ int32_t AddListListIntAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 338 | } | 338 | } |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | - AICPUE_LOGD("Finish add list int int attr to neod def, name[%s].", name); | 341 | + AICPUE_LOGD("Finish add list int int attr to node def, name[%s].", name); |
| 342 | return 0; | 342 | return 0; |
| 343 | } | 343 | } |
| 344 | 344 | ||
| @@ -352,7 +352,7 @@ int32_t AddDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, [[may | |||
| 352 | 352 | ||
| 353 | attr_value.set_type(data_type); | 353 | attr_value.set_type(data_type); |
| 354 | 354 | ||
| 355 | - AICPUE_LOGD("Finish add datatype attr to neod def, name[%s].", name); | 355 | + AICPUE_LOGD("Finish add datatype attr to node def, name[%s].", name); |
| 356 | return 0; | 356 | return 0; |
| 357 | } | 357 | } |
| 358 | 358 | ||
| @@ -373,7 +373,7 @@ int32_t AddListDataTypeAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 373 | array->add_type(value); | 373 | array->add_type(value); |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | - AICPUE_LOGD("Finish add list datatype attr to neod def, name[%s].", name); | 376 | + AICPUE_LOGD("Finish add list datatype attr to node def, name[%s].", name); |
| 377 | return 0; | 377 | return 0; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| @@ -409,7 +409,7 @@ int32_t AddTensorAttrToNodeDef(const ge::Operator &op, const char *name, [[maybe | |||
| 409 | aicpu_dims->set_size(dims[i]); | 409 | aicpu_dims->set_size(dims[i]); |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | - AICPUE_LOGD("Finish add tensor attr to neod def, name[%s].", name); | 412 | + AICPUE_LOGD("Finish add tensor attr to node def, name[%s].", name); |
| 413 | return 0; | 413 | return 0; |
| 414 | } | 414 | } |
| 415 | 415 | ||
| @@ -452,7 +452,7 @@ int32_t AddListTensorAttrToNodeDef(const ge::Operator &op, const char *name, | |||
| 452 | } | 452 | } |
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | - AICPUE_LOGD("Finish add list tensor attr to neod def, name[%s].", name); | 455 | + AICPUE_LOGD("Finish add list tensor attr to node def, name[%s].", name); |
| 456 | return 0; | 456 | return 0; |
| 457 | } | 457 | } |
| 458 | 458 | ||
| @@ -118,7 +118,7 @@ bool AicpuCustKernelInfo::LoadJsonFile(const std::string &file_path, nlohmann::j | |||
| 118 | try { | 118 | try { |
| 119 | ifs >> out_json; | 119 | ifs >> out_json; |
| 120 | } catch (const std::exception &e) { | 120 | } catch (const std::exception &e) { |
| 121 | - AICPUE_LOGW("json parse on %s.", file_path.c_str()); | 121 | + AICPUE_LOGW("Parse json file[%s] failed.", file_path.c_str()); |
| 122 | return false; | 122 | return false; |
| 123 | } | 123 | } |
| 124 | return true; | 124 | return true; |
| @@ -151,7 +151,7 @@ bool AicpuCustKernelInfo::IsAicpuJsonFile(const std::string &filename) const { | |||
| 151 | 151 | ||
| 152 | const bool has_prefix = filename.compare(0, prefix.size(), prefix) == 0; | 152 | const bool has_prefix = filename.compare(0, prefix.size(), prefix) == 0; |
| 153 | const bool has_suffix = filename.compare(filename.size() - suffix.size(), suffix.size(), suffix) == 0; | 153 | const bool has_suffix = filename.compare(filename.size() - suffix.size(), suffix.size(), suffix) == 0; |
| 154 | - AICPUE_LOGI("check is aicpu json file which has prefix is %d, has suffix is %d.", has_prefix, has_suffix); | 154 | + AICPUE_LOGI("Check aicpu json file: has_prefix[%d], has_suffix[%d].", has_prefix, has_suffix); |
| 155 | 155 | ||
| 156 | return has_prefix && has_suffix; | 156 | return has_prefix && has_suffix; |
| 157 | } | 157 | } |
| @@ -197,7 +197,7 @@ bool AicpuCustKernelInfo::RecordBuiltInCustConfigFile(const std::string &builtin | |||
| 197 | 197 | ||
| 198 | const std::string output_path = builtin_custom_config_dir + kAicpuBuiltInCustOpsFilePath; | 198 | const std::string output_path = builtin_custom_config_dir + kAicpuBuiltInCustOpsFilePath; |
| 199 | if (!SaveJsonFile(output_path, merged_json)) { | 199 | if (!SaveJsonFile(output_path, merged_json)) { |
| 200 | - AICPUE_LOGW("save json to %s not success.", output_path.c_str()); | 200 | + AICPUE_LOGW("Failed to save json to %s.", output_path.c_str()); |
| 201 | return false; | 201 | return false; |
| 202 | } | 202 | } |
| 203 | 203 | ||
| @@ -101,8 +101,8 @@ ge::Status CpuKernelBuilder::CalcOpRunningParam(const ge::Node &node) const { | |||
| 101 | AICPU_CHECK_RES_WITH_LOG(CalFftsMaxThread(op_desc_ptr), "cal ffts plus task max thread size failed, op[%s].", | 101 | AICPU_CHECK_RES_WITH_LOG(CalFftsMaxThread(op_desc_ptr), "cal ffts plus task max thread size failed, op[%s].", |
| 102 | node.GetName().c_str()) | 102 | node.GetName().c_str()) |
| 103 | } | 103 | } |
| 104 | - AICPUE_LOGI("CPUKernel's op %s[%s] run CalcOpRunningParam success. workspace total size is %ld", node_name.c_str(), | 104 | + AICPUE_LOGI("CPUKernel's op %s[%s] run CalcOpRunningParam success. workspace total size is %ld bytes", |
| 105 | - node_type.c_str(), workspace_size); | 105 | + node_name.c_str(), node_type.c_str(), workspace_size); |
| 106 | return ge::SUCCESS; | 106 | return ge::SUCCESS; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| @@ -124,14 +124,14 @@ ge::Status CpuKernelBuilder::BuildMemCopyInfo(const ge::OpDescPtr &op_desc_ptr, | |||
| 124 | // When it's aicpu customized ops, get customized attr | 124 | // When it's aicpu customized ops, get customized attr |
| 125 | if (has_customized_attr) { | 125 | if (has_customized_attr) { |
| 126 | CHECK_UINT32_ADD_OVERFLOW(param_len, sizeof(uint32_t), ErrorCode::DATA_OVERFLOW, | 126 | CHECK_UINT32_ADD_OVERFLOW(param_len, sizeof(uint32_t), ErrorCode::DATA_OVERFLOW, |
| 127 | - "Overflow when param total bytes[%u] add 4bytes, op[%s]", param_len, | 127 | + "Overflow when adding %zu bytes to param total bytes[%u], op[%s]", sizeof(uint32_t), |
| 128 | - op_desc_ptr->GetName().c_str()) | 128 | + param_len, op_desc_ptr->GetName().c_str()) |
| 129 | param_len += sizeof(uint32_t); | 129 | param_len += sizeof(uint32_t); |
| 130 | // Customized attr length must be less than UINT32_MAX, no need to check | 130 | // Customized attr length must be less than UINT32_MAX, no need to check |
| 131 | // overflow | 131 | // overflow |
| 132 | uint32_t customized_attr_len = static_cast<uint32_t>(bytes.GetSize()); | 132 | uint32_t customized_attr_len = static_cast<uint32_t>(bytes.GetSize()); |
| 133 | CHECK_UINT32_ADD_OVERFLOW(param_len, customized_attr_len, ErrorCode::DATA_OVERFLOW, | 133 | CHECK_UINT32_ADD_OVERFLOW(param_len, customized_attr_len, ErrorCode::DATA_OVERFLOW, |
| 134 | - "Overflow when calculate total bytes of task param[%u] and custom " | 134 | + "Overflow when calculating total bytes of task param[%u] and custom " |
| 135 | "attr[%u], op[%s]", | 135 | "attr[%u], op[%s]", |
| 136 | param_len, customized_attr_len, op_desc_ptr->GetName().c_str()) | 136 | param_len, customized_attr_len, op_desc_ptr->GetName().c_str()) |
| 137 | param_len += customized_attr_len; | 137 | param_len += customized_attr_len; |
| @@ -202,8 +202,8 @@ ge::Status CpuKernelBuilder::GenerateMemCopyTask(uint64_t data_info_size, const | |||
| 202 | AICPUE_LOGI("Op[%s], op type[%s] start GenerateMemCopyTask", node->GetName().c_str(), node->GetType().c_str()); | 202 | AICPUE_LOGI("Op[%s], op type[%s] start GenerateMemCopyTask", node->GetName().c_str(), node->GetType().c_str()); |
| 203 | 203 | ||
| 204 | aicpuops::NodeDef node_def; | 204 | aicpuops::NodeDef node_def; |
| 205 | - AICPU_CHECK_RES_WITH_LOG(BuildAicpuNodeDef(op_desc_ptr, node_def), | 205 | + AICPU_CHECK_RES_WITH_LOG(BuildAicpuNodeDef(op_desc_ptr, node_def), "Call BuildAicpuNodeDef function failed, op[%s].", |
| 206 | - "Call BuildMemCopyInfo function BuildAicpuNodeDef failed op[%s].", node->GetName().c_str()) | 206 | + node->GetName().c_str()) |
| 207 | 207 | ||
| 208 | auto state = InsertAicpuNodeDefAttrToOp(op_desc_ptr, node_def, kCustomizedOpDef); | 208 | auto state = InsertAicpuNodeDefAttrToOp(op_desc_ptr, node_def, kCustomizedOpDef); |
| 209 | if (state != ge::SUCCESS) { | 209 | if (state != ge::SUCCESS) { |
| @@ -335,9 +335,9 @@ ge::Status CpuKernelBuilder::MakeAicpuKernelExtInfo(const ge::OpDescPtr &op_desc | |||
| 335 | const FftsPlusInfo &ffts_info) const { | 335 | const FftsPlusInfo &ffts_info) const { |
| 336 | const std::string *kernel_lib_name = ge::AttrUtils::GetStr(op_desc_ptr, "opKernelLib"); | 336 | const std::string *kernel_lib_name = ge::AttrUtils::GetStr(op_desc_ptr, "opKernelLib"); |
| 337 | AICPU_CHECK_RES_WITH_LOG(MakeBaseExtInfo(op_desc_ptr, task_ext_info, ffts_info), | 337 | AICPU_CHECK_RES_WITH_LOG(MakeBaseExtInfo(op_desc_ptr, task_ext_info, ffts_info), |
| 338 | - "Call MakeTaskExtInfo funtion failed, op[%s].", op_desc_ptr->GetName().c_str()) | 338 | + "Call MakeBaseExtInfo function failed, op[%s].", op_desc_ptr->GetName().c_str()) |
| 339 | AICPU_CHECK_RES_WITH_LOG(MakeNoTilingExtInfo(op_desc_ptr, task_ext_info), | 339 | AICPU_CHECK_RES_WITH_LOG(MakeNoTilingExtInfo(op_desc_ptr, task_ext_info), |
| 340 | - "Call MakeNoTilingExtInfo funtion failed, op[%s].", op_desc_ptr->GetName().c_str()) | 340 | + "Call MakeNoTilingExtInfo function failed, op[%s].", op_desc_ptr->GetName().c_str()) |
| 341 | uint64_t extend_info_len = task_ext_info.size(); | 341 | uint64_t extend_info_len = task_ext_info.size(); |
| 342 | extend_info_len += aicpu::FWKAdapter::kExtInfoHeadSize; | 342 | extend_info_len += aicpu::FWKAdapter::kExtInfoHeadSize; |
| 343 | extend_info_len += sizeof(SessionInfo); | 343 | extend_info_len += sizeof(SessionInfo); |
| @@ -383,13 +383,13 @@ ge::Status UpdateParamLengthByCustomizedAttr(const ge::OpDescPtr &op_desc_ptr, c | |||
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | CHECK_UINT32_ADD_OVERFLOW(param_length, sizeof(uint32_t), ErrorCode::DATA_OVERFLOW, | 385 | CHECK_UINT32_ADD_OVERFLOW(param_length, sizeof(uint32_t), ErrorCode::DATA_OVERFLOW, |
| 386 | - "Overflow when param total bytes[%u] add 4bytes, op[%s]", param_length, | 386 | + "Overflow when adding %zu bytes to param total bytes[%u], op[%s]", sizeof(uint32_t), |
| 387 | - op_desc_ptr->GetName().c_str()) | 387 | + param_length, op_desc_ptr->GetName().c_str()) |
| 388 | param_length += sizeof(uint32_t); | 388 | param_length += sizeof(uint32_t); |
| 389 | // Customized attr length must be less than UINT32_MAX, no need to check overflow | 389 | // Customized attr length must be less than UINT32_MAX, no need to check overflow |
| 390 | uint32_t customized_attr_len = static_cast<uint32_t>(bytes.GetSize()); | 390 | uint32_t customized_attr_len = static_cast<uint32_t>(bytes.GetSize()); |
| 391 | CHECK_UINT32_ADD_OVERFLOW(param_length, customized_attr_len, ErrorCode::DATA_OVERFLOW, | 391 | CHECK_UINT32_ADD_OVERFLOW(param_length, customized_attr_len, ErrorCode::DATA_OVERFLOW, |
| 392 | - "Overflow when calculate total bytes of task param[%u] and custom " | 392 | + "Overflow when calculating total bytes of task param[%u] and custom " |
| 393 | "attr[%u], op[%s]", | 393 | "attr[%u], op[%s]", |
| 394 | param_length, customized_attr_len, op_desc_ptr->GetName().c_str()) | 394 | param_length, customized_attr_len, op_desc_ptr->GetName().c_str()) |
| 395 | param_length += customized_attr_len; | 395 | param_length += customized_attr_len; |
| @@ -624,8 +624,9 @@ ge::Status CpuKernelBuilder::BuildAiCpuFftsKernelDef(const ge::Node &node, FftsP | |||
| 624 | kernel_def->set_args_size(args_size); | 624 | kernel_def->set_args_size(args_size); |
| 625 | kernel_def->set_kernel_ext_info(info.data(), info_size); | 625 | kernel_def->set_kernel_ext_info(info.data(), info_size); |
| 626 | kernel_def->set_kernel_ext_info_size(info_size); | 626 | kernel_def->set_kernel_ext_info_size(info_size); |
| 627 | - AICPUE_LOGI("op [%s][%s]arg size[%u], extinfo size[%u],kernel[%s],fun[%s]", op_desc_ptr->GetName().c_str(), | 627 | + AICPUE_LOGI("op [%s][%s] arg size[%u] bytes, extinfo size[%u] bytes, kernel[%s], fun[%s]", |
| 628 | - op_desc_ptr->GetType().c_str(), args_size, info_size, kernel_so_name.c_str(), func_name.c_str()); | 628 | + op_desc_ptr->GetName().c_str(), op_desc_ptr->GetType().c_str(), args_size, info_size, |
| 629 | + kernel_so_name.c_str(), func_name.c_str()); | ||
| 629 | return ge::SUCCESS; | 630 | return ge::SUCCESS; |
| 630 | } | 631 | } |
| 631 | 632 | ||
| @@ -647,7 +648,7 @@ ge::Status CpuKernelBuilder::GenerateFftsPlusTask(const ge::Node &node) const { | |||
| 647 | try { | 648 | try { |
| 648 | ffts_plus_ctx_def = std::make_shared<domi::FftsPlusCtxDef>(); | 649 | ffts_plus_ctx_def = std::make_shared<domi::FftsPlusCtxDef>(); |
| 649 | } catch (...) { | 650 | } catch (...) { |
| 650 | - AICPU_REPORT_INNER_ERR_MSG("op[%s] Create FftsPlusCtxDef fail", node.GetName().c_str()); | 651 | + AICPU_REPORT_INNER_ERR_MSG("op[%s] create FftsPlusCtxDef failed", node.GetName().c_str()); |
| 651 | return MEMORY_ALLOC_FAILED; | 652 | return MEMORY_ALLOC_FAILED; |
| 652 | } | 653 | } |
| 653 | 654 | ||
| @@ -656,7 +657,7 @@ ge::Status CpuKernelBuilder::GenerateFftsPlusTask(const ge::Node &node) const { | |||
| 656 | AICPU_CHECK_NOTNULL(aicpu_ctx); | 657 | AICPU_CHECK_NOTNULL(aicpu_ctx); |
| 657 | state = BuildAiCpuCtx(op_desc_ptr, ffts_info, aicpu_ctx); | 658 | state = BuildAiCpuCtx(op_desc_ptr, ffts_info, aicpu_ctx); |
| 658 | if (state != ge::SUCCESS) { | 659 | if (state != ge::SUCCESS) { |
| 659 | - AICPU_REPORT_INNER_ERR_MSG("op[%s] call BuildAiCpuCtx fail", node.GetName().c_str()); | 660 | + AICPU_REPORT_INNER_ERR_MSG("op[%s] call BuildAiCpuCtx failed", node.GetName().c_str()); |
| 660 | return state; | 661 | return state; |
| 661 | } | 662 | } |
| 662 | state = BuildAiCpuFftsKernelDef(node, ffts_info, aicpu_ctx); | 663 | state = BuildAiCpuFftsKernelDef(node, ffts_info, aicpu_ctx); |
| @@ -679,7 +680,7 @@ int64_t CpuKernelBuilder::CeilDivisor(const int64_t x, const int64_t base) const | |||
| 679 | 680 | ||
| 680 | uint32_t CpuKernelBuilder::GetOpBlockDim(const ge::OpDescPtr &op_desc_ptr) const { | 681 | uint32_t CpuKernelBuilder::GetOpBlockDim(const ge::OpDescPtr &op_desc_ptr) const { |
| 681 | if (!IsSupportBlockDim(op_desc_ptr)) { | 682 | if (!IsSupportBlockDim(op_desc_ptr)) { |
| 682 | - AICPUE_LOGD("op[%s] is not support block dim.", op_desc_ptr->GetName().c_str()); | 683 | + AICPUE_LOGD("op[%s] does not support block dim.", op_desc_ptr->GetName().c_str()); |
| 683 | return kDefaultAicpuBlockDim; | 684 | return kDefaultAicpuBlockDim; |
| 684 | } | 685 | } |
| 685 | 686 | ||
| @@ -702,13 +703,13 @@ uint32_t CpuKernelBuilder::GetOpBlockDim(const ge::OpDescPtr &op_desc_ptr) const | |||
| 702 | uint32_t CpuKernelBuilder::GetOpBlockDimForFftsPlus(const ge::OpDescPtr &op_desc_ptr, const FftsPlusInfo &ffts_info, | 703 | uint32_t CpuKernelBuilder::GetOpBlockDimForFftsPlus(const ge::OpDescPtr &op_desc_ptr, const FftsPlusInfo &ffts_info, |
| 703 | const uint32_t thread_index) const { | 704 | const uint32_t thread_index) const { |
| 704 | if (!IsSupportBlockDim(op_desc_ptr)) { | 705 | if (!IsSupportBlockDim(op_desc_ptr)) { |
| 705 | - AICPUE_LOGD("op[%s] is not support block dim.", op_desc_ptr->GetName().c_str()); | 706 | + AICPUE_LOGD("op[%s] does not support block dim.", op_desc_ptr->GetName().c_str()); |
| 706 | return kDefaultAicpuBlockDim; | 707 | return kDefaultAicpuBlockDim; |
| 707 | } | 708 | } |
| 708 | AICPUE_LOGD("op[%s], thread_index[%u].", op_desc_ptr->GetName().c_str(), thread_index); | 709 | AICPUE_LOGD("op[%s], thread_index[%u].", op_desc_ptr->GetName().c_str(), thread_index); |
| 709 | 710 | ||
| 710 | if (thread_index >= ffts_info.thread_input_shape.size()) { | 711 | if (thread_index >= ffts_info.thread_input_shape.size()) { |
| 711 | - AICPUE_LOGW("op[%s] get dim error. thread_id[%d]", op_desc_ptr->GetName().c_str(), thread_index); | 712 | + AICPUE_LOGW("op[%s] failed to get dim, thread_index[%d]", op_desc_ptr->GetName().c_str(), thread_index); |
| 712 | return kDefaultAicpuBlockDim; | 713 | return kDefaultAicpuBlockDim; |
| 713 | } | 714 | } |
| 714 | vector<int64_t> input_0 = ffts_info.thread_input_shape[thread_index][0]; | 715 | vector<int64_t> input_0 = ffts_info.thread_input_shape[thread_index][0]; |
| @@ -722,7 +723,7 @@ uint32_t CpuKernelBuilder::GetOpBlockDimForFftsPlus(const ge::OpDescPtr &op_desc | |||
| 722 | if (block_dim_index < vec_size) { | 723 | if (block_dim_index < vec_size) { |
| 723 | total = input_0[block_dim_index]; | 724 | total = input_0[block_dim_index]; |
| 724 | } else { | 725 | } else { |
| 725 | - AICPUE_LOGW("op[%s] get total error.", op_desc_ptr->GetName().c_str()); | 726 | + AICPUE_LOGW("op[%s] failed to get total.", op_desc_ptr->GetName().c_str()); |
| 726 | return kDefaultAicpuBlockDim; | 727 | return kDefaultAicpuBlockDim; |
| 727 | } | 728 | } |
| 728 | } | 729 | } |
| @@ -732,7 +733,7 @@ uint32_t CpuKernelBuilder::GetOpBlockDimForFftsPlus(const ge::OpDescPtr &op_desc | |||
| 732 | 733 | ||
| 733 | bool CpuKernelBuilder::IsSupportBlockDim(const ge::OpDescPtr &op_desc_ptr) const { | 734 | bool CpuKernelBuilder::IsSupportBlockDim(const ge::OpDescPtr &op_desc_ptr) const { |
| 734 | if (IsUnknowShape(op_desc_ptr)) { | 735 | if (IsUnknowShape(op_desc_ptr)) { |
| 735 | - AICPUE_LOGD("op[%s] is unknow shape.", op_desc_ptr->GetName().c_str()); | 736 | + AICPUE_LOGD("op[%s] is unknown shape.", op_desc_ptr->GetName().c_str()); |
| 736 | return false; | 737 | return false; |
| 737 | } | 738 | } |
| 738 | bool support_block_dim = false; | 739 | bool support_block_dim = false; |
| @@ -90,7 +90,7 @@ ge::Status CpuOptimizer::Initialize() { | |||
| 90 | if (ge::GetContext().GetOption(ge::SOC_VERSION, soc_version) == ge::GRAPH_SUCCESS) { | 90 | if (ge::GetContext().GetOption(ge::SOC_VERSION, soc_version) == ge::GRAPH_SUCCESS) { |
| 91 | AICPUE_LOGI("Get soc version [%s] success.", soc_version.c_str()); | 91 | AICPUE_LOGI("Get soc version [%s] success.", soc_version.c_str()); |
| 92 | } else { | 92 | } else { |
| 93 | - AICPUE_LOG_RUN_INFO("Get soc version abnormal. Please check!"); | 93 | + AICPUE_LOG_RUN_INFO("Failed to get soc version, please check."); |
| 94 | return ge::SUCCESS; | 94 | return ge::SUCCESS; |
| 95 | } | 95 | } |
| 96 | CheckAndSetSocVersion(soc_version); | 96 | CheckAndSetSocVersion(soc_version); |
| @@ -107,7 +107,7 @@ void CpuOptimizer::CheckAndSetSocVersion(const std::string &soc_version_from_ge) | |||
| 107 | } else if (soc_version_from_ge.find("Ascend710") == 0) { | 107 | } else if (soc_version_from_ge.find("Ascend710") == 0) { |
| 108 | g_soc_version = "Ascend710"; | 108 | g_soc_version = "Ascend710"; |
| 109 | } else { | 109 | } else { |
| 110 | - AICPUE_LOG_RUN_INFO("Check soc version [%s] abnormal, Please check!", soc_version_from_ge.c_str()); | 110 | + AICPUE_LOG_RUN_INFO("Soc version [%s] is not recognized, please check.", soc_version_from_ge.c_str()); |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
| @@ -131,7 +131,7 @@ ge::Status CpuOptimizer::OptimizeOriginalGraph(ge::ComputeGraph &graph, | |||
| 131 | 131 | ||
| 132 | std::string kernel_lib_name = GetKernelLibNameByOpType(op_type, all_op_info); | 132 | std::string kernel_lib_name = GetKernelLibNameByOpType(op_type, all_op_info); |
| 133 | if (kernel_lib_name == kHostCpuKernelInfoChoice) { | 133 | if (kernel_lib_name == kHostCpuKernelInfoChoice) { |
| 134 | - AICPUE_LOGI("[%s] don't need to clear 64-byte alignment attribute", kHostCpuKernelInfoChoice.c_str()); | 134 | + AICPUE_LOGI("[%s] does not need to clear 64-byte alignment attribute", kHostCpuKernelInfoChoice.c_str()); |
| 135 | return ge::SUCCESS; | 135 | return ge::SUCCESS; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| @@ -213,7 +213,7 @@ ge::Status CpuOptimizer::BuildAndSetFusedAicpuNodeDef(const ge::NodePtr &node, c | |||
| 213 | is_ffts_plus = true; | 213 | is_ffts_plus = true; |
| 214 | ge::Status state = BuildFftsPlusAicpuNodeDef(op_desc_ptr, ffts_info); | 214 | ge::Status state = BuildFftsPlusAicpuNodeDef(op_desc_ptr, ffts_info); |
| 215 | if (state != ge::SUCCESS) { | 215 | if (state != ge::SUCCESS) { |
| 216 | - AICPU_REPORT_INNER_ERR_MSG("[%s]BuildFftsInfoAicpuNodeDef fail state[%u]", node->GetName().c_str(), state); | 216 | + AICPU_REPORT_INNER_ERR_MSG("[%s]BuildFftsInfoAicpuNodeDef failed, state[%u]", node->GetName().c_str(), state); |
| 217 | return state; | 217 | return state; |
| 218 | } | 218 | } |
| 219 | return ge::SUCCESS; | 219 | return ge::SUCCESS; |
| @@ -245,7 +245,7 @@ ge::Status CpuOptimizer::OptimizeFusedGraph(ge::ComputeGraph &graph, | |||
| 245 | AICPU_CHECK_NOTNULL(op_desc_ptr) | 245 | AICPU_CHECK_NOTNULL(op_desc_ptr) |
| 246 | std::string op_type = op_desc_ptr->GetType(); | 246 | std::string op_type = op_desc_ptr->GetType(); |
| 247 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceholderOpType) || (op_type == kEndOpType)), | 247 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceholderOpType) || (op_type == kEndOpType)), |
| 248 | - AICPUE_LOGD("Current op type is [%s]. Don't need to fuse.", op_type.c_str()); | 248 | + AICPUE_LOGD("Current op type is [%s]. It does not need to fuse.", op_type.c_str()); |
| 249 | continue) | 249 | continue) |
| 250 | // if op type is framework_op, get original op | 250 | // if op type is framework_op, get original op |
| 251 | AICPU_IF_BOOL_EXEC((op_type == kFrameworkOp), AICPU_CHECK_RES(GetFrameworkOpType(op_desc_ptr, op_type))) | 251 | AICPU_IF_BOOL_EXEC((op_type == kFrameworkOp), AICPU_CHECK_RES(GetFrameworkOpType(op_desc_ptr, op_type))) |
| @@ -476,10 +476,8 @@ void CpuOptimizer::InitLoadCpuKernelsType() { | |||
| 476 | if (ConfigFile::GetInstance().GetValue(kLoadCpuKernelsInModel, load_type_for_cpu_kernels)) { | 476 | if (ConfigFile::GetInstance().GetValue(kLoadCpuKernelsInModel, load_type_for_cpu_kernels)) { |
| 477 | uint64_t result = kDefaultLoadTypeForCpuKernels; | 477 | uint64_t result = kDefaultLoadTypeForCpuKernels; |
| 478 | if (StringToNum(load_type_for_cpu_kernels, result).state != ge::SUCCESS) { | 478 | if (StringToNum(load_type_for_cpu_kernels, result).state != ge::SUCCESS) { |
| 479 | - AICPUE_LOGW( | 479 | + AICPUE_LOGW("Convert LoadCpuKernelsInModel [%s] to integer failed, use default value 0.", |
| 480 | - "Tran LoadCpuKernelsInModel [%s] to integer failed. default value is " | 480 | + load_type_for_cpu_kernels.c_str()); |
| 481 | - "0.", | ||
| 482 | - load_type_for_cpu_kernels.c_str()); | ||
| 483 | return; | 481 | return; |
| 484 | } | 482 | } |
| 485 | // if load_type_for_cpu_kernels from config file is not 0 or 1, print | 483 | // if load_type_for_cpu_kernels from config file is not 0 or 1, print |
| @@ -355,7 +355,7 @@ ge::Status CheckAndSetUnknowType(ge::OpDescPtr &op_desc_ptr, const map<string, O | |||
| 355 | string op_type = op_desc_ptr->GetType(); | 355 | string op_type = op_desc_ptr->GetType(); |
| 356 | if (IsUnknowShape(op_desc_ptr)) { | 356 | if (IsUnknowShape(op_desc_ptr)) { |
| 357 | AICPU_CHECK_FALSE_EXEC(AttrUtils::SetBool(op_desc_ptr, kAttrNameUnknownShape, true), | 357 | AICPU_CHECK_FALSE_EXEC(AttrUtils::SetBool(op_desc_ptr, kAttrNameUnknownShape, true), |
| 358 | - AICPU_REPORT_INNER_ERR_MSG("Call Set ge::AttrUtils::SetBool failed to set attr[%s], op[%s].", | 358 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetBool failed to set attr[%s], op[%s].", |
| 359 | kAttrNameUnknownShape.c_str(), op_desc_ptr->GetName().c_str()); | 359 | kAttrNameUnknownShape.c_str(), op_desc_ptr->GetName().c_str()); |
| 360 | return ErrorCode::ADD_ATTR_FAILED) | 360 | return ErrorCode::ADD_ATTR_FAILED) |
| 361 | } | 361 | } |
| @@ -440,7 +440,7 @@ ge::Status InsertAicpuNodeDefAttrToOp(const ge::OpDescPtr &op_desc_ptr, aicpuops | |||
| 440 | // 保证序列化的接口的一致性 | 440 | // 保证序列化的接口的一致性 |
| 441 | output_stream.SetSerializationDeterministic(true); | 441 | output_stream.SetSerializationDeterministic(true); |
| 442 | if (!(node_def.SerializeToCodedStream(&output_stream))) { | 442 | if (!(node_def.SerializeToCodedStream(&output_stream))) { |
| 443 | - AICPU_REPORT_INNER_ERR_MSG("The serialization from nodedef probuf to str failed, op[%s].", | 443 | + AICPU_REPORT_INNER_ERR_MSG("The serialization from nodedef protobuf to str failed, op[%s].", |
| 444 | op_desc_ptr->GetName().c_str()); | 444 | op_desc_ptr->GetName().c_str()); |
| 445 | return ErrorCode::CREATE_NODEDEF_FAILED; | 445 | return ErrorCode::CREATE_NODEDEF_FAILED; |
| 446 | } | 446 | } |
| @@ -543,7 +543,7 @@ ge::Status BuildFftsPlusAicpuNodeDef(const ge::OpDescPtr &op_desc_ptr, FftsPlusI | |||
| 543 | ffts_info.slice_instance_index = 0; | 543 | ffts_info.slice_instance_index = 0; |
| 544 | ge::Status state = BuildFftsPlusAicpuNodeShapeInfo(op_desc_ptr, node_def, ffts_info); | 544 | ge::Status state = BuildFftsPlusAicpuNodeShapeInfo(op_desc_ptr, node_def, ffts_info); |
| 545 | if (state != ge::SUCCESS) { | 545 | if (state != ge::SUCCESS) { |
| 546 | - AICPU_REPORT_INNER_ERR_MSG("op[%s] build shape info fail[%u]", op_desc_ptr->GetName().c_str(), state); | 546 | + AICPU_REPORT_INNER_ERR_MSG("op[%s] build shape info failed, state[%u]", op_desc_ptr->GetName().c_str(), state); |
| 547 | return CREATE_NODEDEF_FAILED; | 547 | return CREATE_NODEDEF_FAILED; |
| 548 | } | 548 | } |
| 549 | aicpuops::NodeDef tail_node_def; | 549 | aicpuops::NodeDef tail_node_def; |
| @@ -551,7 +551,7 @@ ge::Status BuildFftsPlusAicpuNodeDef(const ge::OpDescPtr &op_desc_ptr, FftsPlusI | |||
| 551 | ffts_info.slice_instance_index = ffts_info.slice_instance_num - kAicpuManualSliceNum; | 551 | ffts_info.slice_instance_index = ffts_info.slice_instance_num - kAicpuManualSliceNum; |
| 552 | state = BuildFftsPlusAicpuNodeShapeInfo(op_desc_ptr, tail_node_def, ffts_info); | 552 | state = BuildFftsPlusAicpuNodeShapeInfo(op_desc_ptr, tail_node_def, ffts_info); |
| 553 | if (state != ge::SUCCESS) { | 553 | if (state != ge::SUCCESS) { |
| 554 | - AICPU_REPORT_INNER_ERR_MSG("op[%s] build shape info fail[%u]", op_desc_ptr->GetName().c_str(), state); | 554 | + AICPU_REPORT_INNER_ERR_MSG("op[%s] build shape info failed, state[%u]", op_desc_ptr->GetName().c_str(), state); |
| 555 | return CREATE_NODEDEF_FAILED; | 555 | return CREATE_NODEDEF_FAILED; |
| 556 | } | 556 | } |
| 557 | } | 557 | } |
| @@ -616,13 +616,13 @@ ge::NodePtr CreateTransposeNode(ge::ComputeGraph &graph, const std::string &name | |||
| 616 | 616 | ||
| 617 | ge::Status ret = transpose_op_desc->AddInputDesc("x", tensor_desc); | 617 | ge::Status ret = transpose_op_desc->AddInputDesc("x", tensor_desc); |
| 618 | if (ret != ge::GRAPH_SUCCESS) { | 618 | if (ret != ge::GRAPH_SUCCESS) { |
| 619 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc x failed ret[%u]", ret); | 619 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc for input x failed, ret[%u]", ret); |
| 620 | return nullptr; | 620 | return nullptr; |
| 621 | } | 621 | } |
| 622 | 622 | ||
| 623 | ret = transpose_op_desc->AddInputDesc("perm", perm_const_desc->GetOutputDesc(0)); | 623 | ret = transpose_op_desc->AddInputDesc("perm", perm_const_desc->GetOutputDesc(0)); |
| 624 | if (ret != ge::GRAPH_SUCCESS) { | 624 | if (ret != ge::GRAPH_SUCCESS) { |
| 625 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc x failed ret[%u]", ret); | 625 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc for input perm failed, ret[%u]", ret); |
| 626 | return nullptr; | 626 | return nullptr; |
| 627 | } | 627 | } |
| 628 | vector<int64_t> x_shape = tensor_desc.GetShape().GetDims(); | 628 | vector<int64_t> x_shape = tensor_desc.GetShape().GetDims(); |
| @@ -695,14 +695,14 @@ ge::Status GenerateTransposeAfterNode(ge::ComputeGraph &graph, const ge::NodePtr | |||
| 695 | continue; | 695 | continue; |
| 696 | } | 696 | } |
| 697 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::RemoveEdge(src_anchor, peer_in_anchor), | 697 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::RemoveEdge(src_anchor, peer_in_anchor), |
| 698 | - "call RemoveEdge between %s and %s", node->GetName().c_str(), | 698 | + "Call RemoveEdge failed between op[%s] and op[%s].", node->GetName().c_str(), |
| 699 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); | 699 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); |
| 700 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(transpose->GetOutDataAnchor(0), peer_in_anchor), | 700 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(transpose->GetOutDataAnchor(0), peer_in_anchor), |
| 701 | - "call AddEdge between transpose and %s", | 701 | + "Call AddEdge failed between transpose and op[%s].", |
| 702 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); | 702 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); |
| 703 | } | 703 | } |
| 704 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(src_anchor, transpose->GetInDataAnchor(0)), | 704 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(src_anchor, transpose->GetInDataAnchor(0)), |
| 705 | - "call AddEdge between transpose %s and transpose", node->GetName().c_str()); | 705 | + "Call AddEdge failed between op[%s] and transpose.", node->GetName().c_str()); |
| 706 | return ge::GRAPH_SUCCESS; | 706 | return ge::GRAPH_SUCCESS; |
| 707 | } | 707 | } |
| 708 | 708 | ||
| @@ -736,14 +736,14 @@ ge::Status GenerateTransposeBeforeNode(ge::ComputeGraph &graph, const ge::NodePt | |||
| 736 | continue; | 736 | continue; |
| 737 | } | 737 | } |
| 738 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::RemoveEdge(src_anchor, peer_in_anchor), | 738 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::RemoveEdge(src_anchor, peer_in_anchor), |
| 739 | - "call RemoveEdge between %s and %s", src_op->GetName().c_str(), | 739 | + "Call RemoveEdge failed between op[%s] and op[%s].", src_op->GetName().c_str(), |
| 740 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); | 740 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); |
| 741 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(transpose->GetOutDataAnchor(0), peer_in_anchor), | 741 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(transpose->GetOutDataAnchor(0), peer_in_anchor), |
| 742 | - "call AddEdge between transpose and %s", | 742 | + "Call AddEdge failed between transpose and op[%s].", |
| 743 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); | 743 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); |
| 744 | } | 744 | } |
| 745 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(src_anchor, transpose->GetInDataAnchor(0)), | 745 | AICPU_CHECK_RES_WITH_LOG(ge::GraphUtils::AddEdge(src_anchor, transpose->GetInDataAnchor(0)), |
| 746 | - "call AddEdge between transpose %s and transpose", src_op->GetName().c_str()); | 746 | + "Call AddEdge failed between op[%s] and transpose.", src_op->GetName().c_str()); |
| 747 | return ge::GRAPH_SUCCESS; | 747 | return ge::GRAPH_SUCCESS; |
| 748 | } | 748 | } |
| 749 | 749 | ||
| @@ -311,7 +311,7 @@ ge::Status Ir2tfBaseParser::SetTfAttrType(const ge::OpDescPtr &op_desc_ptr, domi | |||
| 311 | size_t first_underline_pos = expression.find_first_of('_'); | 311 | size_t first_underline_pos = expression.find_first_of('_'); |
| 312 | CHECK_RES_BOOL( | 312 | CHECK_RES_BOOL( |
| 313 | first_underline_pos != std::string::npos, ErrorCode::IR2TF_CONFIG_PARSE_FAILED, | 313 | first_underline_pos != std::string::npos, ErrorCode::IR2TF_CONFIG_PARSE_FAILED, |
| 314 | - AICPU_REPORT_INNER_ERR_MSG("Invalid parser express[%s] should be contain '-'. op[%s], op type[%s].", | 314 | + AICPU_REPORT_INNER_ERR_MSG("Invalid parser expression[%s], should contain '-'. op[%s], op type[%s].", |
| 315 | expression.c_str(), op_desc_ptr->GetName().c_str(), op_desc_ptr->GetType().c_str())) | 315 | expression.c_str(), op_desc_ptr->GetName().c_str(), op_desc_ptr->GetType().c_str())) |
| 316 | 316 | ||
| 317 | std::string src_anchor = expression.substr(0, first_underline_pos); | 317 | std::string src_anchor = expression.substr(0, first_underline_pos); |
| @@ -319,8 +319,9 @@ ge::Status Ir2tfBaseParser::SetTfAttrType(const ge::OpDescPtr &op_desc_ptr, domi | |||
| 319 | int index = 0; | 319 | int index = 0; |
| 320 | aicpu::State state = StringToNum(anchor_index, index); | 320 | aicpu::State state = StringToNum(anchor_index, index); |
| 321 | if (state.state != ge::SUCCESS) { | 321 | if (state.state != ge::SUCCESS) { |
| 322 | - AICPU_REPORT_INNER_ERR_MSG("Convert %s to int failed, %s, when parser expression[%s], op[%s]", anchor_index.c_str(), | 322 | + AICPU_REPORT_INNER_ERR_MSG("Convert %s to int failed, %s, when parsing expression[%s], op[%s]", |
| 323 | - state.msg.c_str(), expression.c_str(), op_desc_ptr->GetName().c_str()); | 323 | + anchor_index.c_str(), state.msg.c_str(), expression.c_str(), |
| 324 | + op_desc_ptr->GetName().c_str()); | ||
| 324 | return ErrorCode::IR2TF_CONFIG_INVALID; | 325 | return ErrorCode::IR2TF_CONFIG_INVALID; |
| 325 | } | 326 | } |
| 326 | 327 | ||
| @@ -339,10 +340,8 @@ ge::Status Ir2tfBaseParser::SetTfAttrType(const ge::OpDescPtr &op_desc_ptr, domi | |||
| 339 | int index_dynamic = 0; | 340 | int index_dynamic = 0; |
| 340 | state = StringToNum(dynamic_attr.index, index_dynamic); | 341 | state = StringToNum(dynamic_attr.index, index_dynamic); |
| 341 | if (state.state != ge::SUCCESS) { | 342 | if (state.state != ge::SUCCESS) { |
| 342 | - AICPU_REPORT_INNER_ERR_MSG( | 343 | + AICPU_REPORT_INNER_ERR_MSG("Convert %s to int failed, %s, when parsing attrsDynamicDesc index, op[%s].", |
| 343 | - "Convert %s to int failed, %s, when parser[attrsDynamicDesc] index," | 344 | + dynamic_attr.index.c_str(), state.msg.c_str(), op_desc_ptr->GetName().c_str()); |
| 344 | - " op[%s].", | ||
| 345 | - dynamic_attr.index.c_str(), state.msg.c_str(), op_desc_ptr->GetName().c_str()); | ||
| 346 | return ErrorCode::IR2TF_CONFIG_INVALID; | 345 | return ErrorCode::IR2TF_CONFIG_INVALID; |
| 347 | } | 346 | } |
| 348 | 347 | ||
| @@ -420,7 +419,7 @@ ge::Status Ir2tfBaseParser::SetTfAttrEnum(const ge::OpDescPtr &op_desc_ptr, domi | |||
| 420 | domi::tensorflow::DataType data_type = ConvertGeDataType2TfDataType(ge_data_type); | 419 | domi::tensorflow::DataType data_type = ConvertGeDataType2TfDataType(ge_data_type); |
| 421 | int64_t type_enmu = | 420 | int64_t type_enmu = |
| 422 | (ge_data_type == ge::DT_UINT1) ? (static_cast<int64_t>(ge::DT_UINT1)) : (static_cast<int64_t>(data_type)); | 421 | (ge_data_type == ge::DT_UINT1) ? (static_cast<int64_t>(ge::DT_UINT1)) : (static_cast<int64_t>(data_type)); |
| 423 | - AICPUE_LOGD("SetTfAttrEnum type_enmu = %ld.", type_enmu); | 422 | + AICPUE_LOGD("SetTfAttrEnum type_enum = %ld.", type_enmu); |
| 424 | domi::tensorflow::AttrValue attr_value; | 423 | domi::tensorflow::AttrValue attr_value; |
| 425 | attr_value.set_i(type_enmu); | 424 | attr_value.set_i(type_enmu); |
| 426 | 425 | ||
| @@ -512,7 +511,7 @@ ge::Status Ir2tfBaseParser::ValidateInputAttrMapConfig(const OpMapInfo &op_map_i | |||
| 512 | return ErrorCode::IR2TF_CONFIG_INVALID) | 511 | return ErrorCode::IR2TF_CONFIG_INVALID) |
| 513 | 512 | ||
| 514 | AICPU_IF_BOOL_EXEC(exp_desc.parser_express.empty(), | 513 | AICPU_IF_BOOL_EXEC(exp_desc.parser_express.empty(), |
| 515 | - AICPU_REPORT_INNER_ERR_MSG(" parserExpress of inputAttrMapDesc in IR " | 514 | + AICPU_REPORT_INNER_ERR_MSG("parserExpress of inputAttrMapDesc in IR " |
| 516 | "config is empty, op type[%s].", | 515 | "config is empty, op type[%s].", |
| 517 | op_map_info.src_op_type.c_str()); | 516 | op_map_info.src_op_type.c_str()); |
| 518 | return ErrorCode::IR2TF_CONFIG_INVALID) | 517 | return ErrorCode::IR2TF_CONFIG_INVALID) |
| @@ -80,7 +80,7 @@ ge::Status TfKernelBuilder::CalcOpRunningParam(const ge::Node &node) const { | |||
| 80 | op_desc_ptr->SetWorkspaceBytes({workspace_size}); | 80 | op_desc_ptr->SetWorkspaceBytes({workspace_size}); |
| 81 | } else { | 81 | } else { |
| 82 | workspace_size = workspace_bytes[0]; | 82 | workspace_size = workspace_bytes[0]; |
| 83 | - AICPUE_LOGI("Op type[%s] Workspace size already exist, workspace_size is [%ld]", node.GetType().c_str(), | 83 | + AICPUE_LOGI("Op type[%s] workspace size already exists, workspace_size is [%ld] bytes", node.GetType().c_str(), |
| 84 | workspace_size); | 84 | workspace_size); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| @@ -104,8 +104,8 @@ ge::Status TfKernelBuilder::CalcOpRunningParam(const ge::Node &node) const { | |||
| 104 | AICPUE_LOGI("op:%s name:%s set no_reuse_mem_flag true.", op_desc_ptr->GetName().c_str(), node.GetName().c_str()); | 104 | AICPUE_LOGI("op:%s name:%s set no_reuse_mem_flag true.", op_desc_ptr->GetName().c_str(), node.GetName().c_str()); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | - AICPUE_LOGI("Op type[%s] Calc the Op running param successfully, workspace_size is [%ld]", node.GetType().c_str(), | 107 | + AICPUE_LOGI("Op type[%s] Calc the Op running param successfully, workspace_size is [%ld] bytes", |
| 108 | - workspace_size); | 108 | + node.GetType().c_str(), workspace_size); |
| 109 | return ge::SUCCESS; | 109 | return ge::SUCCESS; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| @@ -293,7 +293,7 @@ ge::Status TfKernelBuilder::GenerateFftsPlusTask(const ge::Node &node, const ge: | |||
| 293 | try { | 293 | try { |
| 294 | ffts_plus_ctx_def = std::make_shared<domi::FftsPlusCtxDef>(); | 294 | ffts_plus_ctx_def = std::make_shared<domi::FftsPlusCtxDef>(); |
| 295 | } catch (...) { | 295 | } catch (...) { |
| 296 | - AICPU_REPORT_INNER_ERR_MSG("op[%s] Create FftsPlusCtxDefPtr fail", node.GetName().c_str()); | 296 | + AICPU_REPORT_INNER_ERR_MSG("op[%s] create FftsPlusCtxDefPtr failed", node.GetName().c_str()); |
| 297 | return MEMORY_ALLOC_FAILED; | 297 | return MEMORY_ALLOC_FAILED; |
| 298 | } | 298 | } |
| 299 | ffts_plus_ctx_def->set_context_type(kCtxTypeAicpu); | 299 | ffts_plus_ctx_def->set_context_type(kCtxTypeAicpu); |
| @@ -352,18 +352,14 @@ ge::Status TfKernelBuilder::GenerateFftsPlusTask(const ge::Node &node, const ge: | |||
| 352 | 352 | ||
| 353 | ffts_info.slice_instance_index = 0; | 353 | ffts_info.slice_instance_index = 0; |
| 354 | GetFftsPlusInOutAddrOffset(op_desc_ptr, ffts_info); | 354 | GetFftsPlusInOutAddrOffset(op_desc_ptr, ffts_info); |
| 355 | - AICPU_CHECK_FALSE_EXEC( | 355 | + AICPU_CHECK_FALSE_EXEC(ge::AttrUtils::SetListInt(op_desc_ptr, "tf_ffts_input_offset", ffts_info.input_addr_offset), |
| 356 | - ge::AttrUtils::SetListInt(op_desc_ptr, "tf_ffts_input_offset", ffts_info.input_addr_offset), | 356 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetListInt failed to set attr[%s], op[%s]", |
| 357 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetInt failed to set " | 357 | + "tf_ffts_input_offset", op_desc_ptr->GetName().c_str()); |
| 358 | - "attr[%s],op[%s]", | 358 | + return ErrorCode::ADD_ATTR_FAILED) |
| 359 | - ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE.c_str(), op_desc_ptr->GetName().c_str()); | 359 | + AICPU_CHECK_FALSE_EXEC(ge::AttrUtils::SetListInt(op_desc_ptr, "tf_ffts_output_offset", ffts_info.output_addr_offset), |
| 360 | - return ErrorCode::ADD_ATTR_FAILED) | 360 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetListInt failed to set attr[%s], op[%s]", |
| 361 | - AICPU_CHECK_FALSE_EXEC( | 361 | + "tf_ffts_output_offset", op_desc_ptr->GetName().c_str()); |
| 362 | - ge::AttrUtils::SetListInt(op_desc_ptr, "tf_ffts_output_offset", ffts_info.output_addr_offset), | 362 | + return ErrorCode::ADD_ATTR_FAILED) |
| 363 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetInt failed to set " | ||
| 364 | - "attr[%s],op[%s]", | ||
| 365 | - ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE.c_str(), op_desc_ptr->GetName().c_str()); | ||
| 366 | - return ErrorCode::ADD_ATTR_FAILED) | ||
| 367 | (void)op_desc_ptr->SetExtAttr(kAttrNameFftsPlusCtxDef, ffts_plus_ctx_def); | 363 | (void)op_desc_ptr->SetExtAttr(kAttrNameFftsPlusCtxDef, ffts_plus_ctx_def); |
| 368 | return ge::SUCCESS; | 364 | return ge::SUCCESS; |
| 369 | } | 365 | } |
| @@ -388,7 +384,7 @@ ge::Status TfKernelBuilder::BuildAicpuFftsPlusKernel(const ge::Node &node, STR_F | |||
| 388 | AICPU_CHECK_RES(BuildFFtsKernelRunParam(*op_desc_ptr, kernel_run_param, index, ffts_info)) | 384 | AICPU_CHECK_RES(BuildFFtsKernelRunParam(*op_desc_ptr, kernel_run_param, index, ffts_info)) |
| 389 | str_tf_kernel->inputOutputLen = static_cast<uint64_t>(kernel_run_param.ByteSizeLong()); | 385 | str_tf_kernel->inputOutputLen = static_cast<uint64_t>(kernel_run_param.ByteSizeLong()); |
| 390 | str_tf_kernel->inputOutputBuf = 0ul; | 386 | str_tf_kernel->inputOutputBuf = 0ul; |
| 391 | - AICPUE_LOGI("The kernel_run_param_size size is [%lu], op type[%s]", str_tf_kernel->inputOutputLen, | 387 | + AICPUE_LOGI("The kernel run param size is [%lu] bytes, op type[%s]", str_tf_kernel->inputOutputLen, |
| 392 | node.GetType().c_str()); | 388 | node.GetType().c_str()); |
| 393 | // Serialize the kernel_run_param | 389 | // Serialize the kernel_run_param |
| 394 | ge::Buffer kernel_run_param_buffer(kernel_run_param.ByteSizeLong()); | 390 | ge::Buffer kernel_run_param_buffer(kernel_run_param.ByteSizeLong()); |
| @@ -410,7 +406,7 @@ ge::Status TfKernelBuilder::BuildAicpuFftsPlusKernel(const ge::Node &node, STR_F | |||
| 410 | str_tf_kernel->nodeDefLen = static_cast<uint64_t>(node_def_size); | 406 | str_tf_kernel->nodeDefLen = static_cast<uint64_t>(node_def_size); |
| 411 | str_tf_kernel->nodeDefBuf = str_tf_kernel->inputOutputBuf + str_tf_kernel->inputOutputLen; | 407 | str_tf_kernel->nodeDefBuf = str_tf_kernel->inputOutputBuf + str_tf_kernel->inputOutputLen; |
| 412 | if (node_def_bytes.GetData() == nullptr) { | 408 | if (node_def_bytes.GetData() == nullptr) { |
| 413 | - AICPU_REPORT_INNER_ERR_MSG("Append node def to task_info failed data, node def is null, op[%s].", | 409 | + AICPU_REPORT_INNER_ERR_MSG("Append node def to task_info failed, node def is null, op[%s].", |
| 414 | node.GetName().c_str()); | 410 | node.GetName().c_str()); |
| 415 | return INPUT_PARAM_NULL; | 411 | return INPUT_PARAM_NULL; |
| 416 | } | 412 | } |
| @@ -422,10 +418,8 @@ ge::Status TfKernelBuilder::BuildAicpuFftsPlusKernel(const ge::Node &node, STR_F | |||
| 422 | str_tf_kernel->funDefLibBuf = str_tf_kernel->nodeDefBuf + str_tf_kernel->nodeDefLen; | 418 | str_tf_kernel->funDefLibBuf = str_tf_kernel->nodeDefBuf + str_tf_kernel->nodeDefLen; |
| 423 | const char *func_def_lib_data = reinterpret_cast<const char *>(func_def_lib_bytes.GetData()); | 419 | const char *func_def_lib_data = reinterpret_cast<const char *>(func_def_lib_bytes.GetData()); |
| 424 | if (func_def_lib_data == nullptr) { | 420 | if (func_def_lib_data == nullptr) { |
| 425 | - AICPU_REPORT_INNER_ERR_MSG( | 421 | + AICPU_REPORT_INNER_ERR_MSG("Append function def to task_info failed, function def is null, op[%s].", |
| 426 | - "Append function def to task_info failed data," | 422 | + node.GetName().c_str()); |
| 427 | - " function def is null, op[%s].", | ||
| 428 | - node.GetName().c_str()); | ||
| 429 | return INPUT_PARAM_NULL; | 423 | return INPUT_PARAM_NULL; |
| 430 | } | 424 | } |
| 431 | task_info.append(func_def_lib_data, func_def_lib_size); | 425 | task_info.append(func_def_lib_data, func_def_lib_size); |
| @@ -440,15 +434,15 @@ ge::Status TfKernelBuilder::BuildAicpuFftsPlusKernel(const ge::Node &node, STR_F | |||
| 440 | 434 | ||
| 441 | if (CheckUint64AddOverflow(str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen)) { | 435 | if (CheckUint64AddOverflow(str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen)) { |
| 442 | AICPU_REPORT_INNER_ERR_MSG( | 436 | AICPU_REPORT_INNER_ERR_MSG( |
| 443 | - "Overflow occurred when calculate total bytes of input/output info[%lu] and" | 437 | + "Overflow occurred when calculating total bytes of input/output info[%lu] and node def[%lu]. " |
| 444 | - "node def[%lu]. Calculate workspace total bytes failed, op[%s]", | 438 | + "Calculate workspace total bytes failed, op[%s]", |
| 445 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, node.GetName().c_str()); | 439 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, node.GetName().c_str()); |
| 446 | return ErrorCode::DATA_OVERFLOW; | 440 | return ErrorCode::DATA_OVERFLOW; |
| 447 | } | 441 | } |
| 448 | if (CheckUint64AddOverflow(str_tf_kernel->inputOutputLen + str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen)) { | 442 | if (CheckUint64AddOverflow(str_tf_kernel->inputOutputLen + str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen)) { |
| 449 | AICPU_REPORT_INNER_ERR_MSG( | 443 | AICPU_REPORT_INNER_ERR_MSG( |
| 450 | - "Overflow occurred when calculate total bytes of input/output info[%lu], node" | 444 | + "Overflow occurred when calculating total bytes of input/output info[%lu], node def[%lu] and " |
| 451 | - "def[%lu] and function def[%lu]. Calculate workspace total bytes failed, op[%s]", | 445 | + "function def[%lu]. Calculate workspace total bytes failed, op[%s]", |
| 452 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, node.GetName().c_str()); | 446 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, node.GetName().c_str()); |
| 453 | return ErrorCode::DATA_OVERFLOW; | 447 | return ErrorCode::DATA_OVERFLOW; |
| 454 | } | 448 | } |
| @@ -522,7 +516,7 @@ ge::Status TfKernelBuilder::ConstructTfKernel(const ge::Node &node, const ge::Ru | |||
| 522 | str_tf_kernel->funDefLibBuf = str_tf_kernel->nodeDefBuf + str_tf_kernel->nodeDefLen; | 516 | str_tf_kernel->funDefLibBuf = str_tf_kernel->nodeDefBuf + str_tf_kernel->nodeDefLen; |
| 523 | const char *func_def_lib_data = reinterpret_cast<const char *>(func_def_lib_bytes.GetData()); | 517 | const char *func_def_lib_data = reinterpret_cast<const char *>(func_def_lib_bytes.GetData()); |
| 524 | if (func_def_lib_data == nullptr) { | 518 | if (func_def_lib_data == nullptr) { |
| 525 | - AICPU_REPORT_INNER_ERR_MSG("Append function def to g_task_info failed op[%s],", node.GetName().c_str()); | 519 | + AICPU_REPORT_INNER_ERR_MSG("Append function def to g_task_info failed, op[%s].", node.GetName().c_str()); |
| 526 | return INPUT_PARAM_NULL; | 520 | return INPUT_PARAM_NULL; |
| 527 | } | 521 | } |
| 528 | g_task_info.append(func_def_lib_data, static_cast<size_t>(func_def_lib_size)); | 522 | g_task_info.append(func_def_lib_data, static_cast<size_t>(func_def_lib_size)); |
| @@ -603,21 +597,21 @@ ge::Status TfKernelBuilder::BuildAndLaunchKernel(const ge::Node &node, const ge: | |||
| 603 | g_str_fwkop_kernel_ptr->fwkKernelType = FMK_KERNEL_TYPE_TF; | 597 | g_str_fwkop_kernel_ptr->fwkKernelType = FMK_KERNEL_TYPE_TF; |
| 604 | FWKAdapter::FWKOperateParam *str_tf_kernel = &(g_str_fwkop_kernel_ptr->fwkKernelBase.fwk_kernel); | 598 | FWKAdapter::FWKOperateParam *str_tf_kernel = &(g_str_fwkop_kernel_ptr->fwkKernelBase.fwk_kernel); |
| 605 | 599 | ||
| 606 | - AICPU_CHECK_RES_WITH_LOG(ConstructTfKernel(node, run_context, str_tf_kernel), "construct tf kernel fail, op[%s].", | 600 | + AICPU_CHECK_RES_WITH_LOG(ConstructTfKernel(node, run_context, str_tf_kernel), "Construct tf kernel failed, op[%s].", |
| 607 | node.GetName().c_str()); | 601 | node.GetName().c_str()); |
| 608 | // Update the FmkOp info | 602 | // Update the FmkOp info |
| 609 | AICPU_CHECK_RES(UpdateImplyTypeInfo(op_desc_ptr)) | 603 | AICPU_CHECK_RES(UpdateImplyTypeInfo(op_desc_ptr)) |
| 610 | CHECK_UINT64_ADD_OVERFLOW( | 604 | CHECK_UINT64_ADD_OVERFLOW( |
| 611 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, ErrorCode::DATA_OVERFLOW, | 605 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, ErrorCode::DATA_OVERFLOW, |
| 612 | - "Overflow occurred when calculate total bytes of input/output info[%lu] and node def[%lu] op[%s].", | 606 | + "Overflow occurred when calculating total bytes of input/output info[%lu] and node def[%lu] op[%s].", |
| 613 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, node.GetName().c_str()) | 607 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, node.GetName().c_str()) |
| 614 | CHECK_UINT64_ADD_OVERFLOW( | 608 | CHECK_UINT64_ADD_OVERFLOW( |
| 615 | str_tf_kernel->inputOutputLen + str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, ErrorCode::DATA_OVERFLOW, | 609 | str_tf_kernel->inputOutputLen + str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, ErrorCode::DATA_OVERFLOW, |
| 616 | - "Overflow occurred when calculate total bytes of input/output [%lu] node def[%lu] function def[%lu] op[%s].", | 610 | + "Overflow occurred when calculating total bytes of input/output [%lu] node def[%lu] function def[%lu] op[%s].", |
| 617 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, node.GetName().c_str()) | 611 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, node.GetName().c_str()) |
| 618 | 612 | ||
| 619 | AICPU_CHECK_RES_WITH_LOG(ConstructExtendInfoAndTaskdef(node, run_context, str_tf_kernel), | 613 | AICPU_CHECK_RES_WITH_LOG(ConstructExtendInfoAndTaskdef(node, run_context, str_tf_kernel), |
| 620 | - "construct tf task def fail, op[%s].", node.GetName().c_str()); | 614 | + "Construct tf task def failed, op[%s].", node.GetName().c_str()); |
| 621 | 615 | ||
| 622 | domi::KernelExDef *kernel_def_ex = g_task_def.mutable_kernel_ex(); | 616 | domi::KernelExDef *kernel_def_ex = g_task_def.mutable_kernel_ex(); |
| 623 | AICPU_CHECK_NOTNULL(kernel_def_ex); | 617 | AICPU_CHECK_NOTNULL(kernel_def_ex); |
| @@ -680,8 +674,8 @@ ge::Status TfKernelBuilder::MakeTaskExtInfo(const ge::Node &node, std::vector<ch | |||
| 680 | 674 | ||
| 681 | int32_t unknow_shape_type = 0; | 675 | int32_t unknow_shape_type = 0; |
| 682 | if (!ge::AttrUtils::GetInt(op_desc_ptr, ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, unknow_shape_type)) { | 676 | if (!ge::AttrUtils::GetInt(op_desc_ptr, ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, unknow_shape_type)) { |
| 683 | - AICPUE_LOG_RUN_INFO("ge::AttrUtils::not get attr,set attr[%s],op[%s].", ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE.c_str(), | 677 | + AICPUE_LOG_RUN_INFO("Attr not found by ge::AttrUtils, set attr[%s], op[%s].", |
| 684 | - op_desc_ptr->GetName().c_str()); | 678 | + ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE.c_str(), op_desc_ptr->GetName().c_str()); |
| 685 | 679 | ||
| 686 | KernelInfoPtr kernel_info_ptr = TfKernelInfo::Instance(); | 680 | KernelInfoPtr kernel_info_ptr = TfKernelInfo::Instance(); |
| 687 | AICPU_CHECK_NOTNULL(kernel_info_ptr); | 681 | AICPU_CHECK_NOTNULL(kernel_info_ptr); |
| @@ -689,10 +683,10 @@ ge::Status TfKernelBuilder::MakeTaskExtInfo(const ge::Node &node, std::vector<ch | |||
| 689 | const string *op_type = ge::AttrUtils::GetStr(op_desc_ptr, kOriginalType); | 683 | const string *op_type = ge::AttrUtils::GetStr(op_desc_ptr, kOriginalType); |
| 690 | AICPU_CHECK_NOTNULL(op_type); | 684 | AICPU_CHECK_NOTNULL(op_type); |
| 691 | status = kernel_info_ptr->GetOpInfo(*op_type, op_full_info); | 685 | status = kernel_info_ptr->GetOpInfo(*op_type, op_full_info); |
| 692 | - AICPU_CHECK_FALSE_EXEC( | 686 | + AICPU_CHECK_FALSE_EXEC(status == ge::SUCCESS, |
| 693 | - status == ge::SUCCESS, | 687 | + AICPU_REPORT_INNER_ERR_MSG("op type[%s] is not supported, op[%s].", op_type->c_str(), |
| 694 | - AICPU_REPORT_INNER_ERR_MSG("op type[%s] not support,op[%s].", op_type->c_str(), op_desc_ptr->GetName().c_str()); | 688 | + op_desc_ptr->GetName().c_str()); |
| 695 | - return status;) | 689 | + return status;) |
| 696 | int32_t shape_type = 0; | 690 | int32_t shape_type = 0; |
| 697 | if (!IsUnknowShape(op_desc_ptr) && (op_full_info.shapeType == OP_TYPE_FOUR)) { | 691 | if (!IsUnknowShape(op_desc_ptr) && (op_full_info.shapeType == OP_TYPE_FOUR)) { |
| 698 | shape_type = 1; | 692 | shape_type = 1; |
| @@ -811,7 +805,7 @@ ge::Status TfKernelBuilder::GenTaskImply(const ge::NodePtr &node, FWKAdapter::FW | |||
| 811 | "Call TfKernelBuilder::BuildKernelRunParam function failed, op[%s]", node->GetName().c_str()) | 805 | "Call TfKernelBuilder::BuildKernelRunParam function failed, op[%s]", node->GetName().c_str()) |
| 812 | str_tf_kernel->inputOutputLen = static_cast<int64_t>(kernel_run_param.ByteSizeLong()); | 806 | str_tf_kernel->inputOutputLen = static_cast<int64_t>(kernel_run_param.ByteSizeLong()); |
| 813 | str_tf_kernel->inputOutputBuf = 0; | 807 | str_tf_kernel->inputOutputBuf = 0; |
| 814 | - AICPUE_LOGI("The kernel_run_param_size size is [%lu], op type[%s].", str_tf_kernel->inputOutputLen, | 808 | + AICPUE_LOGI("The kernel run param size is [%lu] bytes, op type[%s].", str_tf_kernel->inputOutputLen, |
| 815 | node->GetType().c_str()); | 809 | node->GetType().c_str()); |
| 816 | // Serialize the kernel_run_param | 810 | // Serialize the kernel_run_param |
| 817 | ge::Buffer kernel_run_param_buffer(kernel_run_param.ByteSizeLong()); | 811 | ge::Buffer kernel_run_param_buffer(kernel_run_param.ByteSizeLong()); |
| @@ -846,7 +840,7 @@ ge::Status TfKernelBuilder::GenTaskImply(const ge::NodePtr &node, FWKAdapter::FW | |||
| 846 | str_tf_kernel->funDefLibBuf = str_tf_kernel->nodeDefBuf + str_tf_kernel->nodeDefLen; | 840 | str_tf_kernel->funDefLibBuf = str_tf_kernel->nodeDefBuf + str_tf_kernel->nodeDefLen; |
| 847 | const char *func_def_lib_data = reinterpret_cast<const char *>(func_def_lib_bytes.GetData()); | 841 | const char *func_def_lib_data = reinterpret_cast<const char *>(func_def_lib_bytes.GetData()); |
| 848 | if (func_def_lib_data == nullptr) { | 842 | if (func_def_lib_data == nullptr) { |
| 849 | - AICPU_REPORT_INNER_ERR_MSG("Append function def to task_info failed, function def if null, op[%s]", | 843 | + AICPU_REPORT_INNER_ERR_MSG("Append function def to task_info failed, function def is null, op[%s]", |
| 850 | node->GetType().c_str()); | 844 | node->GetType().c_str()); |
| 851 | return INPUT_PARAM_NULL; | 845 | return INPUT_PARAM_NULL; |
| 852 | } | 846 | } |
| @@ -856,12 +850,12 @@ ge::Status TfKernelBuilder::GenTaskImply(const ge::NodePtr &node, FWKAdapter::FW | |||
| 856 | // Update the FmkOp info | 850 | // Update the FmkOp info |
| 857 | AICPU_CHECK_RES(UpdateFmkOpInfo(op_desc_ptr)) | 851 | AICPU_CHECK_RES(UpdateFmkOpInfo(op_desc_ptr)) |
| 858 | CHECK_UINT64_ADD_OVERFLOW(str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, ErrorCode::DATA_OVERFLOW, | 852 | CHECK_UINT64_ADD_OVERFLOW(str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, ErrorCode::DATA_OVERFLOW, |
| 859 | - "Overflow occurred when calculate total bytes of input/output info[%lu] and" | 853 | + "Overflow occurred when calculating total bytes of input/output info[%lu] and" |
| 860 | " node def[%lu]. Calculate workspace total bytes failed, op[%s]", | 854 | " node def[%lu]. Calculate workspace total bytes failed, op[%s]", |
| 861 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, node->GetName().c_str()) | 855 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, node->GetName().c_str()) |
| 862 | CHECK_UINT64_ADD_OVERFLOW( | 856 | CHECK_UINT64_ADD_OVERFLOW( |
| 863 | str_tf_kernel->inputOutputLen + str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, ErrorCode::DATA_OVERFLOW, | 857 | str_tf_kernel->inputOutputLen + str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, ErrorCode::DATA_OVERFLOW, |
| 864 | - "Overflow occurred when calculate total bytes of input/output info[%lu], node " | 858 | + "Overflow occurred when calculating total bytes of input/output info[%lu], node " |
| 865 | "def[%lu] and function def[%lu]. Calculate workspace total bytes failed, op[%s]", | 859 | "def[%lu] and function def[%lu]. Calculate workspace total bytes failed, op[%s]", |
| 866 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, node->GetName().c_str()) | 860 | str_tf_kernel->inputOutputLen, str_tf_kernel->nodeDefLen, str_tf_kernel->funDefLibLen, node->GetName().c_str()) |
| 867 | 861 | ||
| @@ -96,7 +96,7 @@ ge::Status TfKernelInfo::CompileOp(ge::NodePtr &node) { | |||
| 96 | 96 | ||
| 97 | map<string, OpFullInfo> all_op_info; | 97 | map<string, OpFullInfo> all_op_info; |
| 98 | AICPU_CHECK_RES_WITH_LOG(GetOpInfos(all_op_info), "Get op infos failed, op[%s].", node->GetName().c_str()) | 98 | AICPU_CHECK_RES_WITH_LOG(GetOpInfos(all_op_info), "Get op infos failed, op[%s].", node->GetName().c_str()) |
| 99 | - AICPU_CHECK_RES_WITH_LOG(UpdataOpInfo(*node, all_op_info), "Updata function attr failed, op[%s].", | 99 | + AICPU_CHECK_RES_WITH_LOG(UpdataOpInfo(*node, all_op_info), "Update function attr failed, op[%s].", |
| 100 | node->GetName().c_str()) | 100 | node->GetName().c_str()) |
| 101 | 101 | ||
| 102 | // create nodedef | 102 | // create nodedef |
| @@ -148,7 +148,7 @@ void TfKernelInfo::LoadSupportedOps() { | |||
| 148 | 148 | ||
| 149 | std::ifstream fs(supported_ops_json, std::ifstream::in); | 149 | std::ifstream fs(supported_ops_json, std::ifstream::in); |
| 150 | if (!fs.is_open()) { | 150 | if (!fs.is_open()) { |
| 151 | - AICPUE_LOGE("Failed open config file %s", supported_ops_json.c_str()); | 151 | + AICPUE_LOGE("Failed to open config file %s", supported_ops_json.c_str()); |
| 152 | return; | 152 | return; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| @@ -112,7 +112,8 @@ ge::Status TfFunctionBuilder::BuildFunctionDef(ge::ComputeGraphPtr &graph, const | |||
| 112 | // trans ge graph to tf function def | 112 | // trans ge graph to tf function def |
| 113 | FunctionDef *func_def = func_lib->add_function(); | 113 | FunctionDef *func_def = func_lib->add_function(); |
| 114 | AICPU_CHECK_RES_WITH_LOG(TransGraphToFunctionDef(graph, name, func_def), | 114 | AICPU_CHECK_RES_WITH_LOG(TransGraphToFunctionDef(graph, name, func_def), |
| 115 | - "Call TfFunctionBuilder::TransGraphToFunctionDef. tf function[%s].", func_name.c_str()) | 115 | + "Call TfFunctionBuilder::TransGraphToFunctionDef failed, tf function[%s].", |
| 116 | + func_name.c_str()) | ||
| 116 | 117 | ||
| 117 | return ge::SUCCESS; | 118 | return ge::SUCCESS; |
| 118 | } | 119 | } |
| @@ -323,7 +324,8 @@ ge::Status TfFunctionBuilder::TransGraphToFunctionDef(ge::ComputeGraphPtr &graph | |||
| 323 | return ErrorCode::GET_ATTR_FAILED) | 324 | return ErrorCode::GET_ATTR_FAILED) |
| 324 | AICPU_CHECK_FALSE_EXEC( | 325 | AICPU_CHECK_FALSE_EXEC( |
| 325 | ge::AttrUtils::GetInt(node->GetOpDesc(), "retval_index", index), | 326 | ge::AttrUtils::GetInt(node->GetOpDesc(), "retval_index", index), |
| 326 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::GetInt get attr[retval_index], op[%s].", node_name.c_str()); | 327 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::GetInt failed to get attr[retval_index], op[%s].", |
| 328 | + node_name.c_str()); | ||
| 327 | return ErrorCode::GET_ATTR_FAILED) | 329 | return ErrorCode::GET_ATTR_FAILED) |
| 328 | while (func_def->signature().output_arg_size() <= index) { | 330 | while (func_def->signature().output_arg_size() <= index) { |
| 329 | func_def->mutable_signature()->add_output_arg(); | 331 | func_def->mutable_signature()->add_output_arg(); |
| @@ -75,7 +75,7 @@ void TfOptimizer::InitOpFusionMinNum() { | |||
| 75 | if (ConfigFile::GetInstance().GetValue(kOpFusionMinNum, op_fusion_min_num)) { | 75 | if (ConfigFile::GetInstance().GetValue(kOpFusionMinNum, op_fusion_min_num)) { |
| 76 | uint64_t result = kDefaultOpFusionMinNumber; | 76 | uint64_t result = kDefaultOpFusionMinNumber; |
| 77 | if (StringToNum(op_fusion_min_num, result).state != ge::SUCCESS) { | 77 | if (StringToNum(op_fusion_min_num, result).state != ge::SUCCESS) { |
| 78 | - AICPUE_LOGW("Tran op_fusion_min_num [%s] to integer failed. default value is 2.", op_fusion_min_num.c_str()); | 78 | + AICPUE_LOGW("Convert op_fusion_min_num [%s] to integer failed, use default value 2.", op_fusion_min_num.c_str()); |
| 79 | return; | 79 | return; |
| 80 | } | 80 | } |
| 81 | // if OpFusionMinNum from config file is less than 2, print warning log. | 81 | // if OpFusionMinNum from config file is less than 2, print warning log. |
| @@ -95,7 +95,7 @@ void TfOptimizer::InitTfDebugMode() { | |||
| 95 | if (ConfigFile::GetInstance().GetValue(kTfDebugMode, tf_debug_mode)) { | 95 | if (ConfigFile::GetInstance().GetValue(kTfDebugMode, tf_debug_mode)) { |
| 96 | uint64_t result = kTfDebugModeOff; | 96 | uint64_t result = kTfDebugModeOff; |
| 97 | if (StringToNum(tf_debug_mode, result).state != ge::SUCCESS) { | 97 | if (StringToNum(tf_debug_mode, result).state != ge::SUCCESS) { |
| 98 | - AICPUE_LOGW("Tran tf_debug_mode [%s] to integer failed. default value is 0.", tf_debug_mode.c_str()); | 98 | + AICPUE_LOGW("Convert tf_debug_mode [%s] to integer failed, use default value 0.", tf_debug_mode.c_str()); |
| 99 | return; | 99 | return; |
| 100 | } | 100 | } |
| 101 | if (result == kTfDebugModeOn) { | 101 | if (result == kTfDebugModeOn) { |
| @@ -389,7 +389,7 @@ ge::Status TfOptimizer::MarkNodeForFusionOfFfts( | |||
| 389 | // if op type is placeholder or end, skip it | 389 | // if op type is placeholder or end, skip it |
| 390 | std::string op_type = op_desc_ptr->GetType(); | 390 | std::string op_type = op_desc_ptr->GetType(); |
| 391 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceholderOpType) || (op_type == kEndOpType) || (op_type == kPhonyConcatOp)), | 391 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceholderOpType) || (op_type == kEndOpType) || (op_type == kPhonyConcatOp)), |
| 392 | - AICPUE_LOGD("Current op type is [%s]. Don't need to fuse.", op_type.c_str()); | 392 | + AICPUE_LOGD("Current op type is [%s]. It does not need to fuse.", op_type.c_str()); |
| 393 | continue) | 393 | continue) |
| 394 | 394 | ||
| 395 | bool fuse_flag = false; | 395 | bool fuse_flag = false; |
| @@ -502,7 +502,7 @@ ge::Status TfOptimizer::MarkNodeForFusion( | |||
| 502 | // if op type is placeholder or end, skip it | 502 | // if op type is placeholder or end, skip it |
| 503 | std::string op_type = op_desc_ptr->GetType(); | 503 | std::string op_type = op_desc_ptr->GetType(); |
| 504 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceholderOpType) || (op_type == kEndOpType)), | 504 | AICPU_IF_BOOL_EXEC(((op_type == kPlaceholderOpType) || (op_type == kEndOpType)), |
| 505 | - AICPUE_LOGD("Current op type is [%s]. Don't need to fuse.", op_type.c_str()); | 505 | + AICPUE_LOGD("Current op type is [%s]. It does not need to fuse.", op_type.c_str()); |
| 506 | continue) | 506 | continue) |
| 507 | 507 | ||
| 508 | bool tf_debug_flag = IsTfDebugFusion(op_desc_ptr); | 508 | bool tf_debug_flag = IsTfDebugFusion(op_desc_ptr); |
| @@ -739,10 +739,9 @@ ge::Status TfOptimizer::FuseNodesForGraph(ge::ComputeGraph &graph, std::vector<g | |||
| 739 | node_cluster_name.c_str()); | 739 | node_cluster_name.c_str()); |
| 740 | return ErrorCode::FUSE_NODES_FAILED) | 740 | return ErrorCode::FUSE_NODES_FAILED) |
| 741 | // set attr async_flag | 741 | // set attr async_flag |
| 742 | - AICPU_CHECK_FALSE_EXEC( | 742 | + AICPU_CHECK_FALSE_EXEC(ge::AttrUtils::SetBool(fused_op_desc, kAsyncFlag, false), |
| 743 | - ge::AttrUtils::SetBool(fused_op_desc, kAsyncFlag, false), | 743 | + AICPU_REPORT_INNER_ERR_MSG("Set attr kAsyncFlag failed, op[%s].", node_cluster_name.c_str()); |
| 744 | - AICPU_REPORT_INNER_ERR_MSG("Set attr kAsyncFlag failed to set tf node def, op[%s].", node_cluster_name.c_str()); | 744 | + return ErrorCode::FUSE_NODES_FAILED) |
| 745 | - return ErrorCode::FUSE_NODES_FAILED) | ||
| 746 | 745 | ||
| 747 | // set attr ops_json_path for fused Function op | 746 | // set attr ops_json_path for fused Function op |
| 748 | std::string ops_json_path = TfKernelInfo::Instance()->GetJsonPath(); | 747 | std::string ops_json_path = TfKernelInfo::Instance()->GetJsonPath(); |
| @@ -830,7 +829,7 @@ ge::Status TfOptimizer::SetAsyncFlag(ge::NodePtr &node) const { | |||
| 830 | AICPU_CHECK_NOTNULL(kernel_info_ptr); | 829 | AICPU_CHECK_NOTNULL(kernel_info_ptr); |
| 831 | OpFullInfo op_full_info; | 830 | OpFullInfo op_full_info; |
| 832 | ge::Status status = kernel_info_ptr->GetOpInfo(op_type, op_full_info); | 831 | ge::Status status = kernel_info_ptr->GetOpInfo(op_type, op_full_info); |
| 833 | - AICPU_CHECK_FALSE_EXEC(status == ge::SUCCESS, AICPU_REPORT_INNER_ERR_MSG("op type[%s] not support, op[%s].", | 832 | + AICPU_CHECK_FALSE_EXEC(status == ge::SUCCESS, AICPU_REPORT_INNER_ERR_MSG("op type[%s] is not supported, op[%s].", |
| 834 | op_type.c_str(), node_name.c_str()); | 833 | op_type.c_str(), node_name.c_str()); |
| 835 | return status;) | 834 | return status;) |
| 836 | async_flag = op_full_info.flagAsync; | 835 | async_flag = op_full_info.flagAsync; |
| @@ -1163,7 +1162,7 @@ ge::Status TfOptimizer::RebuildInputDesc(const std::vector<ge::InDataAnchorPtr> | |||
| 1163 | ge::GeTensorDesc dst_in_tensor_desc = dst_node->GetOpDesc()->GetInputDesc(in_anchor->GetIdx()); | 1162 | ge::GeTensorDesc dst_in_tensor_desc = dst_node->GetOpDesc()->GetInputDesc(in_anchor->GetIdx()); |
| 1164 | AICPU_CHECK_FALSE_EXEC(fused_op_desc->AddInputDesc(dst_in_tensor_desc) == ge::GRAPH_SUCCESS, | 1163 | AICPU_CHECK_FALSE_EXEC(fused_op_desc->AddInputDesc(dst_in_tensor_desc) == ge::GRAPH_SUCCESS, |
| 1165 | AICPU_REPORT_INNER_ERR_MSG("Call ge::OpDesc::AddInputDesc failed to rebuild" | 1164 | AICPU_REPORT_INNER_ERR_MSG("Call ge::OpDesc::AddInputDesc failed to rebuild" |
| 1166 | - " input tensor dese. op[%s], op type[%s].", | 1165 | + " input tensor desc. op[%s], op type[%s].", |
| 1167 | op_name.c_str(), fused_op_desc->GetType().c_str()); | 1166 | op_name.c_str(), fused_op_desc->GetType().c_str()); |
| 1168 | return ErrorCode::REBUILD_TENSORDESC_FAILED) | 1167 | return ErrorCode::REBUILD_TENSORDESC_FAILED) |
| 1169 | 1168 | ||
| @@ -1244,7 +1243,7 @@ ge::Status TfOptimizer::RebuildFusionNode(SubGraphInfo &sub_graph_info, ge::Node | |||
| 1244 | AICPU_CHECK_NOTNULL(peer_in_anchor); | 1243 | AICPU_CHECK_NOTNULL(peer_in_anchor); |
| 1245 | ge::graphStatus status = peer_in_anchor->Unlink(out_anchor); | 1244 | ge::graphStatus status = peer_in_anchor->Unlink(out_anchor); |
| 1246 | AICPU_CHECK_FALSE_EXEC(status == ge::GRAPH_SUCCESS, | 1245 | AICPU_CHECK_FALSE_EXEC(status == ge::GRAPH_SUCCESS, |
| 1247 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::InControlAnchorAnchor::Unlink failed," | 1246 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::InControlAnchor::Unlink failed," |
| 1248 | " op[%s], op type[%s], peer op[%s].", | 1247 | " op[%s], op type[%s], peer op[%s].", |
| 1249 | node_name.c_str(), fused_node->GetType().c_str(), | 1248 | node_name.c_str(), fused_node->GetType().c_str(), |
| 1250 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); | 1249 | peer_in_anchor->GetOwnerNode()->GetName().c_str()); |
| @@ -411,13 +411,13 @@ ge::NodePtr TfTransposeGraph::CreateTransposeNode(ge::ComputeGraph &graph, const | |||
| 411 | 411 | ||
| 412 | ge::Status ret = op_desc->AddInputDesc("x", tensor_desc); | 412 | ge::Status ret = op_desc->AddInputDesc("x", tensor_desc); |
| 413 | if (ret != ge::GRAPH_SUCCESS) { | 413 | if (ret != ge::GRAPH_SUCCESS) { |
| 414 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc x failed ret[%d]", ret); | 414 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc for input x failed, ret[%d]", ret); |
| 415 | return nullptr; | 415 | return nullptr; |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | ret = op_desc->AddInputDesc("perm", perm_const_desc->GetOutputDesc(0)); | 418 | ret = op_desc->AddInputDesc("perm", perm_const_desc->GetOutputDesc(0)); |
| 419 | if (ret != ge::GRAPH_SUCCESS) { | 419 | if (ret != ge::GRAPH_SUCCESS) { |
| 420 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc x failed ret[%d]", ret); | 420 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AddInputDesc for input perm failed, ret[%d]", ret); |
| 421 | return nullptr; | 421 | return nullptr; |
| 422 | } | 422 | } |
| 423 | ret = op_desc->AddOutputDesc(tensor_desc); | 423 | ret = op_desc->AddOutputDesc(tensor_desc); |
| @@ -486,7 +486,7 @@ ge::Status TfTransposeGraph::GenerateTfTransposeGraph(ge::ComputeGraph &graph) { | |||
| 486 | continue; | 486 | continue; |
| 487 | } | 487 | } |
| 488 | AICPUE_LOGD("insert transpose for [%s]", type.c_str()); | 488 | AICPUE_LOGD("insert transpose for [%s]", type.c_str()); |
| 489 | - AICPU_CHECK_RES_WITH_LOG(CreateAndInsertTransposeNode(graph, node), "op[%s] insert transpose fail", type.c_str()); | 489 | + AICPU_CHECK_RES_WITH_LOG(CreateAndInsertTransposeNode(graph, node), "op[%s] insert transpose failed", type.c_str()); |
| 490 | // for infershape, | 490 | // for infershape, |
| 491 | (void)ge::AttrUtils::SetStr(node->GetOpDesc(), kImgFormat, "HWC"); | 491 | (void)ge::AttrUtils::SetStr(node->GetOpDesc(), kImgFormat, "HWC"); |
| 492 | } | 492 | } |
| @@ -550,7 +550,7 @@ ge::Status TfBatchMatMulV2Graph::CreateAndInsertOffsetWConstNode(const ge::NodeP | |||
| 550 | dst_tensor_desc.SetOriginFormat(ge::FORMAT_ND); | 550 | dst_tensor_desc.SetOriginFormat(ge::FORMAT_ND); |
| 551 | dst_tensor_desc.SetOriginShape(ge::GeShape({0})); | 551 | dst_tensor_desc.SetOriginShape(ge::GeShape({0})); |
| 552 | AICPU_CHECK_RES_WITH_LOG(dst_op->UpdateInputDesc("offset_w", dst_tensor_desc), | 552 | AICPU_CHECK_RES_WITH_LOG(dst_op->UpdateInputDesc("offset_w", dst_tensor_desc), |
| 553 | - "Call bias UpdateInputDesc failed, op name[%s].", dst_node->GetName().c_str()) | 553 | + "Call offset_w UpdateInputDesc failed, op name[%s].", dst_node->GetName().c_str()) |
| 554 | 554 | ||
| 555 | // Create const node with an empty tensor | 555 | // Create const node with an empty tensor |
| 556 | ge::GeTensorPtr tensor = MakeShared<ge::GeTensor>(); | 556 | ge::GeTensorPtr tensor = MakeShared<ge::GeTensor>(); |
| @@ -585,10 +585,10 @@ ge::Status TfBatchMatMulV2Graph::GenerateBatchMatMulV2Graph(ge::ComputeGraph &gr | |||
| 585 | continue; | 585 | continue; |
| 586 | } | 586 | } |
| 587 | AICPUE_LOGI("insert const node for node[%s]", cur_node->GetName().c_str()); | 587 | AICPUE_LOGI("insert const node for node[%s]", cur_node->GetName().c_str()); |
| 588 | - AICPU_CHECK_RES_WITH_LOG(CreateAndInsertBiasConstNode(cur_node, graph), "node[%s] insert bias constnode fail", | 588 | + AICPU_CHECK_RES_WITH_LOG(CreateAndInsertBiasConstNode(cur_node, graph), "node[%s] insert bias const node failed", |
| 589 | - cur_node->GetName().c_str()); | ||
| 590 | - AICPU_CHECK_RES_WITH_LOG(CreateAndInsertOffsetWConstNode(cur_node, graph), "node[%s] insert bias constnode fail", | ||
| 591 | cur_node->GetName().c_str()); | 589 | cur_node->GetName().c_str()); |
| 590 | + AICPU_CHECK_RES_WITH_LOG(CreateAndInsertOffsetWConstNode(cur_node, graph), | ||
| 591 | + "node[%s] insert offset_w const node failed", cur_node->GetName().c_str()); | ||
| 592 | } | 592 | } |
| 593 | return ge::SUCCESS; | 593 | return ge::SUCCESS; |
| 594 | } | 594 | } |
| @@ -163,7 +163,7 @@ ge::Status CheckAndSetUnknowType(ge::NodePtr &node) { | |||
| 163 | AICPU_CHECK_NOTNULL(kernel_info_ptr); | 163 | AICPU_CHECK_NOTNULL(kernel_info_ptr); |
| 164 | OpFullInfo op_full_info; | 164 | OpFullInfo op_full_info; |
| 165 | ge::Status status = kernel_info_ptr->GetOpInfo(op_type, op_full_info); | 165 | ge::Status status = kernel_info_ptr->GetOpInfo(op_type, op_full_info); |
| 166 | - AICPU_CHECK_FALSE_EXEC(status == ge::SUCCESS, AICPU_REPORT_INNER_ERR_MSG("op type[%s] not support, op[%s].", | 166 | + AICPU_CHECK_FALSE_EXEC(status == ge::SUCCESS, AICPU_REPORT_INNER_ERR_MSG("op type[%s] is not supported, op[%s].", |
| 167 | op_type.c_str(), node_name.c_str()); | 167 | op_type.c_str(), node_name.c_str()); |
| 168 | return status;) | 168 | return status;) |
| 169 | if (shape_is_static && (op_full_info.shapeType == 4)) { | 169 | if (shape_is_static && (op_full_info.shapeType == 4)) { |
| @@ -186,8 +186,8 @@ ge::Status CheckAndSetUnknowType(ge::NodePtr &node) { | |||
| 186 | FWKAdapter::FWKExtTopicType topic_type = op_full_info.topicType; | 186 | FWKAdapter::FWKExtTopicType topic_type = op_full_info.topicType; |
| 187 | AICPU_CHECK_FALSE_EXEC( | 187 | AICPU_CHECK_FALSE_EXEC( |
| 188 | ge::AttrUtils::SetInt(op_desc_ptr, kTopicType, topic_type), | 188 | ge::AttrUtils::SetInt(op_desc_ptr, kTopicType, topic_type), |
| 189 | - AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetInt failed to set attr[%s], op[%d], op type[%s].", | 189 | + AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetInt failed to set attr[%s] to [%d], op[%s], op type[%s].", |
| 190 | - kTopicType.c_str(), topic_type, op_type.c_str()); | 190 | + kTopicType.c_str(), topic_type, node_name.c_str(), op_type.c_str()); |
| 191 | return ErrorCode::ADD_ATTR_FAILED) | 191 | return ErrorCode::ADD_ATTR_FAILED) |
| 192 | AICPUE_LOGI("Set topic type[%d] for op[%s], op type[%s].", topic_type, node_name.c_str(), op_type.c_str()); | 192 | AICPUE_LOGI("Set topic type[%d] for op[%s], op type[%s].", topic_type, node_name.c_str(), op_type.c_str()); |
| 193 | 193 | ||
| @@ -299,7 +299,7 @@ ge::Status InsertTfNodeDefToOp(const ge::OpDescPtr &op_desc_ptr, NodeDef &node_d | |||
| 299 | google::protobuf::io::CodedOutputStream output_stream(&array_stream); | 299 | google::protobuf::io::CodedOutputStream output_stream(&array_stream); |
| 300 | output_stream.SetSerializationDeterministic(true); | 300 | output_stream.SetSerializationDeterministic(true); |
| 301 | if (!(node_def.SerializeToCodedStream(&output_stream))) { | 301 | if (!(node_def.SerializeToCodedStream(&output_stream))) { |
| 302 | - AICPU_REPORT_INNER_ERR_MSG("The serialization from nodedef probuf to str failed, op[%s], op type[%s].", | 302 | + AICPU_REPORT_INNER_ERR_MSG("The serialization from nodedef protobuf to str failed, op[%s], op type[%s].", |
| 303 | op_desc_ptr->GetName().c_str(), op_type.c_str()); | 303 | op_desc_ptr->GetName().c_str(), op_type.c_str()); |
| 304 | return ErrorCode::CREATE_NODEDEF_FAILED; | 304 | return ErrorCode::CREATE_NODEDEF_FAILED; |
| 305 | } | 305 | } |
| @@ -339,7 +339,7 @@ ge::Status CalcWorkspaceSize(const ge::Node &node, int64_t &workspace_size) { | |||
| 339 | "Call TfKernelBuilder::BuildKernelRunParam function failed, op[%s].", node.GetName().c_str()) | 339 | "Call TfKernelBuilder::BuildKernelRunParam function failed, op[%s].", node.GetName().c_str()) |
| 340 | 340 | ||
| 341 | int64_t kernel_run_param_size = static_cast<int64_t>(kernel_run_param.ByteSizeLong()); | 341 | int64_t kernel_run_param_size = static_cast<int64_t>(kernel_run_param.ByteSizeLong()); |
| 342 | - AICPUE_LOGI("The kernel_run_param_size size of op type[%s] is [%ld]", node.GetType().c_str(), kernel_run_param_size); | 342 | + AICPUE_LOGI("The kernel run param size of op type[%s] is [%ld] bytes", node.GetType().c_str(), kernel_run_param_size); |
| 343 | workspace_size = kernel_run_param_size; | 343 | workspace_size = kernel_run_param_size; |
| 344 | 344 | ||
| 345 | // Step2 : Get the tf's node_def and func_def's definition and size | 345 | // Step2 : Get the tf's node_def and func_def's definition and size |
| @@ -352,14 +352,14 @@ ge::Status CalcWorkspaceSize(const ge::Node &node, int64_t &workspace_size) { | |||
| 352 | "Call TfKernelBuilder::ParseNodeDefAndFuncDef function failed, op[%s].", node.GetName().c_str()) | 352 | "Call TfKernelBuilder::ParseNodeDefAndFuncDef function failed, op[%s].", node.GetName().c_str()) |
| 353 | // check overflow | 353 | // check overflow |
| 354 | CHECK_INT64_ADD_OVERFLOW(node_def_size, func_def_lib_size, ErrorCode::DATA_OVERFLOW, | 354 | CHECK_INT64_ADD_OVERFLOW(node_def_size, func_def_lib_size, ErrorCode::DATA_OVERFLOW, |
| 355 | - "Overflow when calculate total bytes of node def[%ld] and function def" | 355 | + "Overflow when calculating total bytes of node def[%ld] and function def" |
| 356 | " lib[%ld]. op[%s]", | 356 | " lib[%ld]. op[%s]", |
| 357 | node_def_size, func_def_lib_size, node.GetName().c_str()) | 357 | node_def_size, func_def_lib_size, node.GetName().c_str()) |
| 358 | int64_t node_func_def_size = node_def_size + func_def_lib_size; | 358 | int64_t node_func_def_size = node_def_size + func_def_lib_size; |
| 359 | - AICPUE_LOGI("The nodeDef and funcDef size is [%ld], op type[%s]", node_func_def_size, node.GetType().c_str()); | 359 | + AICPUE_LOGI("The nodeDef and funcDef size is [%ld] bytes, op type[%s]", node_func_def_size, node.GetType().c_str()); |
| 360 | 360 | ||
| 361 | CHECK_INT64_ADD_OVERFLOW(workspace_size, node_func_def_size, ErrorCode::DATA_OVERFLOW, | 361 | CHECK_INT64_ADD_OVERFLOW(workspace_size, node_func_def_size, ErrorCode::DATA_OVERFLOW, |
| 362 | - "Workspace overflow when add total bytes of kernel ran param[%ld], " | 362 | + "Workspace overflow when adding total bytes of kernel run param[%ld], " |
| 363 | "node def[%ld] and function def lib[%ld]. op[%s]", | 363 | "node def[%ld] and function def lib[%ld]. op[%s]", |
| 364 | workspace_size, node_def_size, func_def_lib_size, node.GetName().c_str()) | 364 | workspace_size, node_def_size, func_def_lib_size, node.GetName().c_str()) |
| 365 | workspace_size += node_func_def_size; | 365 | workspace_size += node_func_def_size; |
| @@ -533,7 +533,7 @@ ge::Status CalcTfOpRunningParam(const ge::Node &node) { | |||
| 533 | op_desc_ptr->SetWorkspaceBytes({workspace_size}); | 533 | op_desc_ptr->SetWorkspaceBytes({workspace_size}); |
| 534 | } else { | 534 | } else { |
| 535 | workspace_size = workspace_bytes[0]; | 535 | workspace_size = workspace_bytes[0]; |
| 536 | - AICPUE_LOGI("Op type[%s] Workspace size already exist, workspace_size is [%ld]", node.GetType().c_str(), | 536 | + AICPUE_LOGI("Op type[%s] workspace size already exists, workspace_size is [%ld] bytes", node.GetType().c_str(), |
| 537 | workspace_size); | 537 | workspace_size); |
| 538 | } | 538 | } |
| 539 | 539 | ||
| @@ -544,8 +544,8 @@ ge::Status CalcTfOpRunningParam(const ge::Node &node) { | |||
| 544 | AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetListBool Failed to set attr[%s], op[%s].", | 544 | AICPU_REPORT_INNER_ERR_MSG("Call ge::AttrUtils::SetListBool Failed to set attr[%s], op[%s].", |
| 545 | kWorkspaceReuseFlag.c_str(), node.GetName().c_str()); | 545 | kWorkspaceReuseFlag.c_str(), node.GetName().c_str()); |
| 546 | return ErrorCode::ADD_ATTR_FAILED) | 546 | return ErrorCode::ADD_ATTR_FAILED) |
| 547 | - AICPUE_LOGI("Op type[%s] Calc the Op running param successfully, workspace_size is [%ld]", node.GetType().c_str(), | 547 | + AICPUE_LOGI("Op type[%s] Calc the Op running param successfully, workspace_size is [%ld] bytes", |
| 548 | - workspace_size); | 548 | + node.GetType().c_str(), workspace_size); |
| 549 | return ge::SUCCESS; | 549 | return ge::SUCCESS; |
| 550 | } | 550 | } |
| 551 | } // namespace aicpu | 551 | } // namespace aicpu |
| @@ -179,7 +179,7 @@ void LaunchTfMemcpyTask(const ge::NodePtr &node, bg::ValueHolderPtr &ordered_hol | |||
| 179 | 179 | ||
| 180 | auto tf_memcpy_node = BuildMemCpyTaskNode(tmp_graph, node, outputs_num); | 180 | auto tf_memcpy_node = BuildMemCpyTaskNode(tmp_graph, node, outputs_num); |
| 181 | if (tf_memcpy_node == nullptr) { | 181 | if (tf_memcpy_node == nullptr) { |
| 182 | - GELOGE(ge::PARAM_INVALID, "build tf memcpy task node failed, tf 4th memcpy does not finished yet."); | 182 | + GELOGE(ge::PARAM_INVALID, "build tf memcpy task node failed, tf 4th memcpy has not finished yet."); |
| 183 | return; | 183 | return; |
| 184 | } | 184 | } |
| 185 | // Return value of this function will be implicitly used. | 185 | // Return value of this function will be implicitly used. |
| @@ -235,7 +235,7 @@ void LaunchCCMemcpyTask(const ge::NodePtr &node, bg::ValueHolderPtr &ordered_hol | |||
| 235 | 235 | ||
| 236 | auto cc_memcpy_node = BuildMemCpyTaskNode(tmp_graph, node, outputs_num); | 236 | auto cc_memcpy_node = BuildMemCpyTaskNode(tmp_graph, node, outputs_num); |
| 237 | if (cc_memcpy_node == nullptr) { | 237 | if (cc_memcpy_node == nullptr) { |
| 238 | - GELOGE(ge::PARAM_INVALID, "build cc memcpy task node failed, cc 4th memcpy does not finished yet."); | 238 | + GELOGE(ge::PARAM_INVALID, "build cc memcpy task node failed, cc 4th memcpy has not finished yet."); |
| 239 | return; | 239 | return; |
| 240 | } | 240 | } |
| 241 | // Return value of this function will be implicitly used. | 241 | // Return value of this function will be implicitly used. |
| @@ -335,7 +335,7 @@ void AicpuCallback(const ge::NodePtr &node, const bg::ValueHolderPtr &ext_info, | |||
| 335 | int32_t unknown_shape_type_val = 0; | 335 | int32_t unknown_shape_type_val = 0; |
| 336 | (void)ge::AttrUtils::GetInt(node->GetOpDescBarePtr(), ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, unknown_shape_type_val); | 336 | (void)ge::AttrUtils::GetInt(node->GetOpDescBarePtr(), ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, unknown_shape_type_val); |
| 337 | if ((unknown_shape_type_val == static_cast<int32_t>(ge::DEPEND_SHAPE_RANGE)) && bg::IsAicpuOutputUnknownShape(node)) { | 337 | if ((unknown_shape_type_val == static_cast<int32_t>(ge::DEPEND_SHAPE_RANGE)) && bg::IsAicpuOutputUnknownShape(node)) { |
| 338 | - GELOGI("Op %s type %s is 3th op. engine:%s", node->GetName().c_str(), ge::NodeUtils::GetNodeType(node).c_str(), | 338 | + GELOGI("Op %s type %s is 3rd op. engine:%s", node->GetName().c_str(), ge::NodeUtils::GetNodeType(node).c_str(), |
| 339 | node->GetOpDescBarePtr()->GetOpKernelLibName().c_str()); | 339 | node->GetOpDescBarePtr()->GetOpKernelLibName().c_str()); |
| 340 | if (node->GetOpDescBarePtr()->GetOpKernelLibName() == ge::kEngineNameHostCpu) { | 340 | if (node->GetOpDescBarePtr()->GetOpKernelLibName() == ge::kEngineNameHostCpu) { |
| 341 | DependShapeRangeHostCpuCallback(ext_info, launch_holder, node_output.shapes); | 341 | DependShapeRangeHostCpuCallback(ext_info, launch_holder, node_output.shapes); |
| @@ -84,7 +84,7 @@ std::vector<bg::ValueHolderPtr> AicpuCalcFftsOutputAllocMemVec(const ge::NodePtr | |||
| 84 | const std::vector<bg::ValueHolderPtr> &thread_ret) { | 84 | const std::vector<bg::ValueHolderPtr> &thread_ret) { |
| 85 | size_t output_num = static_cast<size_t>(node->GetOpDescBarePtr()->GetAllOutputsDescSize()); | 85 | size_t output_num = static_cast<size_t>(node->GetOpDescBarePtr()->GetAllOutputsDescSize()); |
| 86 | if (output_num == 0) { | 86 | if (output_num == 0) { |
| 87 | - GELOGE(ge::PARAM_INVALID, "Aicpu calculate output block size vector failed result of output num is zero."); | 87 | + GELOGE(ge::PARAM_INVALID, "Aicpu calculate output block size vector failed because output num is zero."); |
| 88 | return {}; | 88 | return {}; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -107,7 +107,7 @@ bool IsGetRefNodeOutAddr(const RefNodeInfo &ref_node_info, const FFTSLowerInput | |||
| 107 | } | 107 | } |
| 108 | auto ref_input_index = iter->second; | 108 | auto ref_input_index = iter->second; |
| 109 | if (ref_input_index >= lower_input.input_addrs.size()) { | 109 | if (ref_input_index >= lower_input.input_addrs.size()) { |
| 110 | - GELOGE(ge::FAILED, "Node %s output %u ref from input %zu exceed input addrs num %zu", | 110 | + GELOGE(ge::FAILED, "Node %s output %u ref from input %zu exceeds input addrs num %zu", |
| 111 | ref_node_info.node->GetName().c_str(), ref_node_info.out_index, ref_input_index, | 111 | ref_node_info.node->GetName().c_str(), ref_node_info.out_index, ref_input_index, |
| 112 | lower_input.input_addrs.size()); | 112 | lower_input.input_addrs.size()); |
| 113 | return false; | 113 | return false; |
| @@ -251,7 +251,7 @@ inline bool ConstructMemTypeInput(const ge::NodePtr &node, std::vector<bg::Value | |||
| 251 | 251 | ||
| 252 | const auto *mem_pool_types = node->GetOpDescBarePtr()->GetExtAttr<std::vector<uint32_t>>(kFtfsMemoryPoolType); | 252 | const auto *mem_pool_types = node->GetOpDescBarePtr()->GetExtAttr<std::vector<uint32_t>>(kFtfsMemoryPoolType); |
| 253 | if (mem_pool_types == nullptr) { | 253 | if (mem_pool_types == nullptr) { |
| 254 | - GELOGE(ge::FAILED, "Node[%s] do not have mem pool type attr.", node->GetName().c_str()); | 254 | + GELOGE(ge::FAILED, "Node[%s] does not have mem pool type attr.", node->GetName().c_str()); |
| 255 | return false; | 255 | return false; |
| 256 | } | 256 | } |
| 257 | auto out_mem_type_holder = bg::CreateContVecHolder(*mem_pool_types); | 257 | auto out_mem_type_holder = bg::CreateContVecHolder(*mem_pool_types); |
| @@ -270,13 +270,13 @@ bool ConstructAicpuArgsInput(const ge::NodePtr &node, const FFTSLowerInput &lowe | |||
| 270 | const auto &session_id = bg::GetSessionId(*lower_input.global_data); | 270 | const auto &session_id = bg::GetSessionId(*lower_input.global_data); |
| 271 | const std::string *ext_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_ext_info"); | 271 | const std::string *ext_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_ext_info"); |
| 272 | if ((ext_info == nullptr) || (ext_info->empty())) { | 272 | if ((ext_info == nullptr) || (ext_info->empty())) { |
| 273 | - GELOGE(ge::PARAM_INVALID, "Aicpu update args failed result of empty ext_info."); | 273 | + GELOGE(ge::PARAM_INVALID, "Aicpu update args failed because ext_info is empty."); |
| 274 | return false; | 274 | return false; |
| 275 | } | 275 | } |
| 276 | const size_t ext_size = ext_info->size(); | 276 | const size_t ext_size = ext_info->size(); |
| 277 | const std::string *args_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_args"); | 277 | const std::string *args_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_args"); |
| 278 | if ((args_info == nullptr) || (args_info->empty())) { | 278 | if ((args_info == nullptr) || (args_info->empty())) { |
| 279 | - GELOGE(ge::PARAM_INVALID, "Aicpu update args failed result of empty args_info."); | 279 | + GELOGE(ge::PARAM_INVALID, "Aicpu update args failed because args_info is empty."); |
| 280 | return false; | 280 | return false; |
| 281 | } | 281 | } |
| 282 | const size_t arg_size = args_info->size(); | 282 | const size_t arg_size = args_info->size(); |
| @@ -351,12 +351,12 @@ std::vector<bg::ValueHolderPtr> AicpuTfUpdateArgs(const ge::NodePtr &node, const | |||
| 351 | ge::graphStatus CalcAICpuCommonArgsMem(const ge::NodePtr &node, size_t &ext_total_byte) { | 351 | ge::graphStatus CalcAICpuCommonArgsMem(const ge::NodePtr &node, size_t &ext_total_byte) { |
| 352 | const std::string *ext_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_ext_info"); | 352 | const std::string *ext_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_ext_info"); |
| 353 | if (ext_info == nullptr) { | 353 | if (ext_info == nullptr) { |
| 354 | - GELOGE(ge::PARAM_INVALID, "Aicpu calc failed result of null ext_info."); | 354 | + GELOGE(ge::PARAM_INVALID, "Aicpu calc failed because ext_info is null."); |
| 355 | return ge::GRAPH_FAILED; | 355 | return ge::GRAPH_FAILED; |
| 356 | } | 356 | } |
| 357 | const size_t ext_size = ext_info->size(); | 357 | const size_t ext_size = ext_info->size(); |
| 358 | if (ext_size == 0UL) { | 358 | if (ext_size == 0UL) { |
| 359 | - GELOGE(ge::PARAM_INVALID, "Aicpu calc failed result of empty ext_info."); | 359 | + GELOGE(ge::PARAM_INVALID, "Aicpu calc failed because ext_info is empty."); |
| 360 | return ge::GRAPH_FAILED; | 360 | return ge::GRAPH_FAILED; |
| 361 | } | 361 | } |
| 362 | FMK_SIZET_MULCHECK(ge::MemSizeAlign(ext_size * MAX_THREAD_DIM), 1); | 362 | FMK_SIZET_MULCHECK(ge::MemSizeAlign(ext_size * MAX_THREAD_DIM), 1); |
| @@ -372,11 +372,11 @@ ge::graphStatus CalcAICpuCCArgsMem(const ge::NodePtr &node, const LoweringGlobal | |||
| 372 | (void)pre_data_ptr; | 372 | (void)pre_data_ptr; |
| 373 | const std::string *args_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_args"); | 373 | const std::string *args_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_args"); |
| 374 | if (args_info == nullptr) { | 374 | if (args_info == nullptr) { |
| 375 | - GELOGE(ge::PARAM_INVALID, "Aicpu update args failed result of null args_info."); | 375 | + GELOGE(ge::PARAM_INVALID, "Aicpu update args failed because args_info is null."); |
| 376 | return ge::GRAPH_FAILED; | 376 | return ge::GRAPH_FAILED; |
| 377 | } | 377 | } |
| 378 | if (args_info->empty()) { | 378 | if (args_info->empty()) { |
| 379 | - GELOGE(ge::PARAM_INVALID, "Aicpu update args failed result of empty args_info."); | 379 | + GELOGE(ge::PARAM_INVALID, "Aicpu update args failed because args_info is empty."); |
| 380 | return ge::GRAPH_FAILED; | 380 | return ge::GRAPH_FAILED; |
| 381 | } | 381 | } |
| 382 | const size_t arg_size = args_info->size(); | 382 | const size_t arg_size = args_info->size(); |
| @@ -406,7 +406,7 @@ ge::graphStatus CalcAICpuTfArgsMem(const ge::NodePtr &node, const LoweringGlobal | |||
| 406 | 406 | ||
| 407 | const std::string *args_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_args"); | 407 | const std::string *args_info = ge::AttrUtils::GetStr(node->GetOpDescBarePtr(), "_aicpu_ffts_args"); |
| 408 | if ((args_info == nullptr) || (args_info->empty())) { | 408 | if ((args_info == nullptr) || (args_info->empty())) { |
| 409 | - GELOGE(ge::PARAM_INVALID, "Aicpu update args failed result of empty args_info."); | 409 | + GELOGE(ge::PARAM_INVALID, "Aicpu update args failed because args_info is empty."); |
| 410 | return ge::GRAPH_FAILED; | 410 | return ge::GRAPH_FAILED; |
| 411 | } | 411 | } |
| 412 | const size_t arg_size = args_info->size(); | 412 | const size_t arg_size = args_info->size(); |
| @@ -479,7 +479,7 @@ LowerResult LoweringFFTSAiCpuCCNode(const ge::NodePtr &node, const FFTSLowerInpu | |||
| 479 | GELOGD("Lowering AICPU FFTS Plus node[%s]", node->GetName().c_str()); | 479 | GELOGD("Lowering AICPU FFTS Plus node[%s]", node->GetName().c_str()); |
| 480 | domi::FftsPlusTaskDef ffts_plus_task_def; | 480 | domi::FftsPlusTaskDef ffts_plus_task_def; |
| 481 | RET_ERR_RET_IF((GetFftsPlusTaskDef(node, lower_input, ffts_plus_task_def) != ge::GRAPH_SUCCESS), | 481 | RET_ERR_RET_IF((GetFftsPlusTaskDef(node, lower_input, ffts_plus_task_def) != ge::GRAPH_SUCCESS), |
| 482 | - "Not find AI cpu CC ffts plus taskdef."); | 482 | + "Cannot find AI cpu CC ffts plus taskdef."); |
| 483 | 483 | ||
| 484 | // infer shape | 484 | // infer shape |
| 485 | auto output_shapes = bg::GetMemAllocShape(node, lower_input.input_shapes, *(lower_input.global_data)); | 485 | auto output_shapes = bg::GetMemAllocShape(node, lower_input.input_shapes, *(lower_input.global_data)); |
| @@ -526,7 +526,7 @@ LowerResult LoweringFFTSAiCpuTfNode(const ge::NodePtr &node, const FFTSLowerInpu | |||
| 526 | GELOGI("Lowering AICPU TF FFTS Plus node[%s]", node->GetName().c_str()); | 526 | GELOGI("Lowering AICPU TF FFTS Plus node[%s]", node->GetName().c_str()); |
| 527 | domi::FftsPlusTaskDef ffts_plus_task_def; | 527 | domi::FftsPlusTaskDef ffts_plus_task_def; |
| 528 | RET_ERR_RET_IF((GetFftsPlusTaskDef(node, lower_input, ffts_plus_task_def) != ge::GRAPH_SUCCESS), | 528 | RET_ERR_RET_IF((GetFftsPlusTaskDef(node, lower_input, ffts_plus_task_def) != ge::GRAPH_SUCCESS), |
| 529 | - "Not find AI cpu Tf ffts plus taskdef."); | 529 | + "Cannot find AI cpu Tf ffts plus taskdef."); |
| 530 | 530 | ||
| 531 | // infer shape | 531 | // infer shape |
| 532 | auto output_shapes = bg::GetMemAllocShape(node, lower_input.input_shapes, *(lower_input.global_data)); | 532 | auto output_shapes = bg::GetMemAllocShape(node, lower_input.input_shapes, *(lower_input.global_data)); |
| @@ -147,7 +147,7 @@ LowerResult LoweringAiCpuTfNode(const ge::NodePtr &node, const LowerInput &lower | |||
| 147 | auto compile_result = lower_input.global_data->FindCompiledResult(node); | 147 | auto compile_result = lower_input.global_data->FindCompiledResult(node); |
| 148 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICpu); | 148 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICpu); |
| 149 | if (task_def == nullptr) { | 149 | if (task_def == nullptr) { |
| 150 | - return {HyperStatus::ErrorStatus(static_cast<const char *>("Not find AI cpu Tf taskdef.")), {}, {}, {}}; | 150 | + return {HyperStatus::ErrorStatus(static_cast<const char *>("Cannot find AI cpu Tf taskdef.")), {}, {}, {}}; |
| 151 | } | 151 | } |
| 152 | auto &kernel_ex_def = task_def->kernel_ex(); | 152 | auto &kernel_ex_def = task_def->kernel_ex(); |
| 153 | auto session_id = bg::GetSessionId(*lower_input.global_data); | 153 | auto session_id = bg::GetSessionId(*lower_input.global_data); |
| @@ -198,7 +198,7 @@ LowerResult LoweringAiCpuCCNode(const ge::NodePtr &node, const LowerInput &lower | |||
| 198 | auto compile_result = lower_input.global_data->FindCompiledResult(node); | 198 | auto compile_result = lower_input.global_data->FindCompiledResult(node); |
| 199 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICpu); | 199 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICpu); |
| 200 | if (task_def == nullptr) { | 200 | if (task_def == nullptr) { |
| 201 | - return {HyperStatus::ErrorStatus(static_cast<const char *>("Not find AI cpu CC taskdef.")), {}, {}, {}}; | 201 | + return {HyperStatus::ErrorStatus(static_cast<const char *>("Cannot find AI cpu CC taskdef.")), {}, {}, {}}; |
| 202 | } | 202 | } |
| 203 | auto &kernel_def = task_def->kernel(); | 203 | auto &kernel_def = task_def->kernel(); |
| 204 | const auto &op_desc = node->GetOpDesc(); | 204 | const auto &op_desc = node->GetOpDesc(); |
| @@ -214,7 +214,7 @@ LowerResult LoweringAiCpuCCNode(const ge::NodePtr &node, const LowerInput &lower | |||
| 214 | (void)ge::AttrUtils::GetBool(node->GetOpDescBarePtr(), bg::kOptionalInputPlaceholder, optional_input_placeholder); | 214 | (void)ge::AttrUtils::GetBool(node->GetOpDescBarePtr(), bg::kOptionalInputPlaceholder, optional_input_placeholder); |
| 215 | if (optional_input_placeholder) { | 215 | if (optional_input_placeholder) { |
| 216 | in_num = node->GetOpDescBarePtr()->GetAllInputsSize(); | 216 | in_num = node->GetOpDescBarePtr()->GetAllInputsSize(); |
| 217 | - GELOGI("Op %s type %s in all input size is %zu, all input data anchors size is %zu.", node->GetName().c_str(), | 217 | + GELOGI("Op %s type %s: all input size is %zu, all input data anchors size is %zu.", node->GetName().c_str(), |
| 218 | ge::NodeUtils::GetNodeType(node).c_str(), in_num, node->GetInDataNodesAndAnchors().size()); | 218 | ge::NodeUtils::GetNodeType(node).c_str(), in_num, node->GetInDataNodesAndAnchors().size()); |
| 219 | } | 219 | } |
| 220 | auto io_num = in_num + node->GetAllOutDataAnchorsSize(); | 220 | auto io_num = in_num + node->GetAllOutDataAnchorsSize(); |
| @@ -380,7 +380,7 @@ const char *PrepareHostAiCpuLowering(const ge::NodePtr &node, const LowerInput & | |||
| 380 | auto compile_result = lower_input.global_data->FindCompiledResult(node); | 380 | auto compile_result = lower_input.global_data->FindCompiledResult(node); |
| 381 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICpu); | 381 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICpu); |
| 382 | if (task_def == nullptr) { | 382 | if (task_def == nullptr) { |
| 383 | - return "Not find host AI cpu taskdef."; | 383 | + return "Cannot find host AI cpu taskdef."; |
| 384 | } | 384 | } |
| 385 | lowering_data.kernel_def = &task_def->kernel(); | 385 | lowering_data.kernel_def = &task_def->kernel(); |
| 386 | lowering_data.session_id = bg::GetSessionId(*lower_input.global_data); | 386 | lowering_data.session_id = bg::GetSessionId(*lower_input.global_data); |
| @@ -23,8 +23,8 @@ ge::graphStatus ResourceMgr::Create(const uint64_t handle, TensorSeqPtr resource | |||
| 23 | GELOGD("Create handle: [%llu]", handle); | 23 | GELOGD("Create handle: [%llu]", handle); |
| 24 | const std::lock_guard<std::mutex> lock(mu_); | 24 | const std::lock_guard<std::mutex> lock(mu_); |
| 25 | if (handle_map_.count(handle) != 0) { | 25 | if (handle_map_.count(handle) != 0) { |
| 26 | - GELOGE(ge::PARAM_INVALID, "handle [%llu] has already exist.", handle); | 26 | + GELOGE(ge::PARAM_INVALID, "handle [%llu] already exists.", handle); |
| 27 | - REPORT_INNER_ERR_MSG("E39999", "handle has already exist."); | 27 | + REPORT_INNER_ERR_MSG("E39999", "handle already exists."); |
| 28 | return ge::PARAM_INVALID; | 28 | return ge::PARAM_INVALID; |
| 29 | } else { | 29 | } else { |
| 30 | handle_map_[handle] = resource; | 30 | handle_map_[handle] = resource; |
| @@ -116,8 +116,8 @@ ge::graphStatus SessionMgr::CreateSession(const uint64_t session_id) { | |||
| 116 | const std::lock_guard<std::mutex> lock(session_mutex_); | 116 | const std::lock_guard<std::mutex> lock(session_mutex_); |
| 117 | const auto iter = session_map_.find(session_id); | 117 | const auto iter = session_map_.find(session_id); |
| 118 | if (iter != session_map_.end()) { | 118 | if (iter != session_map_.end()) { |
| 119 | - GELOGE(ge::PARAM_INVALID, "session_id [%llu] has already exist.", session_id); | 119 | + GELOGE(ge::PARAM_INVALID, "session_id [%llu] already exists.", session_id); |
| 120 | - REPORT_INNER_ERR_MSG("E39999", "session_id has already exist."); | 120 | + REPORT_INNER_ERR_MSG("E39999", "session_id already exists."); |
| 121 | return ge::PARAM_INVALID; | 121 | return ge::PARAM_INVALID; |
| 122 | } | 122 | } |
| 123 | session_map_.insert({session_id, NewSession()}); | 123 | session_map_.insert({session_id, NewSession()}); |
| @@ -184,8 +184,8 @@ ge::graphStatus Session::CreateRm(const uint64_t container_id) { | |||
| 184 | const std::lock_guard<std::mutex> lock(mutex_); | 184 | const std::lock_guard<std::mutex> lock(mutex_); |
| 185 | const auto iter = rm_map_.find(container_id); | 185 | const auto iter = rm_map_.find(container_id); |
| 186 | if (iter != rm_map_.end()) { | 186 | if (iter != rm_map_.end()) { |
| 187 | - GELOGE(ge::PARAM_INVALID, "container_id [%llu] has already exist.", container_id); | 187 | + GELOGE(ge::PARAM_INVALID, "container_id [%llu] already exists.", container_id); |
| 188 | - REPORT_INNER_ERR_MSG("E39999", "container_id has already exist."); | 188 | + REPORT_INNER_ERR_MSG("E39999", "container_id already exists."); |
| 189 | return ge::PARAM_INVALID; | 189 | return ge::PARAM_INVALID; |
| 190 | } | 190 | } |
| 191 | rm_map_.insert({container_id, NewRm()}); | 191 | rm_map_.insert({container_id, NewRm()}); |
| @@ -37,8 +37,8 @@ ge::graphStatus SequenceAtDoComputeExtend(KernelContext *context, const uint64_t | |||
| 37 | TensorSeqPtr sequence; | 37 | TensorSeqPtr sequence; |
| 38 | auto ret = out_rm->Lookup(handle, &sequence); | 38 | auto ret = out_rm->Lookup(handle, &sequence); |
| 39 | if (ret != ge::GRAPH_SUCCESS) { | 39 | if (ret != ge::GRAPH_SUCCESS) { |
| 40 | - GELOGE(ge::PARAM_INVALID, "SequenceAt lookup tensor sequence fail, handle = %llu", handle); | 40 | + GELOGE(ge::PARAM_INVALID, "SequenceAt lookup tensor sequence failed, handle = %llu", handle); |
| 41 | - REPORT_INNER_ERR_MSG("E39999", "SequenceAt lookup tensor sequence fail"); | 41 | + REPORT_INNER_ERR_MSG("E39999", "SequenceAt lookup tensor sequence failed"); |
| 42 | return ret; | 42 | return ret; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| @@ -110,11 +110,11 @@ ge::graphStatus SequenceAtDoCompute(KernelContext *context) { | |||
| 110 | default: | 110 | default: |
| 111 | GELOGE(ge::PARAM_INVALID, | 111 | GELOGE(ge::PARAM_INVALID, |
| 112 | "Sequence SequenceAt input index data type should be DT_INT32 or " | 112 | "Sequence SequenceAt input index data type should be DT_INT32 or " |
| 113 | - "DT_INT64, [%u] not support.", | 113 | + "DT_INT64, [%u] is not supported.", |
| 114 | index_type); | 114 | index_type); |
| 115 | REPORT_INNER_ERR_MSG("E39999", | 115 | REPORT_INNER_ERR_MSG("E39999", |
| 116 | "Sequence SequenceAt input index data type should be DT_INT32 " | 116 | "Sequence SequenceAt input index data type should be DT_INT32 " |
| 117 | - "or DT_INT64, [%u] not support.", | 117 | + "or DT_INT64, [%u] is not supported.", |
| 118 | index_type); | 118 | index_type); |
| 119 | return ge::PARAM_INVALID; | 119 | return ge::PARAM_INVALID; |
| 120 | } | 120 | } |
| @@ -201,8 +201,8 @@ ge::graphStatus SequenceLengthDoCompute(KernelContext *context) { | |||
| 201 | TensorSeqPtr sequence; | 201 | TensorSeqPtr sequence; |
| 202 | auto ret = out_rm->Lookup(handle, &sequence); | 202 | auto ret = out_rm->Lookup(handle, &sequence); |
| 203 | if (ret != ge::GRAPH_SUCCESS) { | 203 | if (ret != ge::GRAPH_SUCCESS) { |
| 204 | - GELOGE(ge::PARAM_INVALID, "SequenceLength lookup tensor sequence fail, handle = %llu", handle); | 204 | + GELOGE(ge::PARAM_INVALID, "SequenceLength lookup tensor sequence failed, handle = %llu", handle); |
| 205 | - REPORT_INNER_ERR_MSG("E39999", "SequenceLength lookup tensor sequence fail"); | 205 | + REPORT_INNER_ERR_MSG("E39999", "SequenceLength lookup tensor sequence failed"); |
| 206 | return ret; | 206 | return ret; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| @@ -59,9 +59,9 @@ LowerResult LoweringSequenceConstruct(const ge::NodePtr &node, const LowerInput | |||
| 59 | // dynamic input | 59 | // dynamic input |
| 60 | auto input_num = lower_input.input_addrs.size(); | 60 | auto input_num = lower_input.input_addrs.size(); |
| 61 | if (input_num < 1) { | 61 | if (input_num < 1) { |
| 62 | - GELOGE(ge::PARAM_INVALID, "[Check][Op]Input num err, it is at least 1."); | 62 | + GELOGE(ge::PARAM_INVALID, "[Check][Op]Invalid input num, at least 1 required."); |
| 63 | - REPORT_INNER_ERR_MSG("E39999", "Input num err, it is at least 1."); | 63 | + REPORT_INNER_ERR_MSG("E39999", "Invalid input num, at least 1 required."); |
| 64 | - return {HyperStatus::ErrorStatus(static_cast<const char *>("Input num err, it is at least 1")), {}, {}, {}}; | 64 | + return {HyperStatus::ErrorStatus(static_cast<const char *>("Invalid input num, at least 1 required")), {}, {}, {}}; |
| 65 | } | 65 | } |
| 66 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); | 66 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); |
| 67 | auto output_shape = bg::ValueHolder::CreateSingleDataOutput("GetSequenceHandleShape", {}); | 67 | auto output_shape = bg::ValueHolder::CreateSingleDataOutput("GetSequenceHandleShape", {}); |
| @@ -60,9 +60,9 @@ LowerResult LoweringSequenceErase(const ge::NodePtr &node, const LowerInput &low | |||
| 60 | 60 | ||
| 61 | auto input_num = lower_input.input_addrs.size(); | 61 | auto input_num = lower_input.input_addrs.size(); |
| 62 | if (input_num < 1) { | 62 | if (input_num < 1) { |
| 63 | - GELOGE(ge::PARAM_INVALID, "[Check][Op]Input num err, it is at least 1."); | 63 | + GELOGE(ge::PARAM_INVALID, "[Check][Op]Invalid input num, at least 1 required."); |
| 64 | - REPORT_INNER_ERR_MSG("E39999", "Input num err, it is at least 1."); | 64 | + REPORT_INNER_ERR_MSG("E39999", "Invalid input num, at least 1 required."); |
| 65 | - return {HyperStatus::ErrorStatus(static_cast<const char *>("Input num err, it is at least 1.")), {}, {}, {}}; | 65 | + return {HyperStatus::ErrorStatus(static_cast<const char *>("Invalid input num, at least 1 required.")), {}, {}, {}}; |
| 66 | } | 66 | } |
| 67 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); | 67 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); |
| 68 | auto output_shape = bg::ValueHolder::CreateSingleDataOutput("GetSequenceHandleShape", {}); | 68 | auto output_shape = bg::ValueHolder::CreateSingleDataOutput("GetSequenceHandleShape", {}); |
| @@ -90,11 +90,11 @@ ge::graphStatus SequenceEraseCompute(KernelContext *context) { | |||
| 90 | default: | 90 | default: |
| 91 | GELOGE(ge::PARAM_INVALID, | 91 | GELOGE(ge::PARAM_INVALID, |
| 92 | "Sequence Erase input index data type should be DT_INT32 " | 92 | "Sequence Erase input index data type should be DT_INT32 " |
| 93 | - "or DT_INT64, [%u] not support.", | 93 | + "or DT_INT64, [%u] is not supported.", |
| 94 | erase_index_type); | 94 | erase_index_type); |
| 95 | REPORT_INNER_ERR_MSG("E39999", | 95 | REPORT_INNER_ERR_MSG("E39999", |
| 96 | "Sequence Erase input index data type should be DT_INT32 " | 96 | "Sequence Erase input index data type should be DT_INT32 " |
| 97 | - "or DT_INT64, [%u] not support.", | 97 | + "or DT_INT64, [%u] is not supported.", |
| 98 | erase_index_type); | 98 | erase_index_type); |
| 99 | return ge::PARAM_INVALID; | 99 | return ge::PARAM_INVALID; |
| 100 | } | 100 | } |
| @@ -64,9 +64,9 @@ LowerResult LoweringSequenceInsert(const ge::NodePtr &node, const LowerInput &lo | |||
| 64 | auto input_num = lower_input.input_addrs.size(); | 64 | auto input_num = lower_input.input_addrs.size(); |
| 65 | constexpr size_t least_input_number = 2; | 65 | constexpr size_t least_input_number = 2; |
| 66 | if (input_num < least_input_number) { | 66 | if (input_num < least_input_number) { |
| 67 | - GELOGE(ge::PARAM_INVALID, "[Check][Op]Input num err, it is at least 2."); | 67 | + GELOGE(ge::PARAM_INVALID, "[Check][Op]Invalid input num, at least 2 required."); |
| 68 | - REPORT_INNER_ERR_MSG("E39999", "Input num err, it is at least 2."); | 68 | + REPORT_INNER_ERR_MSG("E39999", "Invalid input num, at least 2 required."); |
| 69 | - return {HyperStatus::ErrorStatus(static_cast<const char *>("Input num err, it is at least 2.")), {}, {}, {}}; | 69 | + return {HyperStatus::ErrorStatus(static_cast<const char *>("Invalid input num, at least 2 required.")), {}, {}, {}}; |
| 70 | } | 70 | } |
| 71 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); | 71 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); |
| 72 | auto output_shape = bg::ValueHolder::CreateSingleDataOutput("GetSequenceHandleShape", {}); | 72 | auto output_shape = bg::ValueHolder::CreateSingleDataOutput("GetSequenceHandleShape", {}); |
| @@ -100,11 +100,11 @@ ge::graphStatus SequenceInsertCompute(KernelContext *context) { | |||
| 100 | default: | 100 | default: |
| 101 | GELOGE(ge::PARAM_INVALID, | 101 | GELOGE(ge::PARAM_INVALID, |
| 102 | "Sequence Insert input index data type should be DT_INT32 " | 102 | "Sequence Insert input index data type should be DT_INT32 " |
| 103 | - "or DT_INT64, [%u] not support.", | 103 | + "or DT_INT64, [%u] is not supported.", |
| 104 | insert_index_type); | 104 | insert_index_type); |
| 105 | REPORT_INNER_ERR_MSG("E39999", | 105 | REPORT_INNER_ERR_MSG("E39999", |
| 106 | "Sequence Insert input index data type should be DT_INT32 " | 106 | "Sequence Insert input index data type should be DT_INT32 " |
| 107 | - "or DT_INT64, [%u] not support.", | 107 | + "or DT_INT64, [%u] is not supported.", |
| 108 | insert_index_type); | 108 | insert_index_type); |
| 109 | return ge::PARAM_INVALID; | 109 | return ge::PARAM_INVALID; |
| 110 | } | 110 | } |
| @@ -98,9 +98,9 @@ LowerResult LoweringSplitToSeuqnece(const ge::NodePtr &node, const LowerInput &l | |||
| 98 | } | 98 | } |
| 99 | auto input_num = lower_input.input_addrs.size(); | 99 | auto input_num = lower_input.input_addrs.size(); |
| 100 | if (input_num < 1) { | 100 | if (input_num < 1) { |
| 101 | - GELOGE(ge::PARAM_INVALID, "[Check][Op]Input num err, it is at least 1."); | 101 | + GELOGE(ge::PARAM_INVALID, "[Check][Op]Invalid input num, at least 1 required."); |
| 102 | - REPORT_INNER_ERR_MSG("E19999", "Input num err, it is at least 1."); | 102 | + REPORT_INNER_ERR_MSG("E19999", "Invalid input num, at least 1 required."); |
| 103 | - return {HyperStatus::ErrorStatus(static_cast<const char *>("Input num err, it is at least 1")), {}, {}, {}}; | 103 | + return {HyperStatus::ErrorStatus(static_cast<const char *>("Invalid input num, at least 1 required")), {}, {}, {}}; |
| 104 | } | 104 | } |
| 105 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); | 105 | auto input_num_holder = bg::ValueHolder::CreateConst(&input_num, sizeof(input_num)); |
| 106 | 106 | ||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | + | ||
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | 17 | ||
| @@ -89,8 +90,8 @@ class TensorSeq { | |||
| 89 | } | 90 | } |
| 90 | 91 | ||
| 91 | if (!ret) { | 92 | if (!ret) { |
| 92 | - GELOGE(ge::PARAM_INVALID, "input index %lld is not valid, sequence's size %lld", index, size); | 93 | + GELOGE(ge::PARAM_INVALID, "input index %" PRId64 " is not valid, sequence's size %" PRId64 "", index, size); |
| 93 | - REPORT_INNER_ERR_MSG("E39999", "input is not valid"); | 94 | + REPORT_INNER_ERR_MSG("E39999", "input index %" PRId64 " is not valid, sequence's size %" PRId64 "", index, size); |
| 94 | } | 95 | } |
| 95 | return ret; | 96 | return ret; |
| 96 | } | 97 | } |
| @@ -111,14 +112,12 @@ class TensorSeq { | |||
| 111 | ge::graphStatus Add(TensorRef &&tensor, ge::DataType data_type) { | 112 | ge::graphStatus Add(TensorRef &&tensor, ge::DataType data_type) { |
| 112 | if (elem_type_ != data_type) { | 113 | if (elem_type_ != data_type) { |
| 113 | GELOGE(ge::PARAM_INVALID, | 114 | GELOGE(ge::PARAM_INVALID, |
| 114 | - "The data type of add tensor is not equal with element type " | 115 | + "The data type of the tensor to add is not equal to the element type of " |
| 115 | - "of tensor sequence, the input data type is [%u] , tensor sequence's element " | 116 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 116 | - "type is [%u].", | ||
| 117 | data_type, elem_type_); | 117 | data_type, elem_type_); |
| 118 | REPORT_INNER_ERR_MSG("E39999", | 118 | REPORT_INNER_ERR_MSG("E39999", |
| 119 | - "The data type of add tensor is not equal with element type " | 119 | + "The data type of the tensor to add is not equal to the element type of " |
| 120 | - "of tensor sequence, the input data type is [%u] , tensor sequence's " | 120 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 121 | - "element type is [%u].", | ||
| 122 | data_type, elem_type_); | 121 | data_type, elem_type_); |
| 123 | return ge::PARAM_INVALID; | 122 | return ge::PARAM_INVALID; |
| 124 | } | 123 | } |
| @@ -146,14 +145,12 @@ class TensorSeq { | |||
| 146 | auto data_type = tensor.GetDataType(); | 145 | auto data_type = tensor.GetDataType(); |
| 147 | if (elem_type_ != data_type) { | 146 | if (elem_type_ != data_type) { |
| 148 | GELOGE(ge::PARAM_INVALID, | 147 | GELOGE(ge::PARAM_INVALID, |
| 149 | - "The data type of add tensor is not equal with element type " | 148 | + "The data type of the tensor to add is not equal to the element type of " |
| 150 | - "of tensor sequence, the input data type is [%u] , tensor sequence's element " | 149 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 151 | - "type is [%u].", | ||
| 152 | data_type, elem_type_); | 150 | data_type, elem_type_); |
| 153 | REPORT_INNER_ERR_MSG("E39999", | 151 | REPORT_INNER_ERR_MSG("E39999", |
| 154 | - "The data type of add tensor is not equal with element type " | 152 | + "The data type of the tensor to add is not equal to the element type of " |
| 155 | - "of tensor sequence, the input data type is [%u] , tensor sequence's " | 153 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 156 | - "element type is [%u].", | ||
| 157 | data_type, elem_type_); | 154 | data_type, elem_type_); |
| 158 | return ge::PARAM_INVALID; | 155 | return ge::PARAM_INVALID; |
| 159 | } | 156 | } |
| @@ -176,14 +173,12 @@ class TensorSeq { | |||
| 176 | ge::graphStatus Add(const ge::DataType data_type, const TensorData &tensor_data, const StorageShape &storage_shape) { | 173 | ge::graphStatus Add(const ge::DataType data_type, const TensorData &tensor_data, const StorageShape &storage_shape) { |
| 177 | if (elem_type_ != data_type) { | 174 | if (elem_type_ != data_type) { |
| 178 | GELOGE(ge::PARAM_INVALID, | 175 | GELOGE(ge::PARAM_INVALID, |
| 179 | - "The data type of add tensor is not equal with element type " | 176 | + "The data type of the tensor to add is not equal to the element type of " |
| 180 | - "of tensor sequence, the input data type is [%u] , tensor sequence's element " | 177 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 181 | - "type is [%u].", | ||
| 182 | data_type, elem_type_); | 178 | data_type, elem_type_); |
| 183 | REPORT_INNER_ERR_MSG("E39999", | 179 | REPORT_INNER_ERR_MSG("E39999", |
| 184 | - "The data type of add tensor is not equal with element type " | 180 | + "The data type of the tensor to add is not equal to the element type of " |
| 185 | - "of tensor sequence, the input data type is [%u] , tensor sequence's " | 181 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 186 | - "element type is [%u].", | ||
| 187 | data_type, elem_type_); | 182 | data_type, elem_type_); |
| 188 | return ge::PARAM_INVALID; | 183 | return ge::PARAM_INVALID; |
| 189 | } | 184 | } |
| @@ -208,14 +203,12 @@ class TensorSeq { | |||
| 208 | auto data_type = tensor.GetDataType(); | 203 | auto data_type = tensor.GetDataType(); |
| 209 | if (elem_type_ != data_type) { | 204 | if (elem_type_ != data_type) { |
| 210 | GELOGE(ge::PARAM_INVALID, | 205 | GELOGE(ge::PARAM_INVALID, |
| 211 | - "The data type of add tensor is not equal with element type " | 206 | + "The data type of the tensor to add is not equal to the element type of " |
| 212 | - "of tensor sequence, the input data type is [%u] , tensor sequence's element " | 207 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 213 | - "type is [%u].", | ||
| 214 | data_type, elem_type_); | 208 | data_type, elem_type_); |
| 215 | REPORT_INNER_ERR_MSG("E39999", | 209 | REPORT_INNER_ERR_MSG("E39999", |
| 216 | - "The data type of add tensor is not equal with element type " | 210 | + "The data type of the tensor to add is not equal to the element type of " |
| 217 | - "of tensor sequence, the input data type is [%u] , tensor sequence's " | 211 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 218 | - "element type is [%u].", | ||
| 219 | data_type, elem_type_); | 212 | data_type, elem_type_); |
| 220 | return ge::PARAM_INVALID; | 213 | return ge::PARAM_INVALID; |
| 221 | } | 214 | } |
| @@ -249,14 +242,12 @@ class TensorSeq { | |||
| 249 | int64_t index) { | 242 | int64_t index) { |
| 250 | if (elem_type_ != data_type) { | 243 | if (elem_type_ != data_type) { |
| 251 | GELOGE(ge::PARAM_INVALID, | 244 | GELOGE(ge::PARAM_INVALID, |
| 252 | - "The data type of add tensor is not equal with element type " | 245 | + "The data type of the tensor to add is not equal to the element type of " |
| 253 | - "of tensor sequence, the input data type is [%u] , tensor sequence's element " | 246 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 254 | - "type is [%u].", | ||
| 255 | data_type, elem_type_); | 247 | data_type, elem_type_); |
| 256 | REPORT_INNER_ERR_MSG("E39999", | 248 | REPORT_INNER_ERR_MSG("E39999", |
| 257 | - "The data type of add tensor is not equal with element type " | 249 | + "The data type of the tensor to add is not equal to the element type of " |
| 258 | - "of tensor sequence, the input data type is [%u] , tensor sequence's " | 250 | + "the tensor sequence, input data type is [%u], element type is [%u].", |
| 259 | - "element type is [%u].", | ||
| 260 | data_type, elem_type_); | 251 | data_type, elem_type_); |
| 261 | return ge::PARAM_INVALID; | 252 | return ge::PARAM_INVALID; |
| 262 | } | 253 | } |
| @@ -83,7 +83,7 @@ std::vector<ValueHolderPtr> GetBaseCCArgs(const ge::NodePtr node, const domi::Ke | |||
| 83 | const auto &kernel_arg = kernel_def.args(); | 83 | const auto &kernel_arg = kernel_def.args(); |
| 84 | const size_t arg_size = kernel_arg.size(); | 84 | const size_t arg_size = kernel_arg.size(); |
| 85 | if (arg_size < kernel_def.args_size()) { | 85 | if (arg_size < kernel_def.args_size()) { |
| 86 | - GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s]arg_size %zu is smaller then size %u in kernel_def", | 86 | + GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s] arg_size %zu is smaller than %u in kernel_def", |
| 87 | node_name.c_str(), arg_size, kernel_def.args_size()); | 87 | node_name.c_str(), arg_size, kernel_def.args_size()); |
| 88 | return {nullptr}; // check valueholder nullptr will return | 88 | return {nullptr}; // check valueholder nullptr will return |
| 89 | } | 89 | } |
| @@ -94,7 +94,7 @@ std::vector<ValueHolderPtr> GetBaseCCArgs(const ge::NodePtr node, const domi::Ke | |||
| 94 | const auto &ext_info = kernel_def.kernel_ext_info(); | 94 | const auto &ext_info = kernel_def.kernel_ext_info(); |
| 95 | const size_t ext_size = ext_info.size(); | 95 | const size_t ext_size = ext_info.size(); |
| 96 | if (ext_size < kernel_def.kernel_ext_info_size()) { | 96 | if (ext_size < kernel_def.kernel_ext_info_size()) { |
| 97 | - GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s]ext_size %zu is smaller then size %u in kernel_def", | 97 | + GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s] ext_size %zu is smaller than %u in kernel_def", |
| 98 | node_name.c_str(), ext_size, kernel_def.kernel_ext_info_size()); | 98 | node_name.c_str(), ext_size, kernel_def.kernel_ext_info_size()); |
| 99 | return {nullptr}; // check valueholder nullptr will return | 99 | return {nullptr}; // check valueholder nullptr will return |
| 100 | } | 100 | } |
| @@ -122,7 +122,7 @@ std::vector<ValueHolderPtr> BuildTfAicpuArgImpl(const ge::NodePtr node, const Tf | |||
| 122 | const auto kernel_arg = kernel_ex_def.args(); | 122 | const auto kernel_arg = kernel_ex_def.args(); |
| 123 | const size_t arg_size = kernel_arg.size(); | 123 | const size_t arg_size = kernel_arg.size(); |
| 124 | if (arg_size < kernel_ex_def.args_size()) { | 124 | if (arg_size < kernel_ex_def.args_size()) { |
| 125 | - GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s]arg_size %zu is smaller then size %u in kernel_def", | 125 | + GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s] arg_size %zu is smaller than %u in kernel_def", |
| 126 | node_name.c_str(), arg_size, kernel_ex_def.args_size()); | 126 | node_name.c_str(), arg_size, kernel_ex_def.args_size()); |
| 127 | return {nullptr, nullptr}; // check valueholder nullptr will return | 127 | return {nullptr, nullptr}; // check valueholder nullptr will return |
| 128 | } | 128 | } |
| @@ -133,7 +133,7 @@ std::vector<ValueHolderPtr> BuildTfAicpuArgImpl(const ge::NodePtr node, const Tf | |||
| 133 | const auto ext_info = kernel_ex_def.kernel_ext_info(); | 133 | const auto ext_info = kernel_ex_def.kernel_ext_info(); |
| 134 | const size_t ext_info_size = ext_info.size(); | 134 | const size_t ext_info_size = ext_info.size(); |
| 135 | if (ext_info_size < kernel_ex_def.kernel_ext_info_size()) { | 135 | if (ext_info_size < kernel_ex_def.kernel_ext_info_size()) { |
| 136 | - GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s]ext_info_size %zu is smaller then size %u in kernel_def", | 136 | + GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s] ext_info_size %zu is smaller than %u in kernel_def", |
| 137 | node_name.c_str(), ext_info_size, kernel_ex_def.kernel_ext_info_size()); | 137 | node_name.c_str(), ext_info_size, kernel_ex_def.kernel_ext_info_size()); |
| 138 | return {nullptr, nullptr}; // check valueholder nullptr will return | 138 | return {nullptr, nullptr}; // check valueholder nullptr will return |
| 139 | } | 139 | } |
| @@ -147,7 +147,7 @@ std::vector<ValueHolderPtr> BuildTfAicpuArgImpl(const ge::NodePtr node, const Tf | |||
| 147 | const auto task_info = kernel_ex_def.task_info(); | 147 | const auto task_info = kernel_ex_def.task_info(); |
| 148 | const size_t task_size = task_info.size(); | 148 | const size_t task_size = task_info.size(); |
| 149 | if (task_size < kernel_ex_def.task_info_size()) { | 149 | if (task_size < kernel_ex_def.task_info_size()) { |
| 150 | - GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s]task_size %zu is smaller then %u in kernel_def", | 150 | + GELOGE(ge::PARAM_INVALID, "[Check][KernelDef]Op[%s] task_size %zu is smaller than %u in kernel_def", |
| 151 | node_name.c_str(), task_size, kernel_ex_def.task_info_size()); | 151 | node_name.c_str(), task_size, kernel_ex_def.task_info_size()); |
| 152 | return {nullptr, nullptr}; // check valueholder nullptr will return | 152 | return {nullptr, nullptr}; // check valueholder nullptr will return |
| 153 | } | 153 | } |
| @@ -34,7 +34,7 @@ std::vector<ValueHolderPtr> CreatBaseExtInfo(const ge::NodePtr node, const std:: | |||
| 34 | input_num = node->GetOpDescBarePtr()->GetAllInputsSize(); | 34 | input_num = node->GetOpDescBarePtr()->GetAllInputsSize(); |
| 35 | } | 35 | } |
| 36 | const size_t output_num = node->GetAllOutDataAnchorsSize(); | 36 | const size_t output_num = node->GetAllOutDataAnchorsSize(); |
| 37 | - GELOGI("Op %s type %s in all input size is %zu, all input data anchors size is %zu, output_num is %zu.", | 37 | + GELOGI("Op %s type %s: all input size is %zu, all input data anchors size is %zu, output_num is %zu.", |
| 38 | node->GetName().c_str(), ge::NodeUtils::GetNodeType(node).c_str(), | 38 | node->GetName().c_str(), ge::NodeUtils::GetNodeType(node).c_str(), |
| 39 | node->GetOpDescBarePtr()->GetAllInputsSize(), node->GetInDataNodesAndAnchors().size(), output_num); | 39 | node->GetOpDescBarePtr()->GetAllInputsSize(), node->GetInDataNodesAndAnchors().size(), output_num); |
| 40 | int32_t unknown_shape_type_val = 0; | 40 | int32_t unknown_shape_type_val = 0; |
| @@ -75,7 +75,7 @@ const std::vector<DevMemValueHolderPtr> AllocHostCpuOutputsMemory(const ge::Node | |||
| 75 | } | 75 | } |
| 76 | auto ref_input_index = iter->second; | 76 | auto ref_input_index = iter->second; |
| 77 | if (ref_input_index >= io_info.input_addrs.size()) { | 77 | if (ref_input_index >= io_info.input_addrs.size()) { |
| 78 | - GELOGE(ge::FAILED, "Node %s output %zu ref from input %zu exceed input addrs num %zu", node->GetName().c_str(), | 78 | + GELOGE(ge::FAILED, "Node %s output %zu ref from input %zu exceeds input addrs num %zu", node->GetName().c_str(), |
| 79 | i, ref_input_index, io_info.input_addrs.size()); | 79 | i, ref_input_index, io_info.input_addrs.size()); |
| 80 | return output_addrs; | 80 | return output_addrs; |
| 81 | } | 81 | } |
| @@ -56,7 +56,7 @@ ge::graphStatus OpJsonBinHandler::LoadBinary(const std::string &json_path) { | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | if (json_path.empty()) { | 58 | if (json_path.empty()) { |
| 59 | - GELOGE(ge::FAILED, "Load binary failed by json path is empty."); | 59 | + GELOGE(ge::FAILED, "Load binary failed because json path is empty."); |
| 60 | return ge::FAILED; | 60 | return ge::FAILED; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| @@ -80,12 +80,12 @@ ge::graphStatus OpDataBinHandler::LoadBinary(const std::string &so_name, const g | |||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | if (kernel_bin == nullptr) { | 82 | if (kernel_bin == nullptr) { |
| 83 | - GELOGE(ge::FAILED, "Load custom aicpu binary failed by nullptr. so=%s", so_name.c_str()); | 83 | + GELOGE(ge::FAILED, "Load custom aicpu binary failed because bin is nullptr. so=%s", so_name.c_str()); |
| 84 | return ge::FAILED; | 84 | return ge::FAILED; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | if (so_name.empty()) { | 87 | if (so_name.empty()) { |
| 88 | - GELOGE(ge::FAILED, "Load custom aicpu binary failed by so name is empty."); | 88 | + GELOGE(ge::FAILED, "Load custom aicpu binary failed because so name is empty."); |
| 89 | return ge::FAILED; | 89 | return ge::FAILED; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| @@ -121,7 +121,7 @@ ge::graphStatus CustBinHandlerManager::LoadAndGetBinHandle(const std::string &so | |||
| 121 | const ge::OpKernelBinPtr &kernel_bin, rtBinHandle &handle) { | 121 | const ge::OpKernelBinPtr &kernel_bin, rtBinHandle &handle) { |
| 122 | handle = nullptr; | 122 | handle = nullptr; |
| 123 | if ((so_name.empty()) || (kernel_bin == nullptr)) { | 123 | if ((so_name.empty()) || (kernel_bin == nullptr)) { |
| 124 | - GELOGE(ge::FAILED, "Load bin failed by so name is empty or bin is nullptr, so_name=%s", so_name.c_str()); | 124 | + GELOGE(ge::FAILED, "Load bin failed because so name is empty or bin is nullptr, so_name=%s", so_name.c_str()); |
| 125 | return ge::FAILED; | 125 | return ge::FAILED; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| @@ -163,7 +163,7 @@ ge::graphStatus CustBinHandlerManager::LoadAndGetBinHandle(const std::string &so | |||
| 163 | ge::graphStatus CustBinHandlerManager::GetBinHandle(const std::string &so_name, rtBinHandle &handle) { | 163 | ge::graphStatus CustBinHandlerManager::GetBinHandle(const std::string &so_name, rtBinHandle &handle) { |
| 164 | handle = nullptr; | 164 | handle = nullptr; |
| 165 | if (so_name.empty()) { | 165 | if (so_name.empty()) { |
| 166 | - GELOGE(ge::FAILED, "Get bin handle failed by empty so name, so_name=%s", so_name.c_str()); | 166 | + GELOGE(ge::FAILED, "Get bin handle failed because so name is empty, so_name=%s", so_name.c_str()); |
| 167 | return ge::FAILED; | 167 | return ge::FAILED; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| @@ -187,8 +187,8 @@ ge::graphStatus CustBinHandlerManager::GetBinHandle(const std::string &so_name, | |||
| 187 | ge::OpKernelBinPtr kernel_bin = GetKernelBin(so_name); | 187 | ge::OpKernelBinPtr kernel_bin = GetKernelBin(so_name); |
| 188 | GE_ASSERT_NOTNULL(kernel_bin); | 188 | GE_ASSERT_NOTNULL(kernel_bin); |
| 189 | (void)LoadAndGetBinHandle(so_name, kernel_bin, handle); | 189 | (void)LoadAndGetBinHandle(so_name, kernel_bin, handle); |
| 190 | - GELOGI("Bin handle in current resource id, but read so success, resource_id=%lu, so=%s, size=%lu", resource_id, | 190 | + GELOGI("Bin handle is in current resource id, and reading so succeeds, resource_id=%lu, so=%s, size=%lu", |
| 191 | - so_name.c_str(), so_bin_maps->second.size()); | 191 | + resource_id, so_name.c_str(), so_bin_maps->second.size()); |
| 192 | return ge::GRAPH_SUCCESS; | 192 | return ge::GRAPH_SUCCESS; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| @@ -244,7 +244,7 @@ bool CustBinHandlerManager::GetCustAicpuBinFromFile(const std::string &so_name, | |||
| 244 | return false; | 244 | return false; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | - GELOGI("Read so[%s] success, len is %u", so_name.c_str(), len); | 247 | + GELOGI("Read so[%s] success, len is %u bytes", so_name.c_str(), len); |
| 248 | return true; | 248 | return true; |
| 249 | } | 249 | } |
| 250 | 250 | ||
| @@ -319,7 +319,7 @@ ge::Status AicpuExtInfoHandler::UpdateWorkSpaceInfo(const uint64_t workspace_siz | |||
| 319 | } | 319 | } |
| 320 | workspace_info_->size = workspace_size; | 320 | workspace_info_->size = workspace_size; |
| 321 | workspace_info_->addr = workspace_addr; | 321 | workspace_info_->addr = workspace_addr; |
| 322 | - GELOGD("After UpdateWorkSpaceInfo, workspace info size is %lu.", workspace_info_->size); | 322 | + GELOGD("After UpdateWorkSpaceInfo, workspace info size is %lu bytes.", workspace_info_->size); |
| 323 | return ge::SUCCESS; | 323 | return ge::SUCCESS; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| @@ -373,7 +373,7 @@ ge::Status AicpuExtInfoHandler::CopyOutputShapeForThirdOp() { | |||
| 373 | return ge::SUCCESS; | 373 | return ge::SUCCESS; |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | - GELOGE(ge::FAILED, "CopyOutputShapeForThirdOp fail, output_shape_len_:%zu.", output_shape_len_); | 376 | + GELOGE(ge::FAILED, "CopyOutputShapeForThirdOp failed, output_shape_len_:%zu.", output_shape_len_); |
| 377 | return ge::FAILED; | 377 | return ge::FAILED; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| @@ -45,7 +45,7 @@ ge::graphStatus CopyTensorToDevice(KernelContext *context, const GertTensorData | |||
| 45 | 45 | ||
| 46 | auto mem_block = reinterpret_cast<memory::MultiStreamMemBlock *>(gert_allocator->Malloc(dst_len)); | 46 | auto mem_block = reinterpret_cast<memory::MultiStreamMemBlock *>(gert_allocator->Malloc(dst_len)); |
| 47 | KERNEL_CHECK_NOTNULL(mem_block); | 47 | KERNEL_CHECK_NOTNULL(mem_block); |
| 48 | - KERNEL_CHECK(mem_block->GetAddr() != nullptr, "malloc failed, tensor size=%zu", dst_len); | 48 | + KERNEL_CHECK(mem_block->GetAddr() != nullptr, "malloc failed, tensor size=%zu bytes", dst_len); |
| 49 | KERNEL_TRACE_ALLOC_MEM(gert_allocator->GetStreamId(), mem_block, mem_block->GetAddr(), mem_block->GetSize()); | 49 | KERNEL_TRACE_ALLOC_MEM(gert_allocator->GetStreamId(), mem_block, mem_block->GetAddr(), mem_block->GetSize()); |
| 50 | dst_tensor = TensorUtils::ToGertTensorData(mem_block, gert_allocator->GetPlacement(), gert_allocator->GetStreamId()); | 50 | dst_tensor = TensorUtils::ToGertTensorData(mem_block, gert_allocator->GetPlacement(), gert_allocator->GetStreamId()); |
| 51 | 51 | ||
| @@ -103,7 +103,7 @@ ge::graphStatus AicpuFuseHost(KernelContext *context) { | |||
| 103 | GE_ASSERT_SUCCESS( | 103 | GE_ASSERT_SUCCESS( |
| 104 | args_handle->AddHostInput(*(input_indexes + i), tensor_data->GetAddr(), host_tensor_size, align_size)); | 104 | args_handle->AddHostInput(*(input_indexes + i), tensor_data->GetAddr(), host_tensor_size, align_size)); |
| 105 | } else { | 105 | } else { |
| 106 | - GELOGD("Total host memory input size larger than range is %zu, no need optimize", kMaxTotalHostLen); | 106 | + GELOGD("Total host memory input size exceeds the limit %zu bytes, no need to optimize", kMaxTotalHostLen); |
| 107 | GE_ASSERT_SUCCESS(CopyTensorToDevice(context, *tensor_data, static_cast<size_t>(host_tensor_size), tensor_size, | 107 | GE_ASSERT_SUCCESS(CopyTensorToDevice(context, *tensor_data, static_cast<size_t>(host_tensor_size), tensor_size, |
| 108 | *out_tensor_data)); | 108 | *out_tensor_data)); |
| 109 | } | 109 | } |
| @@ -693,7 +693,7 @@ ge::graphStatus AllocHostCpuOutputMemory(KernelContext *context) { | |||
| 693 | if ((out_tensor_data->GetAddr() == nullptr) || (out_tensor_data->GetSize() < size)) { | 693 | if ((out_tensor_data->GetAddr() == nullptr) || (out_tensor_data->GetSize() < size)) { |
| 694 | auto host_block = gert_allocator->Malloc(size); | 694 | auto host_block = gert_allocator->Malloc(size); |
| 695 | KERNEL_CHECK_NOTNULL(host_block); | 695 | KERNEL_CHECK_NOTNULL(host_block); |
| 696 | - KERNEL_CHECK(host_block->GetAddr() != nullptr, "malloc failed, tensor size=%zu", size); | 696 | + KERNEL_CHECK(host_block->GetAddr() != nullptr, "malloc failed, tensor size=%zu bytes", size); |
| 697 | *out_tensor_data = {size, gert_allocator->GetPlacement(), gert_allocator->GetStreamId(), host_block}; | 697 | *out_tensor_data = {size, gert_allocator->GetPlacement(), gert_allocator->GetStreamId(), host_block}; |
| 698 | } | 698 | } |
| 699 | return ge::GRAPH_SUCCESS; | 699 | return ge::GRAPH_SUCCESS; |
| @@ -431,7 +431,8 @@ ge::graphStatus GetAddrSize(const KernelContext *context, size_t param_id, bool | |||
| 431 | const size_t slice_dim_num = tail_slice_vec[param_id].GetDimNum(); | 431 | const size_t slice_dim_num = tail_slice_vec[param_id].GetDimNum(); |
| 432 | for (size_t j = 0; j < slice_dim_num; ++j) { | 432 | for (size_t j = 0; j < slice_dim_num; ++j) { |
| 433 | if (ge::MulOverflow(batch_size, tail_slice_vec[param_id][j], batch_size)) { | 433 | if (ge::MulOverflow(batch_size, tail_slice_vec[param_id][j], batch_size)) { |
| 434 | - GELOGE(ge::FAILED, "tail_size[%ld] calculate err with [%lu].", batch_size, tail_slice_vec[param_id][j]); | 434 | + GELOGE(ge::FAILED, "Failed to calculate tail_size[%ld] against range %lu.", batch_size, |
| 435 | + tail_slice_vec[param_id][j]); | ||
| 435 | return ge::GRAPH_FAILED; | 436 | return ge::GRAPH_FAILED; |
| 436 | } | 437 | } |
| 437 | } | 438 | } |
| @@ -445,7 +446,8 @@ ge::graphStatus GetAddrSize(const KernelContext *context, size_t param_id, bool | |||
| 445 | const size_t slice_dim_num = not_tail_slice_vec[param_id].GetDimNum(); | 446 | const size_t slice_dim_num = not_tail_slice_vec[param_id].GetDimNum(); |
| 446 | for (size_t j = 0; j < slice_dim_num; ++j) { | 447 | for (size_t j = 0; j < slice_dim_num; ++j) { |
| 447 | if (ge::MulOverflow(batch_size, not_tail_slice_vec[param_id][j], batch_size)) { | 448 | if (ge::MulOverflow(batch_size, not_tail_slice_vec[param_id][j], batch_size)) { |
| 448 | - GELOGE(ge::FAILED, "tail_size[%ld] calculate err with [%lu].", batch_size, not_tail_slice_vec[param_id][j]); | 449 | + GELOGE(ge::FAILED, "Failed to calculate tail_size[%ld] against range %lu.", batch_size, |
| 450 | + not_tail_slice_vec[param_id][j]); | ||
| 449 | return ge::GRAPH_FAILED; | 451 | return ge::GRAPH_FAILED; |
| 450 | } | 452 | } |
| 451 | } | 453 | } |
| @@ -57,7 +57,7 @@ ge::graphStatus AicpuCalcOutputMaxThreadSize(gert::KernelContext *context) { | |||
| 57 | const size_t tail_dim_num = tail_slice_out_vec[output_id].GetDimNum(); | 57 | const size_t tail_dim_num = tail_slice_out_vec[output_id].GetDimNum(); |
| 58 | for (size_t i = 0; i < tail_dim_num; ++i) { | 58 | for (size_t i = 0; i < tail_dim_num; ++i) { |
| 59 | if (ge::MulOverflow(tail_size, tail_slice_out_vec[output_id][i], tail_size)) { | 59 | if (ge::MulOverflow(tail_size, tail_slice_out_vec[output_id][i], tail_size)) { |
| 60 | - GELOGE(ge::FAILED, "[Kernel]tail_size[%ld] calculate err with range:%lu.", tail_size, | 60 | + GELOGE(ge::FAILED, "[Kernel]Failed to calculate tail_size[%ld] against range %lu.", tail_size, |
| 61 | tail_slice_out_vec[output_id][i]); | 61 | tail_slice_out_vec[output_id][i]); |
| 62 | return ge::GRAPH_FAILED; | 62 | return ge::GRAPH_FAILED; |
| 63 | } | 63 | } |
| @@ -66,7 +66,7 @@ ge::graphStatus AicpuCalcOutputMaxThreadSize(gert::KernelContext *context) { | |||
| 66 | const size_t not_tail_dim_num = not_tail_slice_out_vec[output_id].GetDimNum(); | 66 | const size_t not_tail_dim_num = not_tail_slice_out_vec[output_id].GetDimNum(); |
| 67 | for (size_t j = 0; j < not_tail_dim_num; ++j) { | 67 | for (size_t j = 0; j < not_tail_dim_num; ++j) { |
| 68 | if (ge::MulOverflow(not_tail_size, not_tail_slice_out_vec[output_id][j], not_tail_size)) { | 68 | if (ge::MulOverflow(not_tail_size, not_tail_slice_out_vec[output_id][j], not_tail_size)) { |
| 69 | - GELOGE(ge::FAILED, "[Kernel]not_tail_size[%ld] calculate err with range:%lu.", not_tail_size, | 69 | + GELOGE(ge::FAILED, "[Kernel]Failed to calculate not_tail_size[%ld] against range %lu.", not_tail_size, |
| 70 | not_tail_slice_out_vec[output_id][j]); | 70 | not_tail_slice_out_vec[output_id][j]); |
| 71 | return ge::GRAPH_FAILED; | 71 | return ge::GRAPH_FAILED; |
| 72 | } | 72 | } |
| @@ -102,13 +102,14 @@ ge::graphStatus CalcInputPara(gert::KernelContext *context, const ComputeNodeInf | |||
| 102 | const size_t dim_num = slice_in_vec[i].GetDimNum(); | 102 | const size_t dim_num = slice_in_vec[i].GetDimNum(); |
| 103 | for (size_t j = 0; j < dim_num; ++j) { | 103 | for (size_t j = 0; j < dim_num; ++j) { |
| 104 | if (ge::MulOverflow(thread_offset, slice_in_vec[i][j], thread_offset)) { | 104 | if (ge::MulOverflow(thread_offset, slice_in_vec[i][j], thread_offset)) { |
| 105 | - GELOGE(ge::FAILED, "[Kernel]Offset[%ld] calculate err with range:%lu.", thread_offset, slice_in_vec[i][j]); | 105 | + GELOGE(ge::FAILED, "[Kernel]Failed to calculate Offset[%ld] against range %lu.", thread_offset, |
| 106 | + slice_in_vec[i][j]); | ||
| 106 | return ge::GRAPH_FAILED; | 107 | return ge::GRAPH_FAILED; |
| 107 | } | 108 | } |
| 108 | } | 109 | } |
| 109 | thread_offset = ge::GetSizeInBytes(thread_offset, tensor->GetDataType()); | 110 | thread_offset = ge::GetSizeInBytes(thread_offset, tensor->GetDataType()); |
| 110 | GELOGI("Input anchorIndex: %u, thread_offset: %ld.", index, thread_offset); | 111 | GELOGI("Input anchorIndex: %u, thread_offset: %ld.", index, thread_offset); |
| 111 | - GE_ASSERT_TRUE(index < MAX_OFFSET_NUM, "index[%zu] must less than MAX_OFFSET_NUM[%zu]", index, MAX_OFFSET_NUM); | 112 | + GE_ASSERT_TRUE(index < MAX_OFFSET_NUM, "index[%zu] must be less than MAX_OFFSET_NUM[%zu]", index, MAX_OFFSET_NUM); |
| 112 | args_para->task_addr_offset[index] = static_cast<uint64_t>(thread_offset); | 113 | args_para->task_addr_offset[index] = static_cast<uint64_t>(thread_offset); |
| 113 | } | 114 | } |
| 114 | count = input_num; | 115 | count = input_num; |
| @@ -138,7 +139,8 @@ ge::graphStatus CalcOutputPara(gert::KernelContext *context, const ComputeNodeIn | |||
| 138 | const size_t dim_num = slice_out_vec[i].GetDimNum(); | 139 | const size_t dim_num = slice_out_vec[i].GetDimNum(); |
| 139 | for (size_t j = 0; j < dim_num; ++j) { | 140 | for (size_t j = 0; j < dim_num; ++j) { |
| 140 | if (ge::MulOverflow(thread_offset, slice_out_vec[i][j], thread_offset)) { | 141 | if (ge::MulOverflow(thread_offset, slice_out_vec[i][j], thread_offset)) { |
| 141 | - GELOGE(ge::FAILED, "[Kernel]Offset[%ld] calculate err with range:%lu.", thread_offset, slice_out_vec[i][j]); | 142 | + GELOGE(ge::FAILED, "[Kernel]Failed to calculate Offset[%ld] against range %lu.", thread_offset, |
| 143 | + slice_out_vec[i][j]); | ||
| 142 | return ge::GRAPH_FAILED; | 144 | return ge::GRAPH_FAILED; |
| 143 | } | 145 | } |
| 144 | } | 146 | } |
| @@ -71,7 +71,7 @@ ge::graphStatus AllocSpecifiedMem(KernelContext *context) { | |||
| 71 | for (size_t i = 0; i < tensor_num; ++i) { | 71 | for (size_t i = 0; i < tensor_num; ++i) { |
| 72 | auto mem_block = reinterpret_cast<memory::MultiStreamMemBlock *>(gert_allocator->Malloc(shape_sizes_data[i])); | 72 | auto mem_block = reinterpret_cast<memory::MultiStreamMemBlock *>(gert_allocator->Malloc(shape_sizes_data[i])); |
| 73 | KERNEL_CHECK_NOTNULL(mem_block); | 73 | KERNEL_CHECK_NOTNULL(mem_block); |
| 74 | - KERNEL_CHECK(mem_block->GetAddr() != nullptr, "malloc failed, tensor size=%zu", shape_sizes_data[i]); | 74 | + KERNEL_CHECK(mem_block->GetAddr() != nullptr, "malloc failed, tensor size=%zu bytes", shape_sizes_data[i]); |
| 75 | tensor_data_info[i] = new (std::nothrow) TensorData(); | 75 | tensor_data_info[i] = new (std::nothrow) TensorData(); |
| 76 | GE_ASSERT_NOTNULL(tensor_data_info[i]); | 76 | GE_ASSERT_NOTNULL(tensor_data_info[i]); |
| 77 | *(tensor_data_info[i]) = | 77 | *(tensor_data_info[i]) = |
| @@ -138,7 +138,7 @@ ge::graphStatus BuildSplitVecWithInput(const gert::StorageShape &split_storeage_ | |||
| 138 | if (split_rank == 0) { | 138 | if (split_rank == 0) { |
| 139 | T split_scalar; | 139 | T split_scalar; |
| 140 | GE_ASSERT_RT_OK(rtMemcpy(&split_scalar, sizeof(T), split_addr->GetAddr(), sizeof(T), RT_MEMCPY_DEVICE_TO_HOST)); | 140 | GE_ASSERT_RT_OK(rtMemcpy(&split_scalar, sizeof(T), split_addr->GetAddr(), sizeof(T), RT_MEMCPY_DEVICE_TO_HOST)); |
| 141 | - GE_ASSERT_TRUE((split_scalar > 0), "split scalar must be greater than 0,%d", split_scalar); | 141 | + GE_ASSERT_TRUE((split_scalar > 0), "split scalar must be greater than 0, but got %d", split_scalar); |
| 142 | auto num_even_split = input_x_axis_dim / split_scalar; | 142 | auto num_even_split = input_x_axis_dim / split_scalar; |
| 143 | auto num_remain = input_x_axis_dim % split_scalar; | 143 | auto num_remain = input_x_axis_dim % split_scalar; |
| 144 | split_num = num_even_split; | 144 | split_num = num_even_split; |
| @@ -156,7 +156,7 @@ ge::graphStatus BuildSplitVecWithInput(const gert::StorageShape &split_storeage_ | |||
| 156 | RT_MEMCPY_DEVICE_TO_HOST)); | 156 | RT_MEMCPY_DEVICE_TO_HOST)); |
| 157 | auto split_sum = 0; | 157 | auto split_sum = 0; |
| 158 | for (size_t i = 0; i < split_num; i++) { | 158 | for (size_t i = 0; i < split_num; i++) { |
| 159 | - GE_ASSERT_TRUE((temp_array[i] > 0), "split must be greater than 0,but get:%ld", temp_array[i]); | 159 | + GE_ASSERT_TRUE((temp_array[i] > 0), "split must be greater than 0, but got: %ld", temp_array[i]); |
| 160 | split_vec[i] = temp_array[i]; | 160 | split_vec[i] = temp_array[i]; |
| 161 | split_sum += split_vec[i]; | 161 | split_sum += split_vec[i]; |
| 162 | } | 162 | } |
| @@ -278,8 +278,8 @@ ge::graphStatus SplitToSequenceComputeKernel(gert::KernelContext *context) { | |||
| 278 | auto input_x_desc = extend_ctx->GetInputDesc(0); | 278 | auto input_x_desc = extend_ctx->GetInputDesc(0); |
| 279 | GE_ASSERT_NOTNULL(input_x_desc); | 279 | GE_ASSERT_NOTNULL(input_x_desc); |
| 280 | ge::DataType input_data_type = input_x_desc->GetDataType(); | 280 | ge::DataType input_data_type = input_x_desc->GetDataType(); |
| 281 | - GE_ASSERT_TRUE(kSupportedDataType.count(input_data_type) != 0, "SplitToSequence kernel data type [%d] not support.", | 281 | + GE_ASSERT_TRUE(kSupportedDataType.count(input_data_type) != 0, |
| 282 | - input_data_type); | 282 | + "SplitToSequence kernel data type [%d] is not supported.", input_data_type); |
| 283 | int32_t type_size = GetSizeByDataType(input_data_type); | 283 | int32_t type_size = GetSizeByDataType(input_data_type); |
| 284 | auto axis = context->GetInputValue<int32_t>(static_cast<size_t>(SplitToSequenceArgIndex::KAxis)); | 284 | auto axis = context->GetInputValue<int32_t>(static_cast<size_t>(SplitToSequenceArgIndex::KAxis)); |
| 285 | auto split_shapes = context->GetInputPointer<gert::TypedContinuousVector<gert::Shape>>( | 285 | auto split_shapes = context->GetInputPointer<gert::TypedContinuousVector<gert::Shape>>( |
| @@ -38,7 +38,7 @@ bool IsSingleMakeTensorDevice(ge::FastNode *const node, ge::FastNode *const dst_ | |||
| 38 | if (out_edge != nullptr) { | 38 | if (out_edge != nullptr) { |
| 39 | const auto out_node = out_edge->dst; | 39 | const auto out_node = out_edge->dst; |
| 40 | if ((out_node->GetName() != dst_node->GetName()) && (out_node->GetType() != "FreeMemory")) { | 40 | if ((out_node->GetName() != dst_node->GetName()) && (out_node->GetType() != "FreeMemory")) { |
| 41 | - GELOGD("Node[%s] has mulit dst nodes, such as %s", node->GetName().c_str(), dst_node->GetName().c_str()); | 41 | + GELOGD("Node[%s] has multi dst nodes, such as %s", node->GetName().c_str(), dst_node->GetName().c_str()); |
| 42 | return false; | 42 | return false; |
| 43 | } | 43 | } |
| 44 | } | 44 | } |