已合并
fix: improve log usability #4556
洪跃城创建于 14 天前
fix: improve log usability #4556
已合并
洪跃城创建于 14 天前
423 个文件变更+1142-1072
@@ -201,7 +201,7 @@ aclError aclblasCreateHandleForGemmEx(aclTransType transA, aclTransType transB,
201 ACL_LOG_INFO("start to execute aclblasCreateHandleForGemmEx");201 ACL_LOG_INFO("start to execute aclblasCreateHandleForGemmEx");
202 ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(handle);202 ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(handle);
203 if ((m <= 0) || (n <= 0) || (k <= 0)) {203 if ((m <= 0) || (n <= 0) || (k <= 0)) {
204- ACL_LOG_ERROR("[Check][Params]The value of m,n,k must be larger than zero.m = %d, n = %d, k = %d", m, n, k);204+ ACL_LOG_ERROR("[Check][Params]The value of m,n,k must be larger than zero. m = %d, n = %d, k = %d", m, n, k);
205 const std::string errMsg = acl::AclErrorLogManager::FormatStr("m = %d, n = %d, k = %d", m, n, k);205 const std::string errMsg = acl::AclErrorLogManager::FormatStr("m = %d, n = %d, k = %d", m, n, k);
206 acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_MSG,206 acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_MSG,
207 std::vector<const char *>({"param", "value", "reason"}),207 std::vector<const char *>({"param", "value", "reason"}),
@@ -176,7 +176,7 @@ static aclError GetAndCheckAippOutputShape(const uint32_t modelId, const aclmdlD
176 const int64_t batchSize = static_cast<int64_t>(aippParmsSet->batchSize);176 const int64_t batchSize = static_cast<int64_t>(aippParmsSet->batchSize);
177 if (idx >= modelDesc.inputDesc.size()) {177 if (idx >= modelDesc.inputDesc.size()) {
178 ACL_LOG_INNER_ERROR(178 ACL_LOG_INNER_ERROR(
179- "[Check][Params]index[%zu] cannot greater than or equal to tensor "179+ "[Check][Params]index[%zu] cannot be greater than or equal to tensor "
180 "size[%zu]",180 "size[%zu]",
181 idx, modelDesc.inputDesc.size());181 idx, modelDesc.inputDesc.size());
182 return ACL_ERROR_INVALID_PARAM;182 return ACL_ERROR_INVALID_PARAM;
@@ -224,7 +224,7 @@ static aclError GetAndCheckAippOutputShape(const uint32_t modelId, const aclmdlD
224 return ACL_ERROR_INVALID_PARAM;224 return ACL_ERROR_INVALID_PARAM;
225 }225 }
226 } else {226 } else {
227- ACL_LOG_INFO("cant not get model H W N, current used model is old");227+ ACL_LOG_INFO("cannot get model H W N, current used model is old");
228 }228 }
229 229 
230 return ACL_SUCCESS;230 return ACL_SUCCESS;
@@ -57,7 +57,7 @@ static aclError AippSrcImageSizeCheck(const enum CceAippInputFormat inputFormat,
57 bool flag = false;57 bool flag = false;
58 flag = ((srcImageSizeW == 0) || (srcImageSizeH == 0));58 flag = ((srcImageSizeW == 0) || (srcImageSizeH == 0));
59 if (flag) {59 if (flag) {
60- ACL_LOG_INNER_ERROR("[Check][Params]srcImageSizeW and srcImageSizeH must be setted!");60+ ACL_LOG_INNER_ERROR("[Check][Params]srcImageSizeW and srcImageSizeH must be set!");
61 return ACL_ERROR_INVALID_PARAM;61 return ACL_ERROR_INVALID_PARAM;
62 }62 }
63 63 
@@ -572,7 +572,7 @@ static aclError RuntimeV2ModelExecute(const uint32_t modelId, const aclmdlDatase
572 572 
573 auto const executor = acl::AclResourceManager::GetInstance().GetExecutor(modelId);573 auto const executor = acl::AclResourceManager::GetInstance().GetExecutor(modelId);
574 if (executor == nullptr) {574 if (executor == nullptr) {
575- ACL_LOG_ERROR("input modelId[%u] is invalid, please make sure model has been loaed", modelId);575+ ACL_LOG_ERROR("input modelId[%u] is invalid, please make sure model has been loaded", modelId);
576 return static_cast<aclError>(ACL_ERROR_GE_EXEC_MODEL_ID_INVALID);576 return static_cast<aclError>(ACL_ERROR_GE_EXEC_MODEL_ID_INVALID);
577 }577 }
578 578 
@@ -617,7 +617,12 @@ static aclError RuntimeV2ModelExecute(const uint32_t modelId, const aclmdlDatase
617 continue;617 continue;
618 }618 }
619 if (!desc.GetInputDesc(i)->IsOriginShapeInRange(inputTensor[i].GetOriginShape())) {619 if (!desc.GetInputDesc(i)->IsOriginShapeInRange(inputTensor[i].GetOriginShape())) {
620- ACL_LOG_ERROR("[Check][InputShape] Input [%zu] shape out of shape range.", i);620+ ACL_LOG_ERROR(
621+ "[Check][InputShape] Input [%zu] shape size [%ld] is out of shape range, model shape size range is [%ld, "
622+ "%ld].",
623+ i, inputTensor[i].GetOriginShape().GetShapeSize(),
624+ desc.GetInputDesc(i)->GetOriginShapeRange().GetMin().GetShapeSize(),
625+ desc.GetInputDesc(i)->GetOriginShapeRange().GetMax().GetShapeSize());
621 return ACL_ERROR_INVALID_PARAM;626 return ACL_ERROR_INVALID_PARAM;
622 }627 }
623 }628 }
@@ -1434,7 +1439,7 @@ aclError aclmdlBundleInitFromFileImpl(const char *modelPath, void *varWeightPtr,
1434 ge::ModelData modelData;1439 ge::ModelData modelData;
1435 modelData.om_path = modelPath;1440 modelData.om_path = modelPath;
1436 ACL_LOG_INFO("call ge interface gert::LoadDataFromFile");1441 ACL_LOG_INFO("call ge interface gert::LoadDataFromFile");
1437- ACL_REQUIRES_CALL_GE_OK(gert::LoadDataFromFile(modelPath, modelData), "load data form file %s failed", modelPath);1442+ ACL_REQUIRES_CALL_GE_OK(gert::LoadDataFromFile(modelPath, modelData), "load data from file %s failed", modelPath);
1438 std::shared_ptr<uint8_t> tmpData;1443 std::shared_ptr<uint8_t> tmpData;
1439 tmpData.reset(ge::PtrToPtr<void, uint8_t>(modelData.model_data), std::default_delete<uint8_t[]>());1444 tmpData.reset(ge::PtrToPtr<void, uint8_t>(modelData.model_data), std::default_delete<uint8_t[]>());
1440 ACL_REQUIRES_NOT_NULL(tmpData);1445 ACL_REQUIRES_NOT_NULL(tmpData);
@@ -1468,7 +1473,7 @@ static aclError GetTargetBundleInfo(uint32_t bundleId, acl::BundleModelInfo &bun
1468 bool need_load_mem_from_file =1473 bool need_load_mem_from_file =
1469 !bundleInfos.isInit && !bundleInfos.fromFilePath.empty() && (bundleInfos.bundleModelData == nullptr);1474 !bundleInfos.isInit && !bundleInfos.fromFilePath.empty() && (bundleInfos.bundleModelData == nullptr);
1470 if (need_load_mem_from_file) {1475 if (need_load_mem_from_file) {
1471- ACL_LOG_INFO("bundle mem should allocated again when aclmdlBundleLoadFromFile called");1476+ ACL_LOG_INFO("bundle mem should be allocated again when aclmdlBundleLoadFromFile called");
1472 ge::ModelData modelData;1477 ge::ModelData modelData;
1473 modelData.om_path = bundleInfos.fromFilePath;1478 modelData.om_path = bundleInfos.fromFilePath;
1474 ACL_LOG_INFO("call ge interface gert::LoadDataFromFile");1479 ACL_LOG_INFO("call ge interface gert::LoadDataFromFile");
@@ -1487,7 +1492,7 @@ aclError aclmdlBundleLoadModelWithMemImpl(uint32_t bundleId, size_t index, void
1487 void *weightPtr, size_t weightSize, uint32_t *modelId) {1492 void *weightPtr, size_t weightSize, uint32_t *modelId) {
1488 ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(modelId);1493 ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(modelId);
1489 ACL_PROFILING_REG(acl::AclProfType::AclmdlBundleLoadModelWithMem);1494 ACL_PROFILING_REG(acl::AclProfType::AclmdlBundleLoadModelWithMem);
1490- ACL_LOG_INFO("strat to execute aclmdlBundleLoadModelWithMem, bundleId %u, index %zu", bundleId, index);1495+ ACL_LOG_INFO("start to execute aclmdlBundleLoadModelWithMem, bundleId %u, index %zu", bundleId, index);
1491 acl::BundleModelInfo bundleInfos;1496 acl::BundleModelInfo bundleInfos;
1492 ACL_REQUIRES_OK(GetTargetBundleInfo(bundleId, bundleInfos));1497 ACL_REQUIRES_OK(GetTargetBundleInfo(bundleId, bundleInfos));
1493 if (index >= bundleInfos.subModelInfos.size()) {1498 if (index >= bundleInfos.subModelInfos.size()) {
@@ -1756,7 +1761,7 @@ aclError aclmdlUnloadImpl(uint32_t modelId) {
1756 ACL_PROFILING_REG(acl::AclProfType::AclmdlUnload);1761 ACL_PROFILING_REG(acl::AclProfType::AclmdlUnload);
1757 ACL_LOG_INFO("start to execute aclmdlUnload, modelId[%u]", modelId);1762 ACL_LOG_INFO("start to execute aclmdlUnload, modelId[%u]", modelId);
1758 if (acl::AclResourceManager::GetInstance().IsBundleInnerId(modelId)) {1763 if (acl::AclResourceManager::GetInstance().IsBundleInnerId(modelId)) {
1759- ACL_LOG_ERROR("this modeId %u is bundle inner modelId, please ues aclmdlBundleUnload api instead", modelId);1764+ ACL_LOG_ERROR("this modelId %u is bundle inner modelId, please use aclmdlBundleUnload api instead", modelId);
1760 return ACL_ERROR_INVALID_PARAM;1765 return ACL_ERROR_INVALID_PARAM;
1761 }1766 }
1762 ACL_REQUIRES_OK(UnloadModelInner(modelId));1767 ACL_REQUIRES_OK(UnloadModelInner(modelId));
@@ -2031,7 +2036,7 @@ aclError aclmdlGetCurOutputDimsImpl(const aclmdlDesc *modelDesc, size_t index, a
2031 2036 
2032 aclRet = acl::GetCurOuputShapeInfo(modelDesc, index, curGearIndex, dims);2037 aclRet = acl::GetCurOuputShapeInfo(modelDesc, index, curGearIndex, dims);
2033 ACL_REQUIRES_OK_WITH_INNER_MESSAGE(aclRet,2038 ACL_REQUIRES_OK_WITH_INNER_MESSAGE(aclRet,
2034- "[Get][CurOuputShapeInfo]get current output shape info failed, result[%d], "2039+ "[Get][CurOutputShapeInfo]get current output shape info failed, result[%d], "
2035 "index[%zu], modelId[%u], the size of dynamicOutputShape[%zu]",2040 "index[%zu], modelId[%u], the size of dynamicOutputShape[%zu]",
2036 aclRet, index, modelId, modelDesc->dynamicOutputShape.size());2041 aclRet, index, modelId, modelDesc->dynamicOutputShape.size());
2037 2042 
@@ -408,11 +408,11 @@ ACL_FUNC_VISIBILITY aclError GetTensorDescNameToDims(const aclmdlDesc *const mod
408 std::string tensorName;408 std::string tensorName;
409 if ((realName.size() + 1U) > dimsNameLen) {409 if ((realName.size() + 1U) > dimsNameLen) {
410 // use conversion name because realname is too long410 // use conversion name because realname is too long
411- ACL_LOG_INFO("use conversion name because real tensor name is over than %zu", dimsNameLen);411+ ACL_LOG_INFO("use conversion name because real tensor name is longer than %zu characters", dimsNameLen);
412 GetConvertTensorName(modelDesc, idx, tensorType, tensorName);412 GetConvertTensorName(modelDesc, idx, tensorType, tensorName);
413 if (!IsConvertTensorNameLegal(modelDesc, tensorName)) {413 if (!IsConvertTensorNameLegal(modelDesc, tensorName)) {
414 if (!TransConvertTensorNameToLegal(modelDesc, tensorName)) {414 if (!TransConvertTensorNameToLegal(modelDesc, tensorName)) {
415- ACL_LOG_WARN("cannot generate legal tensor name, use conversion name %s may has conflict risk",415+ ACL_LOG_WARN("cannot generate legal tensor name, use conversion name %s may have conflict risk",
416 tensorName.c_str());416 tensorName.c_str());
417 }417 }
418 }418 }
@@ -62,7 +62,7 @@ static void MakeHostMemTensor(const aclTensorDesc *const desc, const aclDataBuff
62 (desc->memtype == ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT)) {62 (desc->memtype == ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT)) {
63 // During fuzzy compilation or ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT, change hostMem to data input.63 // During fuzzy compilation or ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT, change hostMem to data input.
64 ACL_LOG_INFO(64 ACL_LOG_INFO(
65- "compleFlag is ACL_OP_COMPILE_FUZZ or memtype is ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT, "65+ "compileFlag is ACL_OP_COMPILE_FUZZ or memtype is ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT, "
66 "change hostMem to data.");66 "change hostMem to data.");
67 ge::ConstGeTensorPtr dataTensor = nullptr;67 ge::ConstGeTensorPtr dataTensor = nullptr;
68 ACL_MAKE_SHARED(dataTensor = std::make_shared<ge::GeTensor>(68 ACL_MAKE_SHARED(dataTensor = std::make_shared<ge::GeTensor>(
@@ -72,7 +72,7 @@ static void MakeHostMemTensor(const aclTensorDesc *const desc, const aclDataBuff
72 } else {72 } else {
73 // During static compilation, change hostMem to const input.73 // During static compilation, change hostMem to const input.
74 ACL_LOG_INFO(74 ACL_LOG_INFO(
75- "compleFlag is ACL_OP_COMPILE_DEFAULT and memtype is ACL_MEMTYPE_HOST, "75+ "compileFlag is ACL_OP_COMPILE_DEFAULT and memtype is ACL_MEMTYPE_HOST, "
76 "change hostMem to const.");76 "change hostMem to const.");
77 (void)ge::AttrUtils::SetBool(geTensorDesc, ge::CONST_ATTR_NAME_INPUT, true);77 (void)ge::AttrUtils::SetBool(geTensorDesc, ge::CONST_ATTR_NAME_INPUT, true);
78 ge::ConstGeTensorPtr constTensor = nullptr;78 ge::ConstGeTensorPtr constTensor = nullptr;
@@ -173,7 +173,8 @@ aclError aclopExecWithHandleImpl(aclopHandle *handle, int numInputs, const aclDa
173 173 
174 if (numOutputs != opHandle.numOutputs) {174 if (numOutputs != opHandle.numOutputs) {
175 ACL_LOG_ERROR("[Check][NumOutputs]output num mismatch: expect %d, but %d", opHandle.numOutputs, numOutputs);175 ACL_LOG_ERROR("[Check][NumOutputs]output num mismatch: expect %d, but %d", opHandle.numOutputs, numOutputs);
176- const std::string errMsg = acl::AclErrorLogManager::FormatStr("input num mismatch: expect %d", opHandle.numOutputs);176+ const std::string errMsg =
177+ acl::AclErrorLogManager::FormatStr("output num mismatch: expect %d", opHandle.numOutputs);
177 acl::AclErrorLogManager::ReportInputError(178 acl::AclErrorLogManager::ReportInputError(
178 acl::INVALID_PARAM_MSG, std::vector<const char *>({"param", "value", "reason"}),179 acl::INVALID_PARAM_MSG, std::vector<const char *>({"param", "value", "reason"}),
179 std::vector<const char *>({"output num", std::to_string(numOutputs).c_str(), errMsg.c_str()}));180 std::vector<const char *>({"output num", std::to_string(numOutputs).c_str(), errMsg.c_str()}));
@@ -105,7 +105,7 @@ static void RefreshOutput(
105 const ge::SmallVector<gert::Tensor *, static_cast<size_t>(ge::kDefaultMaxOutputNum)> &outputTensorPtr,105 const ge::SmallVector<gert::Tensor *, static_cast<size_t>(ge::kDefaultMaxOutputNum)> &outputTensorPtr,
106 const bool executeWithExactModel) {106 const bool executeWithExactModel) {
107 if (aclOp.exeucteType == ACL_OP_EXECUTE_V2) {107 if (aclOp.exeucteType == ACL_OP_EXECUTE_V2) {
108- ACL_LOG_DEBUG("exeucteType is ACL_OP_EXECUTE_V2");108+ ACL_LOG_DEBUG("executeType is ACL_OP_EXECUTE_V2");
109 size_t outCnt = 0U;109 size_t outCnt = 0U;
110 for (int32_t i = 0; i < aclOp.numOutputs; ++i) {110 for (int32_t i = 0; i < aclOp.numOutputs; ++i) {
111 if (outCnt >= filterOutNum) {111 if (outCnt >= filterOutNum) {
@@ -123,7 +123,7 @@ static void RefreshOutput(
123 ++outCnt;123 ++outCnt;
124 }124 }
125 } else if (aclOp.exeucteType == ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE) {125 } else if (aclOp.exeucteType == ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE) {
126- ACL_LOG_DEBUG("exeucteType is ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE");126+ ACL_LOG_DEBUG("executeType is ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE");
127 size_t outCnt = 0U;127 size_t outCnt = 0U;
128 for (int32_t i = 0; i < aclOp.numOutputs; ++i) {128 for (int32_t i = 0; i < aclOp.numOutputs; ++i) {
129 if (outCnt >= filterOutNum) {129 if (outCnt >= filterOutNum) {
@@ -142,7 +142,7 @@ static void RefreshOutput(
142 }142 }
143 } else {143 } else {
144 ACL_LOG_DEBUG(144 ACL_LOG_DEBUG(
145- "exeucteType is neither ACL_OP_EXECUTE_V2 nor ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE,"145+ "executeType is neither ACL_OP_EXECUTE_V2 nor ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE,"
146 "No need to refresh output!");146 "No need to refresh output!");
147 }147 }
148}148}
@@ -317,7 +317,7 @@ aclError OpExecutor::DoExecuteAsync(ge::DynamicSingleOp *const singleOp, const A
317 317 
318 if (aclOp.exeucteType == ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE) {318 if (aclOp.exeucteType == ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE) {
319 ACL_LOG_INFO(319 ACL_LOG_INFO(
320- "aclOp exeucte type is ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE,"320+ "aclOp execute type is ACL_OP_EXECUTE_REFRESH_OUTPUT_ORI_SHAPE,"
321 "refresh origin shape of output");321 "refresh origin shape of output");
322 for (size_t i = 0U; i < outputDesc->size(); ++i) {322 for (size_t i = 0U; i < outputDesc->size(); ++i) {
323 const std::vector<int64_t> outputOriShape = (*outputDesc)[i].GetOriginShape().GetDims();323 const std::vector<int64_t> outputOriShape = (*outputDesc)[i].GetOriginShape().GetDims();
@@ -490,7 +490,7 @@ aclError OpExecutor::DoExecuteRT1(const AclOp &aclOp, const aclDataBuffer *const
490 ret = LoadDynamicSingleOp(*opModelPtr, stream, &dynamicSingleOp);490 ret = LoadDynamicSingleOp(*opModelPtr, stream, &dynamicSingleOp);
491 if ((ret != ACL_SUCCESS) || (dynamicSingleOp == nullptr)) {491 if ((ret != ACL_SUCCESS) || (dynamicSingleOp == nullptr)) {
492 ACL_LOG_INNER_ERROR(492 ACL_LOG_INNER_ERROR(
493- "[Load][Op]LoadDynamicSingleOp failed or dynamicSingleOp is nullptr"493+ "[Load][Op]LoadDynamicSingleOp failed or dynamicSingleOp is nullptr, "
494 "ret = %d",494 "ret = %d",
495 ret);495 ret);
496 return ret;496 return ret;
@@ -501,7 +501,7 @@ aclError OpExecutor::DoExecuteRT1(const AclOp &aclOp, const aclDataBuffer *const
501 ret = LoadSingleOp(*opModelPtr, stream, &singleOp);501 ret = LoadSingleOp(*opModelPtr, stream, &singleOp);
502 if ((ret != ACL_SUCCESS) || (singleOp == nullptr)) {502 if ((ret != ACL_SUCCESS) || (singleOp == nullptr)) {
503 ACL_LOG_INNER_ERROR(503 ACL_LOG_INNER_ERROR(
504- "[Load][Op]LoadSingleOp failed or singleOp is nullptr"504+ "[Load][Op]LoadSingleOp failed or singleOp is nullptr, "
505 "ret = %d",505 "ret = %d",
506 ret);506 ret);
507 return ret;507 return ret;
@@ -515,7 +515,7 @@ aclError OpExecutor::DoExecuteRT1(const AclOp &aclOp, const aclDataBuffer *const
515aclError OpExecutor::ExecuteAsync(OpHandle &opHandle, const aclDataBuffer *const inputs[],515aclError OpExecutor::ExecuteAsync(OpHandle &opHandle, const aclDataBuffer *const inputs[],
516 aclDataBuffer *const outputs[], const aclrtStream stream) {516 aclDataBuffer *const outputs[], const aclrtStream stream) {
517 if (opHandle.kernelDesc != nullptr) {517 if (opHandle.kernelDesc != nullptr) {
518- ACL_LOG_INFO("Get keneldesc is not null");518+ ACL_LOG_INFO("Get kernel desc is not null");
519 aclrtContext context = nullptr;519 aclrtContext context = nullptr;
520 ACL_REQUIRES_OK(aclrtGetCurrentContext(&context));520 ACL_REQUIRES_OK(aclrtGetCurrentContext(&context));
521 auto *const streamExecutor = Executors::GetOrCreate(context, stream);521 auto *const streamExecutor = Executors::GetOrCreate(context, stream);
@@ -567,7 +567,7 @@ aclError OpExecutor::ExecuteAsync(OpHandle &opHandle, const aclDataBuffer *const
567 ret = LoadSingleOp(opHandle.opModel, stream, &singleOp);567 ret = LoadSingleOp(opHandle.opModel, stream, &singleOp);
568 if ((ret != ACL_SUCCESS) || (singleOp == nullptr)) {568 if ((ret != ACL_SUCCESS) || (singleOp == nullptr)) {
569 ACL_LOG_INNER_ERROR(569 ACL_LOG_INNER_ERROR(
570- "[Load][Op]LoadSingleOp failed or singleOp is nullptr"570+ "[Load][Op]LoadSingleOp failed or singleOp is nullptr, "
571 "ret = %d",571 "ret = %d",
572 ret);572 ret);
573 return ret;573 return ret;
@@ -99,7 +99,7 @@ aclError OpModelParser::ParseModelContent(const OpModel &opModel, uint64_t &mode
99 modelSize = (file_header->model_length == 0UL) ? file_header->length : file_header->model_length;99 modelSize = (file_header->model_length == 0UL) ? file_header->length : file_header->model_length;
100 if ((modelSize + sizeof(ge::ModelFileHeader)) != opModel.size) {100 if ((modelSize + sizeof(ge::ModelFileHeader)) != opModel.size) {
101 ACL_LOG_INNER_ERROR(101 ACL_LOG_INNER_ERROR(
102- "[Check][Length]invalid model. header size = %zu, model size = %lu,"102+ "[Check][Length]invalid model. header size = %zu, model size = %lu, "
103 "file size = %u",103 "file size = %u",
104 sizeof(ge::ModelFileHeader), modelSize, opModel.size);104 sizeof(ge::ModelFileHeader), modelSize, opModel.size);
105 return ACL_ERROR_PARSE_MODEL;105 return ACL_ERROR_PARSE_MODEL;
@@ -195,7 +195,7 @@ static aclError UpdateTensorAttrs(std::vector<aclTensorDesc> &tensorDescs,
195 tensorDescs[idx].UpdateTensorShape(shapeByAttr);195 tensorDescs[idx].UpdateTensorShape(shapeByAttr);
196 tensorDescs[idx].UpdateTensorShapeRange(rangesByAttr);196 tensorDescs[idx].UpdateTensorShapeRange(rangesByAttr);
197 if ((ge::AttrUtils::HasAttr(tensorAttr, "value_range")) && (ge::AttrUtils::HasAttr(tensorAttr, "value"))) {197 if ((ge::AttrUtils::HasAttr(tensorAttr, "value_range")) && (ge::AttrUtils::HasAttr(tensorAttr, "value"))) {
198- ACL_LOG_INNER_ERROR("value and value_range cannot be existed at the same time");198+ ACL_LOG_INNER_ERROR("value and value_range cannot exist at the same time");
199 return ACL_ERROR_PARSE_MODEL;199 return ACL_ERROR_PARSE_MODEL;
200 }200 }
201 if (ge::AttrUtils::HasAttr(tensorAttr, "value_range")) {201 if (ge::AttrUtils::HasAttr(tensorAttr, "value_range")) {
@@ -385,7 +385,7 @@ aclError OpModelParser::ParseGeTensorDesc(std::vector<ge::GeTensorDesc> &geTenso
385 }385 }
386 bool isConst = false;386 bool isConst = false;
387 if (!ge::AttrUtils::GetBool(tensorDesc, ge::CONST_ATTR_NAME_INPUT, isConst)) {387 if (!ge::AttrUtils::GetBool(tensorDesc, ge::CONST_ATTR_NAME_INPUT, isConst)) {
388- ACL_LOG_INFO("the tensor maybe not const tensor, tensor id:[%zu]", tensorNum++);388+ ACL_LOG_INFO("the tensor may not be a const tensor, tensor id:[%zu]", tensorNum++);
389 continue;389 continue;
390 }390 }
391 if (isConst) {391 if (isConst) {
@@ -51,7 +51,7 @@ void ShapeRangeUtils::SetShapeRange(const int32_t tensorNum, const aclTensorDesc
51 // Complete the shape range for static tensor51 // Complete the shape range for static tensor
52 if (tensorDesc[tensorIndex]->shapeRange.empty()) {52 if (tensorDesc[tensorIndex]->shapeRange.empty()) {
53 if ((tensorDesc[tensorIndex]->dims.size() > 0U) && (tensorDesc[tensorIndex]->dims[0U] == UNKNOW_RANK)) {53 if ((tensorDesc[tensorIndex]->dims.size() > 0U) && (tensorDesc[tensorIndex]->dims[0U] == UNKNOW_RANK)) {
54- ACL_LOG_INFO("the %zu tensor dim is unknowrank", tensorIndex);54+ ACL_LOG_INFO("the %zu tensor dim is unknown rank", tensorIndex);
55 } else {55 } else {
56 std::vector<std::pair<int64_t, int64_t>> range;56 std::vector<std::pair<int64_t, int64_t>> range;
57 for (size_t dimIndex = 0U; dimIndex < tensorDesc[tensorIndex]->dims.size(); ++dimIndex) {57 for (size_t dimIndex = 0U; dimIndex < tensorDesc[tensorIndex]->dims.size(); ++dimIndex) {
@@ -95,7 +95,7 @@ static aclError RegisterProfType() {
95 const uint32_t typeId = static_cast<uint32_t>(iter.first);95 const uint32_t typeId = static_cast<uint32_t>(iter.first);
96 const auto ret = MsprofRegTypeInfo(MSPROF_REPORT_ACL_LEVEL, typeId, iter.second.c_str());96 const auto ret = MsprofRegTypeInfo(MSPROF_REPORT_ACL_LEVEL, typeId, iter.second.c_str());
97 if (ret != MSPROF_ERROR_NONE) {97 if (ret != MSPROF_ERROR_NONE) {
98- ACL_LOG_CALL_ERROR("Registered api type [%u] failed = %d", typeId, ret);98+ ACL_LOG_CALL_ERROR("Register api type [%u] failed, ret = %d", typeId, ret);
99 return ACL_ERROR_PROFILING_FAILURE;99 return ACL_ERROR_PROFILING_FAILURE;
100 }100 }
101 }101 }
@@ -14,7 +14,9 @@ import os
14import re14import re
15import sys15import sys
16 16 
17-PATTERN_FUNCTION = re.compile(r"ACL_FUNC_VISIBILITY\s+\n+.+\w+\([^();]*\);|.+\w+\([^();]*\);")17+PATTERN_FUNCTION = re.compile(
18+ r"ACL_FUNC_VISIBILITY\s+\n+.+\w+\([^();]*\);|.+\w+\([^();]*\);"
19+)
18PATTERN_RETURN = re.compile(r"([^ ]+[ *])\w+\([^;]+;")20PATTERN_RETURN = re.compile(r"([^ ]+[ *])\w+\([^;]+;")
19 21 
20RETURN_STATEMENTS = {22RETURN_STATEMENTS = {
@@ -37,7 +39,9 @@ return static_cast<aclError>(ACL_ERROR_COMPILING_STUB_MODE);',
37}39}
38 40 
39 41 
40-def collect_header_files(cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir):42+def collect_header_files(
43+ cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir
44+):
41 """input path,return relevant header files"""45 """input path,return relevant header files"""
42 cblas_headers = []46 cblas_headers = []
43 op_compiler_headers = []47 op_compiler_headers = []
@@ -106,23 +110,29 @@ def implement_function(func):
106 return function_def110 return function_def
107 111 
108 112 
109-def generate_stub_file(cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir):113+def generate_stub_file(
114+ cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir
115+):
110 """input inc_dir and return relevant contents"""116 """input inc_dir and return relevant contents"""
111 (117 (
112 cblas_header_files,118 cblas_header_files,
113 op_compiler_header_files,119 op_compiler_header_files,
114 op_exec_header_files,120 op_exec_header_files,
115 mdl_header_files,121 mdl_header_files,
116- ) = collect_header_files(cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir)122+ ) = collect_header_files(
117- print("header files has been generated")123+ cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir
124+ )
125+ print("header files have been generated")
118 cblas_content = generate_function(cblas_header_files, cblas_inc_dir)126 cblas_content = generate_function(cblas_header_files, cblas_inc_dir)
119- print("cblas_content has been generate")127+ print("cblas_content has been generated")
120- op_compiler_content = generate_function(op_compiler_header_files, op_compiler_inc_dir)128+ op_compiler_content = generate_function(
121- print("op_compiler_content has been generate")129+ op_compiler_header_files, op_compiler_inc_dir
130+ )
131+ print("op_compiler_content has been generated")
122 op_exec_content = generate_function(op_exec_header_files, op_exec_inc_dir)132 op_exec_content = generate_function(op_exec_header_files, op_exec_inc_dir)
123- print("op_exec_content has been generate")133+ print("op_exec_content has been generated")
124 mdl_content = generate_function(mdl_header_files, mdl_inc_dir)134 mdl_content = generate_function(mdl_header_files, mdl_inc_dir)
125- print("mdl_content has been generate")135+ print("mdl_content has been generated")
126 return cblas_content, op_compiler_content, op_exec_content, mdl_content136 return cblas_content, op_compiler_content, op_exec_content, mdl_content
127 137 
128 138 
@@ -138,7 +148,7 @@ def generate_function(header_files, inc_dir):
138 includes.append(include_str)148 includes.append(include_str)
139 149 
140 content = includes150 content = includes
141- print("include concent build success")151+ print("include content build success")
142 total = 0152 total = 0
143 content.append("\n")153 content.append("\n")
144 # generate implement154 # generate implement
@@ -152,7 +162,7 @@ def generate_function(header_files, inc_dir):
152 for func in functions:162 for func in functions:
153 content.append("{}\n".format(implement_function(func)))163 content.append("{}\n".format(implement_function(func)))
154 content.append("\n")164 content.append("\n")
155- print("implement concent build success")165+ print("implement content build success")
156 print("total functions number is {}".format(total))166 print("total functions number is {}".format(total))
157 return content167 return content
158 168 
@@ -176,10 +186,14 @@ def gen_code(
176 op_exec_inc_dir += "/"186 op_exec_inc_dir += "/"
177 if not mdl_inc_dir.endswith("/"):187 if not mdl_inc_dir.endswith("/"):
178 mdl_inc_dir += "/"188 mdl_inc_dir += "/"
179- cblas_content, op_compiler_content, op_exec_content, mdl_content = generate_stub_file(189+ cblas_content, op_compiler_content, op_exec_content, mdl_content = (
180- cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir190+ generate_stub_file(
191+ cblas_inc_dir, op_compiler_inc_dir, op_exec_inc_dir, mdl_inc_dir
192+ )
193+ )
194+ print(
195+ "cblas_content, op_compiler_content, op_exec_content, mdl_content have been generated"
181 )196 )
182- print("cblas_content, op_compiler_content, op_exec_content, mdl_content have been generated")
183 with open(cblas_stub_path, mode="w") as f:197 with open(cblas_stub_path, mode="w") as f:
184 f.writelines(cblas_content)198 f.writelines(cblas_content)
185 with open(op_compiler_stub_path, mode="w") as f:199 with open(op_compiler_stub_path, mode="w") as f:
@@ -14,7 +14,9 @@ import os
14import re14import re
15import sys15import sys
16 16 
17-PATTERN_FUNCTION = re.compile(r"ACL_FUNC_VISIBILITY\s+\n+.+\w+\([^();]*\);|.+\w+\([^();]*\);")17+PATTERN_FUNCTION = re.compile(
18+ r"ACL_FUNC_VISIBILITY\s+\n+.+\w+\([^();]*\);|.+\w+\([^();]*\);"
19+)
18PATTERN_RETURN = re.compile(r"([^ ]+[ *])\w+\([^;]+;")20PATTERN_RETURN = re.compile(r"([^ ]+[ *])\w+\([^;]+;")
19 21 
20RETURN_STATEMENTS = {22RETURN_STATEMENTS = {
@@ -87,12 +89,14 @@ def generate_function(header_files):
87 header_basename = os.path.basename(header)89 header_basename = os.path.basename(header)
88 content.append("// stub for {}\n".format(header_basename))90 content.append("// stub for {}\n".format(header_basename))
89 functions = collect_functions(header)91 functions = collect_functions(header)
90- print("inc file:{}, functions numbers:{}".format(header_basename, len(functions)))92+ print(
93+ "inc file:{}, functions numbers:{}".format(header_basename, len(functions))
94+ )
91 total += len(functions)95 total += len(functions)
92 for func in functions:96 for func in functions:
93 content.append("{}\n".format(implement_function(func)))97 content.append("{}\n".format(implement_function(func)))
94 content.append("\n")98 content.append("\n")
95- print("implement concent build success")99+ print("implement content build success")
96 print("total functions number is {}".format(total))100 print("total functions number is {}".format(total))
97 return content101 return content
98 102 
@@ -113,9 +113,9 @@ aclError CheckDataBufferArry(const int32_t size, const aclDataBuffer *const *con
113 for (int32_t idx = 0; idx < size; ++idx) {113 for (int32_t idx = 0; idx < size; ++idx) {
114 ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(arr[idx]);114 ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(arr[idx]);
115 if ((arr[idx]->data == nullptr) && (arr[idx]->length > 0U)) {115 if ((arr[idx]->data == nullptr) && (arr[idx]->length > 0U)) {
116- ACL_LOG_ERROR("[Check][data]data of element at index[%d] while size is larger than 0", idx);116+ ACL_LOG_ERROR("[Check][data]data of element at index[%d] is null while size is larger than 0", idx);
117 const std::string errMsg = acl::AclErrorLogManager::FormatStr(117 const std::string errMsg = acl::AclErrorLogManager::FormatStr(
118- "data of element at index[%d]"118+ "data of element at index[%d] is null "
119 "while size is larger than 0",119 "while size is larger than 0",
120 idx);120 idx);
121 acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_MSG,121 acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_MSG,
@@ -592,17 +592,17 @@ static bool IsSameValue(const std::map<AttrRangeType, ge::GeAttrValue> &value1,
592bool IsSameValueRange(const std::map<AttrRangeType, ge::GeAttrValue> &valueRange1,592bool IsSameValueRange(const std::map<AttrRangeType, ge::GeAttrValue> &valueRange1,
593 const std::map<AttrRangeType, ge::GeAttrValue> &valueRange2) {593 const std::map<AttrRangeType, ge::GeAttrValue> &valueRange2) {
594 if (valueRange1.size() != valueRange2.size()) {594 if (valueRange1.size() != valueRange2.size()) {
595- ACL_LOG_INFO("IsSameValueRange return fasle, size of valueRange1 is %zu, ize of valueRange2 is %zu",595+ ACL_LOG_INFO("IsSameValueRange return false, size of valueRange1 is %zu, size of valueRange2 is %zu",
596- valueRange1.size(), valueRange1.size());596+ valueRange1.size(), valueRange2.size());
597 return false;597 return false;
598 }598 }
599 599 
600 if (!IsSameValue(valueRange1, valueRange2)) {600 if (!IsSameValue(valueRange1, valueRange2)) {
601- ACL_LOG_INFO("Value of valueRange1 mismatch value of valueRange1");601+ ACL_LOG_INFO("Value of valueRange1 mismatch value of valueRange2");
602 return false;602 return false;
603 }603 }
604 if (!IsSameRange(valueRange1, valueRange2)) {604 if (!IsSameRange(valueRange1, valueRange2)) {
605- ACL_LOG_INFO("Range of valueRange1 mismatch range of valueRange1");605+ ACL_LOG_INFO("Range of valueRange1 mismatch range of valueRange2");
606 return false;606 return false;
607 }607 }
608 return true;608 return true;
@@ -698,7 +698,7 @@ bool SaveConstToAttr(OpModelDef &modelDef) {
698 std::vector<std::string> constStr;698 std::vector<std::string> constStr;
699 bool ret = ConstToAttr(modelDef.inputDescArr, constStr);699 bool ret = ConstToAttr(modelDef.inputDescArr, constStr);
700 if (!ret) {700 if (!ret) {
701- ACL_LOG_INNER_ERROR("[Check][InputTenspr]inputTenspr get const dataLen failed");701+ ACL_LOG_INNER_ERROR("[Check][InputTensor]inputTensor get const dataLen failed");
702 return false;702 return false;
703 }703 }
704 ret = ConstToAttr(modelDef.outputDescArr, constStr);704 ret = ConstToAttr(modelDef.outputDescArr, constStr);
@@ -738,7 +738,7 @@ bool SaveConstToAttr(const AclOp &opDesc, aclopAttr *const opAttr) {
738 std::vector<std::string> constStr;738 std::vector<std::string> constStr;
739 bool ret = ConstToAttr(opDesc.numInputs, opDesc.inputDesc, constStr);739 bool ret = ConstToAttr(opDesc.numInputs, opDesc.inputDesc, constStr);
740 if (!ret) {740 if (!ret) {
741- ACL_LOG_INNER_ERROR("[Check][InputTenspr]inputTenspr get const dataLen failed");741+ ACL_LOG_INNER_ERROR("[Check][InputTensor]inputTensor get const dataLen failed");
742 return false;742 return false;
743 }743 }
744 ret = ConstToAttr(opDesc.numOutputs, opDesc.outputDesc, constStr);744 ret = ConstToAttr(opDesc.numOutputs, opDesc.outputDesc, constStr);
@@ -239,7 +239,7 @@ static aclError GetTensorDescNameToDims(const aclmdlDesc *modelDesc, char *realN
239 if (ret != EOK) {239 if (ret != EOK) {
240 return ACL_ERROR_FAILURE;240 return ACL_ERROR_FAILURE;
241 }241 }
242- ACL_LOG_INFO("RealName is over than %d, use convertName=%s", ACL_MAX_TENSOR_NAME_LEN, dims->name);242+ ACL_LOG_INFO("RealName length exceeds %d, use convertName=%s", ACL_MAX_TENSOR_NAME_LEN, dims->name);
243 if (IsConvertTensorNameLegal(modelDesc, dims->name)) {243 if (IsConvertTensorNameLegal(modelDesc, dims->name)) {
244 return ACL_SUCCESS; // dims->name is convertName244 return ACL_SUCCESS; // dims->name is convertName
245 }245 }
@@ -1676,7 +1676,7 @@ Status GenerateModelBySingleGraph(GeGenerator &ge_generator, const std::string &
1676 return FAILED;1676 return FAILED;
1677 }1677 }
1678 if (SetOutputNodeInfo(graph, FLAGS_output_type) != SUCCESS) {1678 if (SetOutputNodeInfo(graph, FLAGS_output_type) != SUCCESS) {
1679- DOMI_LOGE("Set output node info fail.");1679+ DOMI_LOGE("Set output node info failed.");
1680 return FAILED;1680 return FAILED;
1681 }1681 }
1682 }1682 }
@@ -2234,7 +2234,7 @@ Status CheckRet(Status ret) {
2234 << " --help\' for more information" << std::endl;2234 << " --help\' for more information" << std::endl;
2235 int32_t result = OutputErrMessageToStdout();2235 int32_t result = OutputErrMessageToStdout();
2236 if (result != 0) {2236 if (result != 0) {
2237- DOMI_LOGE("ErrorManager outputErrMessage fail !");2237+ DOMI_LOGE("ErrorManager outputErrMessage failed!");
2238 }2238 }
2239 GELOGI("Current available mem is [%lu kB]", GetMemInfo("MemAvailable"));2239 GELOGI("Current available mem is [%lu kB]", GetMemInfo("MemAvailable"));
2240 return ret;2240 return ret;
@@ -298,7 +298,7 @@ bool CheckDigitStr(std::string &str) {
298domi::Status StringToInt(std::string &str, int32_t &value) {298domi::Status StringToInt(std::string &str, int32_t &value) {
299 try {299 try {
300 if (!CheckDigitStr(str)) {300 if (!CheckDigitStr(str)) {
301- GELOGE(PARAM_INVALID, "[Check][Param]Invalid of digit std::string: %s ", str.c_str());301+ GELOGE(PARAM_INVALID, "[Check][Param]Invalid digit string: %s ", str.c_str());
302 REPORT_PREDEFINED_ERR_MSG(302 REPORT_PREDEFINED_ERR_MSG(
303 "E10001", std::vector<const char *>({"parameter", "value", "reason"}),303 "E10001", std::vector<const char *>({"parameter", "value", "reason"}),
304 std::vector<const char *>({"--output_type", str.c_str(), "The value is not a positive integer."}));304 std::vector<const char *>({"--output_type", str.c_str(), "The value is not a positive integer."}));
@@ -306,12 +306,12 @@ domi::Status StringToInt(std::string &str, int32_t &value) {
306 }306 }
307 value = stoi(str);307 value = stoi(str);
308 } catch (std::invalid_argument &) {308 } catch (std::invalid_argument &) {
309- GELOGE(PARAM_INVALID, "[Check][Param]Invalid of digit std::string: %s, catch invalid_argument.", str.c_str());309+ GELOGE(PARAM_INVALID, "[Check][Param]Invalid digit string: %s, caught invalid_argument.", str.c_str());
310 REPORT_PREDEFINED_ERR_MSG("E10014", std::vector<const char *>({"parameter", "value"}),310 REPORT_PREDEFINED_ERR_MSG("E10014", std::vector<const char *>({"parameter", "value"}),
311 std::vector<const char *>({"--output_type", str.c_str()}));311 std::vector<const char *>({"--output_type", str.c_str()}));
312 return PARAM_INVALID;312 return PARAM_INVALID;
313 } catch (std::out_of_range &) {313 } catch (std::out_of_range &) {
314- GELOGE(PARAM_INVALID, "[Check][Param]Invalid of digit std::string: %s, catch out_of_range.", str.c_str());314+ GELOGE(PARAM_INVALID, "[Check][Param]Invalid digit string: %s, caught out_of_range.", str.c_str());
315 REPORT_PREDEFINED_ERR_MSG("E10013", std::vector<const char *>({"parameter", "value"}),315 REPORT_PREDEFINED_ERR_MSG("E10013", std::vector<const char *>({"parameter", "value"}),
316 std::vector<const char *>({"--output_type", str.c_str()}));316 std::vector<const char *>({"--output_type", str.c_str()}));
317 return PARAM_INVALID;317 return PARAM_INVALID;
@@ -700,12 +700,12 @@ domi::Status ParseOutNodes(const std::string &out_nodes) {
700 }700 }
701 }701 }
702 } catch (std::invalid_argument &) {702 } catch (std::invalid_argument &) {
703- GELOGE(PARAM_INVALID, "[Parse][Param]Invalid of out_nodes: %s ", out_nodes.c_str());703+ GELOGE(PARAM_INVALID, "[Parse][Param]Invalid out_nodes: %s ", out_nodes.c_str());
704 REPORT_PREDEFINED_ERR_MSG("E10014", std::vector<const char *>({"parameter", "value"}),704 REPORT_PREDEFINED_ERR_MSG("E10014", std::vector<const char *>({"parameter", "value"}),
705 std::vector<const char *>({"--out_nodes", out_nodes.c_str()}));705 std::vector<const char *>({"--out_nodes", out_nodes.c_str()}));
706 return PARAM_INVALID;706 return PARAM_INVALID;
707 } catch (std::out_of_range &) {707 } catch (std::out_of_range &) {
708- GELOGE(PARAM_INVALID, "[Parse][Param]Invalid of out_nodes: %s ", out_nodes.c_str());708+ GELOGE(PARAM_INVALID, "[Parse][Param]Invalid out_nodes: %s ", out_nodes.c_str());
709 REPORT_PREDEFINED_ERR_MSG("E10013", std::vector<const char *>({"parameter", "value"}),709 REPORT_PREDEFINED_ERR_MSG("E10013", std::vector<const char *>({"parameter", "value"}),
710 std::vector<const char *>({"--out_nodes", out_nodes.c_str()}));710 std::vector<const char *>({"--out_nodes", out_nodes.c_str()}));
711 return PARAM_INVALID;711 return PARAM_INVALID;
@@ -32,25 +32,25 @@ c_double = ctypes.c_double
32 32 
33# C结构体定义33# C结构体定义
34class EsCTensorHolder(ctypes.Structure):34class EsCTensorHolder(ctypes.Structure):
35- """C struct EsCTensorHolder"""35+ """C-layer struct EsCTensorHolder"""
36 36 
37 pass37 pass
38 38 
39 39 
40class EsCGraphBuilder(ctypes.Structure):40class EsCGraphBuilder(ctypes.Structure):
41- """C struct EsCGraphBuilder"""41+ """C-layer struct EsCGraphBuilder"""
42 42 
43 pass43 pass
44 44 
45 45 
46class EsCGraph(ctypes.Structure):46class EsCGraph(ctypes.Structure):
47- """C struct EsCGraph"""47+ """C-layer struct EsCGraph"""
48 48 
49 pass49 pass
50 50 
51 51 
52class EsCTensor(ctypes.Structure):52class EsCTensor(ctypes.Structure):
53- """C struct EsCTensor"""53+ """C-layer struct EsCTensor"""
54 54 
55 pass55 pass
56 56 
@@ -150,7 +150,11 @@ def get_generated_lib(lib_name: str = None):
150 target = lib_name or DEFAULT_GENERATED_LIB_NAME150 target = lib_name or DEFAULT_GENERATED_LIB_NAME
151 151 
152 # Return cached default library if available152 # Return cached default library if available
153- if target == DEFAULT_GENERATED_LIB_NAME and _default_lib_available and _default_lib is not None:153+ if (
154+ target == DEFAULT_GENERATED_LIB_NAME
155+ and _default_lib_available
156+ and _default_lib is not None
157+ ):
154 return _default_lib158 return _default_lib
155 159 
156 # Return cached library if already loaded160 # Return cached library if already loaded
@@ -163,7 +167,9 @@ def get_generated_lib(lib_name: str = None):
163 _configure_generated_lib(lib)167 _configure_generated_lib(lib)
164 _lib_cache[target] = lib168 _lib_cache[target] = lib
165 except OSError as exc:169 except OSError as exc:
166- raise RuntimeError(f"Generated library {target} is not available: {exc}") from exc170+ raise RuntimeError(
171+ f"Generated library {target} is not available: {exc}"
172+ ) from exc
167 173 
168 # Update default library reference if loading default lib name174 # Update default library reference if loading default lib name
169 if target == DEFAULT_GENERATED_LIB_NAME:175 if target == DEFAULT_GENERATED_LIB_NAME:
@@ -33,7 +33,7 @@ c_p_to_int = ctypes.POINTER(c_int)
33 33 
34 34 
35class ModelBufferData(ctypes.Structure):35class ModelBufferData(ctypes.Structure):
36- """C struct ModelBufferData"""36+ """C-layer struct ModelBufferData"""
37 37 
38 pass38 pass
39 39 
@@ -11,7 +11,7 @@
11# See LICENSE in the root of the software repository for the full text of the License.11# See LICENSE in the root of the software repository for the full text of the License.
12# -----------------------------------------------------------------------------------------------------------12# -----------------------------------------------------------------------------------------------------------
13 13 
14-"""离线图编译模块"""14+"""Offline graph compilation module."""
15 15 
16__all__ = [16__all__ = [
17 "GraphWithOptions",17 "GraphWithOptions",
@@ -84,7 +84,7 @@ void TBEPluginManager::FindParserUsedSo(const std::string &path, std::vector<std
84 static const uint32_t max_recursive_depth = 20U; // For recursive depth protection84 static const uint32_t max_recursive_depth = 20U; // For recursive depth protection
85 85 
86 if (recursive_depth >= max_recursive_depth) {86 if (recursive_depth >= max_recursive_depth) {
87- GELOGW("Recursive depth is become %u, Please check input!", recursive_depth);87+ GELOGW("Recursive depth has become %u, please check input!", recursive_depth);
88 return;88 return;
89 }89 }
90 90 
@@ -31,7 +31,7 @@ CompiledModelCache::CompiledModelCache(uint32_t user_graph_id, CompileContext &c
31 root_dir_ = root_dir_origin + "/" + kCompiledModelCacheDirName + "/";31 root_dir_ = root_dir_origin + "/" + kCompiledModelCacheDirName + "/";
32 CreateDirectory(root_dir_); // create the cache_dir32 CreateDirectory(root_dir_); // create the cache_dir
33 }33 }
34- GELOGI("Init complied model cache success, user_graph_id[%u].", user_graph_id_);34+ GELOGI("Init compiled model cache success, user_graph_id[%u].", user_graph_id_);
35}35}
36 36 
37Status CompiledModelCache::GetGuardedExecutionPointGraphKey(const GuardedExecutionPoint *gep,37Status CompiledModelCache::GetGuardedExecutionPointGraphKey(const GuardedExecutionPoint *gep,
@@ -41,7 +41,7 @@ Status SetOutputSizeIfNeed(const ComputeGraphPtr &graph) {
41 GE_ASSERT_NOTNULL(netout_node);41 GE_ASSERT_NOTNULL(netout_node);
42 if (graph->GetOutputSize() != netout_node->GetInDataNodesSize()) {42 if (graph->GetOutputSize() != netout_node->GetInDataNodesSize()) {
43 // 此处follow节点上信息43 // 此处follow节点上信息
44- GELOGI("Graph %s output_size[%u] not equal with netoutput[%u] shows in graph, follow netoutput",44+ GELOGI("Graph %s output_size[%u] not equal to netoutput[%u] shows in graph, follow netoutput",
45 graph->GetName().c_str(), graph->GetOutputSize(), netout_node->GetInDataNodesSize());45 graph->GetName().c_str(), graph->GetOutputSize(), netout_node->GetInDataNodesSize());
46 graph->SetOutputSize(netout_node->GetInDataNodesSize());46 graph->SetOutputSize(netout_node->GetInDataNodesSize());
47 }47 }
@@ -293,7 +293,7 @@ Status JitExecutor::LoadGraph(UserGraphExecution &task) {
293 293 
294 auto gep = ep->FindGuarded(*task.external_rt_inputs);294 auto gep = ep->FindGuarded(*task.external_rt_inputs);
295 if (gep == nullptr || !gep->Compiled()) {295 if (gep == nullptr || !gep->Compiled()) {
296- GELOGE(ge::FAILED, "Guarde is not exist or Compiled EP[%ld], USER_GRAPH[%u]", ep->GetId(), task.user_graph_id);296+ GELOGE(ge::FAILED, "Guard is not exist or Compiled EP[%ld], USER_GRAPH[%u]", ep->GetId(), task.user_graph_id);
297 return FAILED;297 return FAILED;
298 }298 }
299 GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(),299 GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(),
@@ -289,7 +289,7 @@ CompiledGraphSummaryPtr UserGraphControl::GetCompiledGraphSummary() {
289 289 
290 auto gep = ep->FindGuarded(inputs);290 auto gep = ep->FindGuarded(inputs);
291 if (gep == nullptr || !gep->Compiled()) {291 if (gep == nullptr || !gep->Compiled()) {
292- GELOGD("Guarde is not exist or Compiled");292+ GELOGD("Guard is not exist or Compiled");
293 return nullptr;293 return nullptr;
294 }294 }
295 GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(),295 GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(),
@@ -139,7 +139,7 @@ Status ExecutionPointUtil::SaveExecutionPoint(const std::string root_dir, const
139 const std::string sid = std::to_string((*exec_point_ptr).GetId());139 const std::string sid = std::to_string((*exec_point_ptr).GetId());
140 const std::string slice_graph_dir = root_dir + kSlicingHierarchySubDirName + "/" + user_graph_key + "/" + sid + "/";140 const std::string slice_graph_dir = root_dir + kSlicingHierarchySubDirName + "/" + user_graph_key + "/" + sid + "/";
141 GE_CHK_STATUS_RET(CreateDirectory(slice_graph_dir));141 GE_CHK_STATUS_RET(CreateDirectory(slice_graph_dir));
142- GELOGI("Generated directory: %s for user graph[%u].", slice_graph_dir.c_str());142+ GELOGI("Generated directory: %s for user graph.", slice_graph_dir.c_str());
143 143 
144 // save slice_graph.pb144 // save slice_graph.pb
145 ComputeGraphPtr slice_graph_ptr = (*exec_point_ptr).GetSlicedGraph();145 ComputeGraphPtr slice_graph_ptr = (*exec_point_ptr).GetSlicedGraph();
@@ -72,7 +72,7 @@ void TracingRecorder::Initialize() {
72 finalize_event_handle = AtraceEventCreate(event_name.c_str());72 finalize_event_handle = AtraceEventCreate(event_name.c_str());
73 finalize_event_handles_.emplace_back(finalize_event_handle);73 finalize_event_handles_.emplace_back(finalize_event_handle);
74 event_bind_num_ = 1;74 event_bind_num_ = 1;
75- GELOGI("Create event handle[%s] to ", event_name.c_str());75+ GELOGI("Create event handle[%s] to tracing module", event_name.c_str());
76 } else {76 } else {
77 event_name.append(std::to_string(finalize_event_handles_.size()));77 event_name.append(std::to_string(finalize_event_handles_.size()));
78 }78 }
@@ -90,7 +90,7 @@ void TracingRecorder::Initialize() {
90void TracingRecorder::SubmitTraceMsgs(const TracingRecord *tracing_record) {90void TracingRecorder::SubmitTraceMsgs(const TracingRecord *tracing_record) {
91 AtracingReporter reporter(handles_.back(), tracing_record);91 AtracingReporter reporter(handles_.back(), tracing_record);
92 if (reporter.Report() != SUCCESS) {92 if (reporter.Report() != SUCCESS) {
93- GELOGW("Report failed of module[%s] for record[%s].", GetHandleName().c_str(), tracing_record->Debug().c_str());93+ GELOGW("Report failed for module[%s] with record[%s].", GetHandleName().c_str(), tracing_record->Debug().c_str());
94 }94 }
95}95}
96 96 
@@ -51,7 +51,7 @@ TracingRecorderManager::TracingRecorderManager() {
51}51}
52 52 
53TracingRecorder *TracingRecorderManager::GetTracingRecorder(TracingModule module) const {53TracingRecorder *TracingRecorderManager::GetTracingRecorder(TracingModule module) const {
54- GE_ASSERT_TRUE(static_cast<size_t>(module) <= tracing_recorders_.size(), "Module [%zu] should less than %zu",54+ GE_ASSERT_TRUE(static_cast<size_t>(module) <= tracing_recorders_.size(), "Module [%zu] should be less than %zu",
55 static_cast<size_t>(module), tracing_recorders_.size());55 static_cast<size_t>(module), tracing_recorders_.size());
56 return tracing_recorders_[static_cast<int32_t>(module)].get();56 return tracing_recorders_[static_cast<int32_t>(module)].get();
57}57}
@@ -82,7 +82,7 @@ static std::string EncodeToBase64(const std::string &raw_data) {
82#pragma GCC diagnostic ignored "-Wunused-function"82#pragma GCC diagnostic ignored "-Wunused-function"
83static Status DecodeFromBase64(const std::string &base64_data, std::string &decode_data) {83static Status DecodeFromBase64(const std::string &base64_data, std::string &decode_data) {
84 if (base64_data.size() % kFourByteOneGroup != 0) {84 if (base64_data.size() % kFourByteOneGroup != 0) {
85- GELOGE(PARAM_INVALID, "base64 data size must can be divided by 4, but given data size is %zu", base64_data.size());85+ GELOGE(PARAM_INVALID, "base64 data size must be divisible by 4, but given data size is %zu", base64_data.size());
86 return PARAM_INVALID;86 return PARAM_INVALID;
87 }87 }
88 decode_data.clear();88 decode_data.clear();
@@ -120,7 +120,7 @@ int32_t MemoryDumper::OpenFile(const std::string &filename) {
120 } if (mmRealPath(prefix_path.c_str(), &tmp_path[0], MMPA_MAX_PATH) != EN_OK) {120 } if (mmRealPath(prefix_path.c_str(), &tmp_path[0], MMPA_MAX_PATH) != EN_OK) {
121 char_t err_buf[kMaxErrorStringLength + 1U] = {};121 char_t err_buf[kMaxErrorStringLength + 1U] = {};
122 const auto err_msg = mmGetErrorFormatMessage(mmGetErrorCode(), &err_buf[0], kMaxErrorStringLength);122 const auto err_msg = mmGetErrorFormatMessage(mmGetErrorCode(), &err_buf[0], kMaxErrorStringLength);
123- GELOGE(ge::FAILED, "Dir %s does not exit, errmsg:%s.", prefix_path.c_str(), err_msg);123+ GELOGE(ge::FAILED, "Dir %s does not exist, errmsg:%s.", prefix_path.c_str(), err_msg);
124 return kInvalidFd;124 return kInvalidFd;
125 } real_path = std::string(tmp_path) + last_path;)125 } real_path = std::string(tmp_path) + last_path;)
126 GE_IF_BOOL_EXEC((path_split_pos == -1) || (path_split_pos == 0),126 GE_IF_BOOL_EXEC((path_split_pos == -1) || (path_split_pos == 0),
@@ -130,7 +130,7 @@ int32_t MemoryDumper::OpenFile(const std::string &filename) {
130 }130 }
131 131 
132 GE_IF_BOOL_EXEC(mmRealPath(filename.c_str(), &tmp_path[0], MMPA_MAX_PATH) != EN_OK,132 GE_IF_BOOL_EXEC(mmRealPath(filename.c_str(), &tmp_path[0], MMPA_MAX_PATH) != EN_OK,
133- GELOGI("File %s does not exit, it will be created.", filename.c_str()));133+ GELOGI("File %s does not exist, it will be created.", filename.c_str()));
134 real_path = std::string(tmp_path));134 real_path = std::string(tmp_path));
135 135 
136 // Open file, only the current user can read and write, to avoid malicious application access136 // Open file, only the current user can read and write, to avoid malicious application access
@@ -613,13 +613,13 @@ void ExceptionDumper::LogExceptionTvmOpInfo(const OpDescInfo &op_desc_info) cons
613 LogExceptionArgs(op_desc_info);613 LogExceptionArgs(op_desc_info);
614 ge::char_t curr_path[MMPA_MAX_PATH] = {};614 ge::char_t curr_path[MMPA_MAX_PATH] = {};
615 if (mmGetCwd(&curr_path[0], MMPA_MAX_PATH) != EN_OK) {615 if (mmGetCwd(&curr_path[0], MMPA_MAX_PATH) != EN_OK) {
616- GELOGW("get current path failed when do aicerror info record");616+ GELOGW("get current path failed when recording aicerror info");
617 return;617 return;
618 }618 }
619 619 
620 ge::char_t real_path[MMPA_MAX_PATH] = {};620 ge::char_t real_path[MMPA_MAX_PATH] = {};
621 if (mmRealPath(op_desc_info.op_file_path.c_str(), &real_path[0], MMPA_MAX_PATH) != EN_OK) {621 if (mmRealPath(op_desc_info.op_file_path.c_str(), &real_path[0], MMPA_MAX_PATH) != EN_OK) {
622- GELOGW("real path for %s failed when do aicerror info record", op_desc_info.op_file_path.c_str());622+ GELOGW("real path for %s failed when recording aicerror info", op_desc_info.op_file_path.c_str());
623 return;623 return;
624 }624 }
625 const std::string file_prefix = op_desc_info.dev_func.substr(0U, op_desc_info.dev_func.rfind("__"));625 const std::string file_prefix = op_desc_info.dev_func.substr(0U, op_desc_info.dev_func.rfind("__"));
@@ -733,7 +733,7 @@ Status FileConstantUtils::ConvertConstToFileConst(const NodePtr &node) {
733 (void)AttrUtils::SetDataType(const_op, kAttrDtype, output_desc.GetDataType());733 (void)AttrUtils::SetDataType(const_op, kAttrDtype, output_desc.GetDataType());
734 (void)AttrUtils::SetListInt(const_op, kAttrShape, output_desc.GetShape().GetDims());734 (void)AttrUtils::SetListInt(const_op, kAttrShape, output_desc.GetShape().GetDims());
735 (void)AttrUtils::SetListInt(const_op, "original_shape", output_desc.GetOriginShape().GetDims());735 (void)AttrUtils::SetListInt(const_op, "original_shape", output_desc.GetOriginShape().GetDims());
736- GELOGI("Convert node:%s from const to file constant success.", node->GetName().c_str());736+ GELOGI("Convert node:%s from const to file constant successfully.", node->GetName().c_str());
737 return SUCCESS;737 return SUCCESS;
738}738}
739 739 
@@ -57,7 +57,8 @@ std::size_t CompatibleInfoV2::GetSize() const {
57 57 
58ge::Status CompatibleInfoV2::GetCompatibleInfo(ge::BaseBuffer &buffer) const {58ge::Status CompatibleInfoV2::GetCompatibleInfo(ge::BaseBuffer &buffer) const {
59 constexpr size_t size = sizeof(CompatibleSerialV2);59 constexpr size_t size = sizeof(CompatibleSerialV2);
60- GE_ASSERT_TRUE(buffer.GetSize() >= size, "[Mobile] buffer length = %zu, is not need = %zu", buffer.GetSize(), size);60+ GE_ASSERT_TRUE(buffer.GetSize() >= size, "[Mobile] buffer length %zu is less than required size %zu",
61+ buffer.GetSize(), size);
61 GE_ASSERT_NOTNULL(buffer.GetData(), "[Mobile] buffer is null.");62 GE_ASSERT_NOTNULL(buffer.GetData(), "[Mobile] buffer is null.");
62 63 
63 CompatibleSerialV2 *head = reinterpret_cast<CompatibleSerialV2 *>(buffer.GetData());64 CompatibleSerialV2 *head = reinterpret_cast<CompatibleSerialV2 *>(buffer.GetData());
@@ -283,7 +283,7 @@ Status CompiledModel::SaveToBuffer(ge::BaseBuffer &buffer, bool save_weights_as_
283 // save weight external283 // save weight external
284 if (save_weights_as_external_data && (weights_list_external != nullptr)) {284 if (save_weights_as_external_data && (weights_list_external != nullptr)) {
285 // only support graph op num == 1285 // only support graph op num == 1
286- GE_ASSERT_TRUE(weights_list_.size() == 1, "[Mobile] weight list num %d is not support(only support 1).",286+ GE_ASSERT_TRUE(weights_list_.size() == 1, "[Mobile] weight list num %zu is not supported (only 1 is supported).",
287 weights_list_.size());287 weights_list_.size());
288 // SubGraph_0.weight288 // SubGraph_0.weight
289 std::string weight_file_name = std::string("SubGraph_0") + std::string(".weight");289 std::string weight_file_name = std::string("SubGraph_0") + std::string(".weight");
@@ -45,7 +45,7 @@ struct Head {
45std::size_t GetModelTaskSize(std::shared_ptr<ge::mobile::proto::ModelTaskDef> model_task) {45std::size_t GetModelTaskSize(std::shared_ptr<ge::mobile::proto::ModelTaskDef> model_task) {
46 std::size_t size = 0;46 std::size_t size = 0;
47 if (model_task == nullptr) {47 if (model_task == nullptr) {
48- GELOGI("[Mobile] model_task == nullptr");48+ GELOGE(ge::FAILED, "[Mobile] model_task == nullptr");
49 return 0;49 return 0;
50 }50 }
51 size += sizeof(Tlv);51 size += sizeof(Tlv);
@@ -41,7 +41,7 @@ ge::mobile::proto::DataType ConvertToMobileDataType(const ge::proto::DataType da
41 };41 };
42 auto it = m.find(data_type);42 auto it = m.find(data_type);
43 if (it == m.end()) {43 if (it == m.end()) {
44- GELOGE(ge::FAILED, "[Mobile] data_type %zu is not support", data_type);44+ GELOGE(ge::FAILED, "[Mobile] data_type %zu is not supported", data_type);
45 return ge::mobile::proto::DataType::DT_UNDEFINED;45 return ge::mobile::proto::DataType::DT_UNDEFINED;
46 }46 }
47 return it->second;47 return it->second;
@@ -69,7 +69,7 @@ ge::mobile::proto::AttrDef_ListValue::ListValueType ConvertToMobileListValueType
69 };69 };
70 auto it = m.find(list_value_type);70 auto it = m.find(list_value_type);
71 if (it == m.end()) {71 if (it == m.end()) {
72- GELOGE(ge::FAILED, "[Mobile] list_value_type %zu is not support", list_value_type);72+ GELOGE(ge::FAILED, "[Mobile] list_value_type %zu is not supported", list_value_type);
73 return MobileAttrDefListValue::VT_LIST_NONE;73 return MobileAttrDefListValue::VT_LIST_NONE;
74 }74 }
75 return it->second;75 return it->second;
@@ -225,7 +225,7 @@ class OmFileSaveHelper {
225 for (uint64_t i = 0; i < partition_size; i++) {225 for (uint64_t i = 0; i < partition_size; i++) {
226 ModelPartition partition = context_.partition_datas[i];226 ModelPartition partition = context_.partition_datas[i];
227 if (mem_offset > UINT32_MAX) {227 if (mem_offset > UINT32_MAX) {
228- GELOGE(ge::FAILED, "[Mobile] mem_offset large than UINT32_MAX failed.");228+ GELOGE(ge::FAILED, "[Mobile] mem_offset is larger than UINT32_MAX");
229 return nullptr;229 return nullptr;
230 }230 }
231 partition_table->partition[i] = {partition.type, static_cast<uint32_t>(mem_offset), partition.size};231 partition_table->partition[i] = {partition.type, static_cast<uint32_t>(mem_offset), partition.size};
@@ -298,7 +298,7 @@ ge::Status SaveCompiledPartion(OmFileSaveHelper &om_file_save_helper, ModelParti
298 buffer_size += compiled_buffers[i].GetSize();298 buffer_size += compiled_buffers[i].GetSize();
299 }299 }
300 GELOGI("[Mobile] save partition type: %d buffer size: %d", static_cast<uint32_t>(type), buffer_size);300 GELOGI("[Mobile] save partition type: %d buffer size: %d", static_cast<uint32_t>(type), buffer_size);
301- GE_ASSERT_TRUE((buffer_size <= UINT32_MAX), "[Mobile] buffer size large than UINT32_MAX failed.");301+ GE_ASSERT_TRUE((buffer_size <= UINT32_MAX), "[Mobile] buffer size is larger than UINT32_MAX");
302 ModelPartition partition;302 ModelPartition partition;
303 partition.data = nullptr;303 partition.data = nullptr;
304 GE_ASSERT_TRUE(buffer_size <= UINT32_MAX, "[Mobile] overflow, failed.");304 GE_ASSERT_TRUE(buffer_size <= UINT32_MAX, "[Mobile] overflow, failed.");
@@ -102,7 +102,7 @@ class DynamicInputsOutputsShapeInfo {
102 } else if (io_type == "o") {102 } else if (io_type == "o") {
103 return dynamic_outputs_shape[group_index];103 return dynamic_outputs_shape[group_index];
104 } else {104 } else {
105- GELOGE(ge::FAILED, "[Mobile] io_type is not support, failed.");105+ GELOGE(ge::FAILED, "[Mobile] io_type is not supported");
106 }106 }
107 return dynamic_shape_empty;107 return dynamic_shape_empty;
108 }108 }
@@ -299,7 +299,8 @@ ge::Status ParseArgsFormat(const std::string &args_format,
299 for (size_t idx = 0; idx < shape_info_size_needed; idx++) {299 for (size_t idx = 0; idx < shape_info_size_needed; idx++) {
300 GELOGI("[Mobile] -> [%d]: %s", idx, sm_with_shape_info[idx].str().c_str());300 GELOGI("[Mobile] -> [%d]: %s", idx, sm_with_shape_info[idx].str().c_str());
301 }301 }
302- GE_ASSERT_TRUE(sm_with_shape_info[shape_info_size_needed - 1UL] != "*", "[Mobile] not support desc*.");302+ GE_ASSERT_TRUE(sm_with_shape_info[shape_info_size_needed - 1UL] != "*",
303+ "[Mobile] desc with '*' is not supported");
303 int32_t group_index = -1;304 int32_t group_index = -1;
304 if (sm_with_shape_info[1] == "i") {305 if (sm_with_shape_info[1] == "i") {
305 group_index = input_group_index++;306 group_index = input_group_index++;
@@ -543,7 +544,7 @@ ge::Status AddKernelBinToManager(const ge::GeModelPtr &ge_model, ge::mobile::Ker
543 GELOGI("[Mobile] node name: %s, kernel name: %s", node_name.c_str(), kernel_name.c_str());544 GELOGI("[Mobile] node name: %s, kernel name: %s", node_name.c_str(), kernel_name.c_str());
544 auto kernel_bin = tbe_kernel_store.FindKernel(kernel_name);545 auto kernel_bin = tbe_kernel_store.FindKernel(kernel_name);
545 if (kernel_bin == nullptr) {546 if (kernel_bin == nullptr) {
546- GELOGI("[Mobile] not kernel bin find.");547+ GELOGI("[Mobile] kernel bin not found.");
547 continue;548 continue;
548 }549 }
549 GELOGI("[Mobile] kernel bin data size: %d", kernel_bin->GetBinDataSize());550 GELOGI("[Mobile] kernel bin data size: %d", kernel_bin->GetBinDataSize());
@@ -561,8 +562,7 @@ ge::Status AddKernelBinToManager(const ge::GeModelPtr &ge_model, ge::mobile::Ker
561 for (int i = 0; i < mobile_model_task_def->task_size(); i++) {562 for (int i = 0; i < mobile_model_task_def->task_size(); i++) {
562 auto *task = mobile_model_task_def->mutable_task(i);563 auto *task = mobile_model_task_def->mutable_task(i);
563 if (task->kernel().stub_func().find(node_name) != std::string::npos) {564 if (task->kernel().stub_func().find(node_name) != std::string::npos) {
564- GELOGI("[Mobile] instead kernel stub func: %s to: %s", task->kernel().stub_func().c_str(),565+ GELOGI("[Mobile] replace kernel stub func %s with %s", task->kernel().stub_func().c_str(), kernel_name.c_str());
565- kernel_name.c_str());
566 task->mutable_kernel()->set_stub_func(kernel_name);566 task->mutable_kernel()->set_stub_func(kernel_name);
567 } else {567 } else {
568 GELOGI("[Mobile] can not find node name: %s in stub_func: %s", node_name.c_str(),568 GELOGI("[Mobile] can not find node name: %s in stub_func: %s", node_name.c_str(),
@@ -673,8 +673,8 @@ Status MobileModelHelper::SaveToOmRootModel(const GeRootModelPtr &ge_root_model,
673 auto &model_root = name_to_ge_model.begin()->second;673 auto &model_root = name_to_ge_model.begin()->second;
674 return SaveToOmModel(model_root, output_file, model, ge_root_model);674 return SaveToOmModel(model_root, output_file, model, ge_root_model);
675 }675 }
676- GELOGE(FAILED, "[Mobile] mobile is not support unknown shape model to om!!!");676+ GELOGE(FAILED, "[Mobile] mobile does not support unknown shape model to om.");
677- REPORT_INNER_ERR_MSG("E19999", "[Mobile] mobile is not support unknown shape model to om!!!");677+ REPORT_INNER_ERR_MSG("E19999", "[Mobile] mobile does not support unknown shape model to om.");
678 return FAILED;678 return FAILED;
679}679}
680 680 
@@ -237,7 +237,7 @@ Status ModelHelper::SaveModelDef(std::shared_ptr<OmFileSaveHelper> &om_file_save
237 }237 }
238 const ModelPtr model_tmp = ge::MakeShared<ge::Model>(ge_model->GetName(), ge_model->GetPlatformVersion());238 const ModelPtr model_tmp = ge::MakeShared<ge::Model>(ge_model->GetName(), ge_model->GetPlatformVersion());
239 if (model_tmp == nullptr) {239 if (model_tmp == nullptr) {
240- GELOGE(FAILED, "[Creat][Model]Failed, Model %s Ptr", ge_model->GetName().c_str());240+ GELOGE(FAILED, "[Create][Model]Failed, Model %s Ptr", ge_model->GetName().c_str());
241 REPORT_INNER_ERR_MSG("E19999", "Create Model %s Ptr failed.", ge_model->GetName().c_str());241 REPORT_INNER_ERR_MSG("E19999", "Create Model %s Ptr failed.", ge_model->GetName().c_str());
242 return FAILED;242 return FAILED;
243 }243 }
@@ -335,7 +335,7 @@ Status ModelHelper::SaveModelTaskDef(std::shared_ptr<OmFileSaveHelper> &om_file_
335 const std::shared_ptr<domi::ModelTaskDef> model_task_def = ge_model->GetModelTaskDefPtr();335 const std::shared_ptr<domi::ModelTaskDef> model_task_def = ge_model->GetModelTaskDefPtr();
336 if (model_task_def == nullptr) {336 if (model_task_def == nullptr) {
337 GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION,337 GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION,
338- "[Creat][ModelTaskDef]Failed, it is nullptr, "338+ "[Create][ModelTaskDef]Failed, it is nullptr, "
339 "model %s",339 "model %s",
340 ge_model->GetName().c_str());340 ge_model->GetName().c_str());
341 REPORT_INNER_ERR_MSG("E19999", "Create model task def failed, it is nullptr, model %s",341 REPORT_INNER_ERR_MSG("E19999", "Create model task def failed, it is nullptr, model %s",
@@ -677,7 +677,7 @@ Status ModelHelper::SaveAllModelPartiton(std::shared_ptr<OmFileSaveHelper> &om_f
677 677 
678 if (SaveModelWeights(om_file_save_helper, ge_model, model_index) != SUCCESS) {678 if (SaveModelWeights(om_file_save_helper, ge_model, model_index) != SUCCESS) {
679 GELOGE(FAILED, "[Save][ModelWeights]Failed, model %s, model index %zu", ge_model->GetName().c_str(), model_index);679 GELOGE(FAILED, "[Save][ModelWeights]Failed, model %s, model index %zu", ge_model->GetName().c_str(), model_index);
680- REPORT_INNER_ERR_MSG("E19999", "ModelHelper save mode weights failed, model %s, model index %zu",680+ REPORT_INNER_ERR_MSG("E19999", "ModelHelper save model weights failed, model %s, model index %zu",
681 ge_model->GetName().c_str(), model_index);681 ge_model->GetName().c_str(), model_index);
682 return FAILED;682 return FAILED;
683 }683 }
@@ -934,7 +934,7 @@ Status ModelHelper::SaveToOmRootModel(const GeRootModelPtr &ge_root_model, const
934 "[Save][ModelHeader]Failed, model name %s", first_ge_model->GetName().c_str());934 "[Save][ModelHeader]Failed, model name %s", first_ge_model->GetName().c_str());
935 935 
936 GE_ASSERT_SUCCESS(om_file_save_helper->SaveModel(output_file_name.c_str(), model, is_offline_ && save_to_file_),936 GE_ASSERT_SUCCESS(om_file_save_helper->SaveModel(output_file_name.c_str(), model, is_offline_ && save_to_file_),
937- "[Save][Model]OmFileSaveHelper save model eturn fail, output_file %s", output_file_name.c_str());937+ "[Save][Model]OmFileSaveHelper save model return fail, output_file %s", output_file_name.c_str());
938 return SUCCESS;938 return SUCCESS;
939}939}
940 940 
@@ -1059,7 +1059,7 @@ Status ModelHelper::SaveBundleModelBufferToMem(const std::vector<ModelBufferData
1059 // save bundle models.1059 // save bundle models.
1060 output_buffer.data.reset(buff_data.release(), std::default_delete<uint8_t[]>());1060 output_buffer.data.reset(buff_data.release(), std::default_delete<uint8_t[]>());
1061 output_buffer.length = total_size;1061 output_buffer.length = total_size;
1062- GELOGI("Gathering bundle model successfully, total size: %[%zu], var_size is %lu", total_size, var_size);1062+ GELOGI("Gathering bundle model successfully, total size: %zu, var_size is %lu", total_size, var_size);
1063 return SUCCESS;1063 return SUCCESS;
1064}1064}
1065 1065 
@@ -1122,7 +1122,7 @@ Status ModelHelper::LoadPartInfoFromModel(const ge::ModelData &model_data, Model
1122 }1122 }
1123 1123 
1124 GE_IF_BOOL_EXEC(is_assign_model_,1124 GE_IF_BOOL_EXEC(is_assign_model_,
1125- GELOGE(ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED, "[Load][RootModel]Model helper ha already loaded!");1125+ GELOGE(ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED, "[Load][RootModel]Model helper has already loaded!");
1126 return ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED);1126 return ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED);
1127 1127 
1128 uint8_t *model_data_addr = nullptr;1128 uint8_t *model_data_addr = nullptr;
@@ -1134,7 +1134,7 @@ Status ModelHelper::LoadPartInfoFromModel(const ge::ModelData &model_data, Model
1134 1134 
1135 OmFileLoadHelper om_load_helper;1135 OmFileLoadHelper om_load_helper;
1136 status = om_load_helper.Init(model_data_addr, model_data_size, file_header_);1136 status = om_load_helper.Init(model_data_addr, model_data_size, file_header_);
1137- GE_IF_BOOL_EXEC(status != SUCCESS, GELOGE(status, "[Init][OmLoeadHelper]Failed"); model_data_addr = nullptr;1137+ GE_IF_BOOL_EXEC(status != SUCCESS, GELOGE(status, "[Init][OmLoadHelper]Failed"); model_data_addr = nullptr;
1138 return status);1138 return status);
1139 // Encrypt model need to del temp model/no encrypt model don`t need to del model1139 // Encrypt model need to del temp model/no encrypt model don`t need to del model
1140 model_data_addr = nullptr;1140 model_data_addr = nullptr;
@@ -48,7 +48,7 @@ Status ModelParserBase::LoadFromFile(const char_t *const model_path, const int32
48 (void)REPORT_PREDEFINED_ERR_MSG("E13015", std::vector<const char *>({"file", "size", "maxsize"}),48 (void)REPORT_PREDEFINED_ERR_MSG("E13015", std::vector<const char *>({"file", "size", "maxsize"}),
49 std::vector<const char *>({model_path, std::to_string(length).c_str(),49 std::vector<const char *>({model_path, std::to_string(length).c_str(),
50 std::to_string(kMaxFileSizeLimit).c_str()}));50 std::to_string(kMaxFileSizeLimit).c_str()}));
51- GELOGE(ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID, "[Check][Param]File [%s] size %lld is out if range (0, %lld].",51+ GELOGE(ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID, "[Check][Param]File [%s] size %lld is out of range (0, %lld].",
52 model_path, length, kMaxFileSizeLimit);52 model_path, length, kMaxFileSizeLimit);
53 return ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID;53 return ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID;
54 }54 }
@@ -204,7 +204,7 @@ static Status GetModelInOutDesc(const uint8_t *const data, const size_t size, co
204 tensor_base_info =204 tensor_base_info =
205 *PtrToPtr<void, const ModelTensorDescBaseInfo>(ValueToPtr(PtrToValue(data) + static_cast<uint64_t>(offset)));205 *PtrToPtr<void, const ModelTensorDescBaseInfo>(ValueToPtr(PtrToValue(data) + static_cast<uint64_t>(offset)));
206 GELOGD(206 GELOGD(
207- "current index is %u, size is %zu, format is %d, dt id %d, name len si %u,"207+ "current index is %u, size is %zu, format is %d, dt id %d, name len is %u,"
208 "dims len is %u, dimsV2 is %u, shape_range is %u.",208 "dims len is %u, dimsV2 is %u, shape_range is %u.",
209 index, tensor_base_info.size, tensor_base_info.format, tensor_base_info.dt, tensor_base_info.name_len,209 index, tensor_base_info.size, tensor_base_info.format, tensor_base_info.dt, tensor_base_info.name_len,
210 tensor_base_info.dims_len, tensor_base_info.dimsV2_len, tensor_base_info.shape_range_len);210 tensor_base_info.dims_len, tensor_base_info.dimsV2_len, tensor_base_info.shape_range_len);
@@ -55,7 +55,7 @@ Status ModelSaver::SaveJsonToFile(const char_t *const file_path, const Json &mod
55 55 
56 std::array<char_t, MMPA_MAX_PATH> file_real_path = {};56 std::array<char_t, MMPA_MAX_PATH> file_real_path = {};
57 GE_IF_BOOL_EXEC(mmRealPath(file_path, &file_real_path[0], MMPA_MAX_PATH) != EN_OK,57 GE_IF_BOOL_EXEC(mmRealPath(file_path, &file_real_path[0], MMPA_MAX_PATH) != EN_OK,
58- GELOGI("File %s does not exit, it will be created.", file_path));58+ GELOGI("File %s does not exist, it will be created.", file_path));
59 59 
60 // Open file60 // Open file
61 constexpr mmMode_t open_mode = static_cast<mmMode_t>(static_cast<uint32_t>(M_IRUSR) | static_cast<uint32_t>(M_IWUSR));61 constexpr mmMode_t open_mode = static_cast<mmMode_t>(static_cast<uint32_t>(M_IRUSR) | static_cast<uint32_t>(M_IWUSR));
@@ -124,7 +124,7 @@ Status PreModelHelper::SaveAllModelPartiton(std::shared_ptr<OmFileSaveHelper> &o
124 model_index);124 model_index);
125 125 
126 GE_ASSERT_SUCCESS(SaveModelWeights(om_file_save_helper, ge_model),126 GE_ASSERT_SUCCESS(SaveModelWeights(om_file_save_helper, ge_model),
127- "[Save][SaveKernelArgs]Failed, model %s, model index %zu", ge_model->GetName().c_str(),127+ "[Save][SaveModelWeights]Failed, model %s, model index %zu", ge_model->GetName().c_str(),
128 model_index);128 model_index);
129 129 
130 GE_ASSERT_SUCCESS(SaveKernelBin(om_file_save_helper, ge_model),130 GE_ASSERT_SUCCESS(SaveKernelBin(om_file_save_helper, ge_model),
@@ -41,7 +41,7 @@ Status WeightManager::TakeoverResources(const std::shared_ptr<AttrHolder> &attr_
41 GE_ASSERT_NOTNULL(weight);41 GE_ASSERT_NOTNULL(weight);
42 WeightResource weight_resource(weight);42 WeightResource weight_resource(weight);
43 GE_ASSERT_TRUE(op_desc_2_weights_.emplace(attr_holder, std::move(weight_resource)).second,43 GE_ASSERT_TRUE(op_desc_2_weights_.emplace(attr_holder, std::move(weight_resource)).second,
44- "Already has resource key is %ld, failed to takeover weigh on %s. Check node with same id in graph.",44+ "Already has resource key is %ld, failed to take over weight on %s. Check node with same id in graph.",
45 op_desc->GetId(), op_desc->GetNamePtr());45 op_desc->GetId(), op_desc->GetNamePtr());
46 GELOGD("Take over weight resource on node %s.", op_desc->GetNamePtr());46 GELOGD("Take over weight resource on node %s.", op_desc->GetNamePtr());
47 return SUCCESS;47 return SUCCESS;
@@ -152,7 +152,7 @@ Status GeModel::GetSessionId(const uint32_t model_id, uint64_t &session_id) cons
152 session_id = it->second;152 session_id = it->second;
153 return SUCCESS;153 return SUCCESS;
154 }154 }
155- GELOGW("No session id were found with model id [%u].", model_id);155+ GELOGW("No session id was found with model id [%u].", model_id);
156 return INTERNAL_ERROR;156 return INTERNAL_ERROR;
157}157}
158} // namespace ge158} // namespace ge
@@ -255,7 +255,7 @@ Status ModelIntroduction::ConstructDynamicInfo() {
255 const Status ret = GetDynamicInfoFromCase(dynamic_type, batch_info);255 const Status ret = GetDynamicInfoFromCase(dynamic_type, batch_info);
256 GE_RETURN_WITH_LOG_IF_ERROR(ret, "Get dynamic info failed.");256 GE_RETURN_WITH_LOG_IF_ERROR(ret, "Get dynamic info failed.");
257 257 
258- GELOGD("dynamic type:%u, bathc_info size is %zu", dynamic_type, batch_info.size());258+ GELOGD("dynamic type:%u, batch_info size is %zu", dynamic_type, batch_info.size());
259 switch (dynamic_type) {259 switch (dynamic_type) {
260 case NOT_DYNAMIC_MODE:260 case NOT_DYNAMIC_MODE:
261 GELOGI("normal case node, no need to gather dynamic info.");261 GELOGI("normal case node, no need to gather dynamic info.");
@@ -26,21 +26,21 @@ bool ModelTensorDesc::Serilize(uint8_t **const addr, size_t &left_size) {
26 left_size -= sizeof(ModelTensorDescBaseInfo);26 left_size -= sizeof(ModelTensorDescBaseInfo);
27 if ((name.data() != nullptr) && (base_info.name_len != 0U)) {27 if ((name.data() != nullptr) && (base_info.name_len != 0U)) {
28 ret = memcpy_s(*addr, left_size, static_cast<const void *>(name.data()), static_cast<size_t>(base_info.name_len));28 ret = memcpy_s(*addr, left_size, static_cast<const void *>(name.data()), static_cast<size_t>(base_info.name_len));
29- GE_ASSERT_EOK(ret, "serilize ModelTensorDesc::name failed");29+ GE_ASSERT_EOK(ret, "serialize ModelTensorDesc::name failed");
30 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.name_len));30 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.name_len));
31 left_size -= base_info.name_len;31 left_size -= base_info.name_len;
32 }32 }
33 33 
34 if ((dims.data() != nullptr) && (base_info.dims_len != 0U)) {34 if ((dims.data() != nullptr) && (base_info.dims_len != 0U)) {
35 ret = memcpy_s(*addr, left_size, static_cast<void *>(dims.data()), static_cast<size_t>(base_info.dims_len));35 ret = memcpy_s(*addr, left_size, static_cast<void *>(dims.data()), static_cast<size_t>(base_info.dims_len));
36- GE_ASSERT_EOK(ret, "serilize ModelTensorDesc::dims failed");36+ GE_ASSERT_EOK(ret, "serialize ModelTensorDesc::dims failed");
37 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.dims_len));37 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.dims_len));
38 left_size -= base_info.dims_len;38 left_size -= base_info.dims_len;
39 }39 }
40 40 
41 if ((dimsV2.data() != nullptr) && (base_info.dimsV2_len != 0U)) {41 if ((dimsV2.data() != nullptr) && (base_info.dimsV2_len != 0U)) {
42 ret = memcpy_s(*addr, left_size, static_cast<void *>(dimsV2.data()), static_cast<size_t>(base_info.dimsV2_len));42 ret = memcpy_s(*addr, left_size, static_cast<void *>(dimsV2.data()), static_cast<size_t>(base_info.dimsV2_len));
43- GE_ASSERT_EOK(ret, "serilize ModelTensorDesc::dimsVe failed");43+ GE_ASSERT_EOK(ret, "serialize ModelTensorDesc::dimsVe failed");
44 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.dimsV2_len));44 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.dimsV2_len));
45 left_size -= base_info.dimsV2_len;45 left_size -= base_info.dimsV2_len;
46 }46 }
@@ -48,7 +48,7 @@ bool ModelTensorDesc::Serilize(uint8_t **const addr, size_t &left_size) {
48 if ((shape_range.data() != nullptr) && (base_info.shape_range_len != 0U)) {48 if ((shape_range.data() != nullptr) && (base_info.shape_range_len != 0U)) {
49 ret = memcpy_s(*addr, left_size, static_cast<void *>(shape_range.data()),49 ret = memcpy_s(*addr, left_size, static_cast<void *>(shape_range.data()),
50 static_cast<size_t>(base_info.shape_range_len));50 static_cast<size_t>(base_info.shape_range_len));
51- GE_ASSERT_EOK(ret, "serilize ModelTensorDesc::dimsVe failed");51+ GE_ASSERT_EOK(ret, "serialize ModelTensorDesc::dimsVe failed");
52 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.shape_range_len));52 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + base_info.shape_range_len));
53 left_size -= base_info.shape_range_len;53 left_size -= base_info.shape_range_len;
54 }54 }
@@ -32,7 +32,7 @@ bool vecIntIntValue::Serilize(uint8_t **const addr, size_t &left_size) {
32 errno_t ret;32 errno_t ret;
33 if ((vec_part_size.data() != nullptr) && (vec_size != 0U)) {33 if ((vec_part_size.data() != nullptr) && (vec_size != 0U)) {
34 ret = memcpy_s(*addr, left_size, static_cast<void *>(vec_part_size.data()), sizeof(uint32_t) * vec_size);34 ret = memcpy_s(*addr, left_size, static_cast<void *>(vec_part_size.data()), sizeof(uint32_t) * vec_size);
35- GE_ASSERT_EOK(ret, "serilize vecIntIntValue::vec_part_size failed");35+ GE_ASSERT_EOK(ret, "serialize vecIntIntValue::vec_part_size failed");
36 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + static_cast<uint64_t>(sizeof(uint32_t) * vec_size)));36 *addr = PtrToPtr<void, uint8_t>(ValueToPtr(PtrToValue(*addr) + static_cast<uint64_t>(sizeof(uint32_t) * vec_size)));
37 left_size -= sizeof(uint32_t) * vec_size;37 left_size -= sizeof(uint32_t) * vec_size;
38 }38 }
@@ -40,7 +40,7 @@ bool vecIntIntValue::Serilize(uint8_t **const addr, size_t &left_size) {
40 for (size_t i = 0; i < vec_size; ++i) {40 for (size_t i = 0; i < vec_size; ++i) {
41 if ((value[i].data() != nullptr) && (vec_part_size[i] != 0U)) {41 if ((value[i].data() != nullptr) && (vec_part_size[i] != 0U)) {
42 ret = memcpy_s(*addr, left_size, static_cast<void *>(value[i].data()), sizeof(int64_t) * vec_part_size[i]);42 ret = memcpy_s(*addr, left_size, static_cast<void *>(value[i].data()), sizeof(int64_t) * vec_part_size[i]);
43- GE_ASSERT_EOK(ret, "serilize vecIntIntValue::value failed");43+ GE_ASSERT_EOK(ret, "serialize vecIntIntValue::value failed");
44 *addr = PtrToPtr<void, uint8_t>(44 *addr = PtrToPtr<void, uint8_t>(
45 ValueToPtr(PtrToValue(*addr) + static_cast<uint64_t>(sizeof(int64_t) * vec_part_size[i])));45 ValueToPtr(PtrToValue(*addr) + static_cast<uint64_t>(sizeof(int64_t) * vec_part_size[i])));
46 left_size -= sizeof(int64_t) * vec_part_size[i];46 left_size -= sizeof(int64_t) * vec_part_size[i];
@@ -669,7 +669,7 @@ static ge::graphStatus AutofuseNodeCreateInput(const std::vector<ge::NodePtr> &d
669 int64_t index = -1;669 int64_t index = -1;
670 (void)ge::AttrUtils::GetInt(data_node->GetOpDesc(), ge::ATTR_NAME_INDEX, index);670 (void)ge::AttrUtils::GetInt(data_node->GetOpDesc(), ge::ATTR_NAME_INDEX, index);
671 GE_ASSERT_TRUE((index >= 0) && (index < static_cast<int64_t>(inputs_holder.size())),671 GE_ASSERT_TRUE((index >= 0) && (index < static_cast<int64_t>(inputs_holder.size())),
672- "Index:%lld of node:%s should in range[0, %zu)", index, data_node->GetName().c_str(),672+ "Index:%lld of node:%s should be in range [0, %zu)", index, data_node->GetName().c_str(),
673 inputs_holder.size());673 inputs_holder.size());
674 std::unique_ptr<uint8_t[]> shape_holder;674 std::unique_ptr<uint8_t[]> shape_holder;
675 const auto data_op_desc = data_node->GetOpDesc();675 const auto data_op_desc = data_node->GetOpDesc();
@@ -182,7 +182,7 @@ ge::graphStatus TilingMemCheck::ConstructMemCheckInfo(const ge::OpDescPtr &op_de
182 GE_ASSERT_NOTNULL(op_desc);182 GE_ASSERT_NOTNULL(op_desc);
183 bool value = false;183 bool value = false;
184 if ((!ge::AttrUtils::GetBool(op_desc, kMemoryCheck, value)) || (!value)) {184 if ((!ge::AttrUtils::GetBool(op_desc, kMemoryCheck, value)) || (!value)) {
185- GELOGI("Memcheck is not enable, op name: %s", op_desc->GetNamePtr());185+ GELOGI("Memcheck is not enabled, op name: %s", op_desc->GetNamePtr());
186 return ge::SUCCESS;186 return ge::SUCCESS;
187 }187 }
188 const int64_t tiling_data_size = static_cast<int64_t>(run_info.GetAllTilingData().str().size());188 const int64_t tiling_data_size = static_cast<int64_t>(run_info.GetAllTilingData().str().size());
@@ -199,7 +199,7 @@ Status Get64BitSectionHeaders(ElfData &elf_data) {
199 const uint32_t sh_size = elf_data.elf_header.e_shentsize;199 const uint32_t sh_size = elf_data.elf_header.e_shentsize;
200 const uint32_t sh_num = elf_data.elf_header.e_shnum;200 const uint32_t sh_num = elf_data.elf_header.e_shnum;
201 GE_ASSERT_TRUE((sh_size > 0U) && (sh_num > 0U),201 GE_ASSERT_TRUE((sh_size > 0U) && (sh_num > 0U),
202- "The value of e_shentsize: %u field or e_shnum: %u should more than 0.", sh_size, sh_num);202+ "The value of e_shentsize: %u field or e_shnum: %u should be more than 0.", sh_size, sh_num);
203 GE_ASSERT_TRUE((sh_num <= (~(0UL) / sh_size)), "The value of e_shentsize: %u and e_shnum: %u is invalid.", sh_size,203 GE_ASSERT_TRUE((sh_num <= (~(0UL) / sh_size)), "The value of e_shentsize: %u and e_shnum: %u is invalid.", sh_size,
204 sh_num);204 sh_num);
205 GE_ASSERT_TRUE((static_cast<size_t>(sh_size) == sizeof(Elf64ExternalShdr)),205 GE_ASSERT_TRUE((static_cast<size_t>(sh_size) == sizeof(Elf64ExternalShdr)),
@@ -53,7 +53,7 @@ Status GetBinRealPath(const std::string &switch_kernel_name, std::string &bin_re
53 53 
54Status GetKernelBinByName(const std::string &bin_real_path, std::unique_ptr<char_t[]> &buf, uint64_t &buf_len) {54Status GetKernelBinByName(const std::string &bin_real_path, std::unique_ptr<char_t[]> &buf, uint64_t &buf_len) {
55 std::ifstream file(bin_real_path.c_str(), std::ios::binary | std::ios::in);55 std::ifstream file(bin_real_path.c_str(), std::ios::binary | std::ios::in);
56- GE_ASSERT_TRUE(file.is_open(), "file: %s does not exist or is unaccessible.", bin_real_path.c_str());56+ GE_ASSERT_TRUE(file.is_open(), "file: %s does not exist or is inaccessible.", bin_real_path.c_str());
57 GE_MAKE_GUARD(file_guard, [&file]() { (void)file.close(); });57 GE_MAKE_GUARD(file_guard, [&file]() { (void)file.close(); });
58 const std::streampos begin = file.tellg();58 const std::streampos begin = file.tellg();
59 (void)file.seekg(0, std::ios::end);59 (void)file.seekg(0, std::ios::end);
@@ -654,7 +654,7 @@ void NanoHostfuncParam::GenAllAttrsLen() {
654 buff_size_ += static_cast<uint32_t>(attr.first.size());654 buff_size_ += static_cast<uint32_t>(attr.first.size());
655 buff_size_ += iter->second(attr.second);655 buff_size_ += iter->second(attr.second);
656 }656 }
657- GELOGD("all attes len = %u", buff_size_ - tmp_size);657+ GELOGD("all attrs len = %u", buff_size_ - tmp_size);
658}658}
659 659 
660void NanoHostfuncParam::ParseSubBuffer(const uint8_t *buffer, const uint32_t count) const {660void NanoHostfuncParam::ParseSubBuffer(const uint8_t *buffer, const uint32_t count) const {
@@ -28,7 +28,7 @@ void DeviceMemoryRecorder::SetRecorder(const void *const addr, const int64_t siz
28 memory_info_data.time_stamp = MsprofSysCycleTime();28 memory_info_data.time_stamp = MsprofSysCycleTime();
29 GELOGI(29 GELOGI(
30 "[CannMemoryProfiler][RecordMemory] Record memory info: "30 "[CannMemoryProfiler][RecordMemory] Record memory info: "
31- "addr: %llu, size: %lld, total allocate size: %llu, total reserve size: %lld"31+ "addr: %llu, size: %lld, total allocate size: %llu, total reserve size: %lld "
32 "time stamp: %llu",32 "time stamp: %llu",
33 memory_info_data.addr, memory_info_data.size, memory_info_data.total_allocate_memory,33 memory_info_data.addr, memory_info_data.size, memory_info_data.total_allocate_memory,
34 memory_info_data.total_reserve_memory, memory_info_data.time_stamp);34 memory_info_data.total_reserve_memory, memory_info_data.time_stamp);
@@ -506,7 +506,7 @@ ge::Status GlobalProfilingWrapper::ReportTaskMemoryInfo(const std::string &model
506 memory_info_data->totalReserveMemory = record_memory_info.total_reserve_memory;506 memory_info_data->totalReserveMemory = record_memory_info.total_reserve_memory;
507 GELOGD(507 GELOGD(
508 "[ReportTaskMemoryInfo]Report memory info: node_id: %llu, "508 "[ReportTaskMemoryInfo]Report memory info: node_id: %llu, "
509- "addr: %llu, size: %lld, total allocate size: %llu, total reserve size: %lld"509+ "addr: %llu, size: %lld, total allocate size: %llu, total reserve size: %lld "
510 "time stamp: %llu",510 "time stamp: %llu",
511 memory_info_data->nodeId, memory_info_data->addr, memory_info_data->size, memory_info_data->totalAllocateMemory,511 memory_info_data->nodeId, memory_info_data->addr, memory_info_data->size, memory_info_data->totalAllocateMemory,
512 memory_info_data->totalReserveMemory, task_memory_info.timeStamp);512 memory_info_data->totalReserveMemory, task_memory_info.timeStamp);
@@ -490,7 +490,7 @@ bool SingleOpParser::Validate(const SingleOpDesc &op_desc) {
490 if (attr.value.IsEmpty()) {490 if (attr.value.IsEmpty()) {
491 (void)REPORT_PREDEFINED_ERR_MSG("E10030", std::vector<const char *>({"op_name", "attrname"}),491 (void)REPORT_PREDEFINED_ERR_MSG("E10030", std::vector<const char *>({"op_name", "attrname"}),
492 std::vector<const char *>({op_desc.op.c_str(), attr.name.c_str()}));492 std::vector<const char *>({op_desc.op.c_str(), attr.name.c_str()}));
493- GELOGE(PARAM_INVALID, "[Parse][Attr] fail for vale of attr name:\"%s\" is empty. ", attr.name.c_str());493+ GELOGE(PARAM_INVALID, "[Parse][Attr] fail for value of attr name:\"%s\" is empty. ", attr.name.c_str());
494 return false;494 return false;
495 }495 }
496 }496 }
@@ -401,8 +401,8 @@ FMK_FUNC_HOST_VISIBILITY bool ValidateStr(const std::string &file_path, const st
401 ret = regexec(&reg, file_path.c_str(), 0U, nullptr, 0);401 ret = regexec(&reg, file_path.c_str(), 0U, nullptr, 0);
402 if (static_cast<bool>(ret)) {402 if (static_cast<bool>(ret)) {
403 (void)regerror(ret, &reg, &ebuff[0], static_cast<size_t>(kMaxBuffSize));403 (void)regerror(ret, &reg, &ebuff[0], static_cast<size_t>(kMaxBuffSize));
404- GELOGE(ge::PARAM_INVALID, "[Rgexec][Param]Failed, reason %s", &ebuff[0]);404+ GELOGE(ge::PARAM_INVALID, "[Regexec][Param]Failed, reason %s", &ebuff[0]);
405- REPORT_INNER_ERR_MSG("E19999", "Rgexec failed, reason %s", &ebuff[0]);405+ REPORT_INNER_ERR_MSG("E19999", "Regexec failed, reason %s", &ebuff[0]);
406 regfree(&reg);406 regfree(&reg);
407 return false;407 return false;
408 }408 }
@@ -31,7 +31,7 @@ Status CheckArgsForC1hwncoc0ToHwcn(const TransArgs &args) {
31 const auto src_shape = args.src_shape;31 const auto src_shape = args.src_shape;
32 const auto dst_shape = args.dst_shape;32 const auto dst_shape = args.dst_shape;
33 if ((args.src_primary_format != FORMAT_C1HWNCoC0) || (args.dst_primary_format != FORMAT_HWCN)) {33 if ((args.src_primary_format != FORMAT_C1HWNCoC0) || (args.dst_primary_format != FORMAT_HWCN)) {
34- const std::string error = "Dose not support trans format from " +34+ const std::string error = "Does not support trans format from " +
35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -30,13 +30,13 @@ enum class NdDimIndex { k2dC, k2dN, k2dDimsNum };
30Status TransShapeNdToFz(const std::vector<int64_t> &src_shape, const Format &dst_format,30Status TransShapeNdToFz(const std::vector<int64_t> &src_shape, const Format &dst_format,
31 std::vector<int64_t> &dst_shape) {31 std::vector<int64_t> &dst_shape) {
32 if (!CheckShapeValid(src_shape, static_cast<int64_t>(NdDimIndex::k2dDimsNum))) {32 if (!CheckShapeValid(src_shape, static_cast<int64_t>(NdDimIndex::k2dDimsNum))) {
33- GELOGE(FAILED, "src_shape is valid");33+ GELOGE(FAILED, "src_shape is invalid");
34 return FAILED; // Only support 2D to fracz34 return FAILED; // Only support 2D to fracz
35 }35 }
36 36 
37 const int64_t c0 = GetC0Value(static_cast<int32_t>(dst_format));37 const int64_t c0 = GetC0Value(static_cast<int32_t>(dst_format));
38 if (c0 <= 0) {38 if (c0 <= 0) {
39- GELOGE(FAILED, "data_type is valid");39+ GELOGE(FAILED, "data_type is invalid");
40 return FAILED;40 return FAILED;
41 }41 }
42 42 
@@ -53,7 +53,7 @@ Status TransShapeNdToFz(const std::vector<int64_t> &src_shape, const Format &dst
53 dst_shape.push_back(kNiSize);53 dst_shape.push_back(kNiSize);
54 dst_shape.push_back(c0);54 dst_shape.push_back(c0);
55 if (!IsShapeValid(dst_shape)) {55 if (!IsShapeValid(dst_shape)) {
56- GELOGE(FAILED, "dst_shape is valid");56+ GELOGE(FAILED, "dst_shape is invalid");
57 return FAILED;57 return FAILED;
58 }58 }
59 return SUCCESS;59 return SUCCESS;
@@ -120,7 +120,7 @@ Status FormatTransferFractalZTbe::TransFormat(const TransArgs &args, TransResult
120 return ret;120 return ret;
121 }121 }
122 if ((!args.dst_shape.empty()) && (args.dst_shape != expect_shape)) {122 if ((!args.dst_shape.empty()) && (args.dst_shape != expect_shape)) {
123- GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "dst_shape id empty or valid");123+ GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "dst_shape is empty or invalid");
124 return ACL_ERROR_GE_SHAPE_INVALID;124 return ACL_ERROR_GE_SHAPE_INVALID;
125 }125 }
126 126 
@@ -33,7 +33,7 @@ Status CheckArgsForFracZToHwcn(const TransArgs &args) {
33 const auto src_shape = args.src_shape;33 const auto src_shape = args.src_shape;
34 const auto dst_shape = args.dst_shape;34 const auto dst_shape = args.dst_shape;
35 if ((args.src_primary_format != FORMAT_FRACTAL_Z) || (args.dst_primary_format != FORMAT_HWCN)) {35 if ((args.src_primary_format != FORMAT_FRACTAL_Z) || (args.dst_primary_format != FORMAT_HWCN)) {
36- const std::string error = "Dose not support trans format from " +36+ const std::string error = "Does not support trans format from " +
37 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +37 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
38 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));38 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
39 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());39 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -31,7 +31,7 @@ Status CheckArgsForFracZToNchw(const TransArgs &args) {
31 const auto src_shape = args.src_shape;31 const auto src_shape = args.src_shape;
32 const auto dst_shape = args.dst_shape;32 const auto dst_shape = args.dst_shape;
33 if ((args.src_primary_format != FORMAT_FRACTAL_Z) || (args.dst_primary_format != FORMAT_NCHW)) {33 if ((args.src_primary_format != FORMAT_FRACTAL_Z) || (args.dst_primary_format != FORMAT_NCHW)) {
34- const std::string error = "Dose not support trans format from " +34+ const std::string error = "Does not support trans format from " +
35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -31,7 +31,7 @@ Status CheckArgsForFracZToNhwc(const TransArgs &args) {
31 const auto src_shape = args.src_shape;31 const auto src_shape = args.src_shape;
32 const auto dst_shape = args.dst_shape;32 const auto dst_shape = args.dst_shape;
33 if ((args.src_primary_format != FORMAT_FRACTAL_Z) || (args.dst_primary_format != FORMAT_NHWC)) {33 if ((args.src_primary_format != FORMAT_FRACTAL_Z) || (args.dst_primary_format != FORMAT_NHWC)) {
34- const std::string error = "Dose not support trans format from " +34+ const std::string error = "Does not support trans format from " +
35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -517,7 +517,7 @@ Status FormatTransferFZC04To4D::TransFormat(const TransArgs &args, TransResult &
517 GE_ASSERT_SUCCESS(hwcn_fzc04_transfer.TransShape(args.dst_format, args.dst_shape, args.src_data_type, args.src_format,517 GE_ASSERT_SUCCESS(hwcn_fzc04_transfer.TransShape(args.dst_format, args.dst_shape, args.src_data_type, args.src_format,
518 expect_fzc04_shape));518 expect_fzc04_shape));
519 if (expect_fzc04_shape != args.src_shape) {519 if (expect_fzc04_shape != args.src_shape) {
520- GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Src format %s, dts format %s. Shape not equivalent.",520+ GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Src format %s, dst format %s. Shape not equivalent.",
521 TypeUtils::FormatToSerialString(args.src_format).c_str(),521 TypeUtils::FormatToSerialString(args.src_format).c_str(),
522 TypeUtils::FormatToSerialString(args.dst_format).c_str());522 TypeUtils::FormatToSerialString(args.dst_format).c_str());
523 return ACL_ERROR_GE_SHAPE_INVALID;523 return ACL_ERROR_GE_SHAPE_INVALID;
@@ -49,7 +49,7 @@ Status TransShapeHwcnToC1hwncoc0(const std::vector<int64_t> &src_shape, const in
49 49 
50Status CheckArgsForHwcnToC1hwncoc0(const TransArgs &args) {50Status CheckArgsForHwcnToC1hwncoc0(const TransArgs &args) {
51 if ((args.src_primary_format != FORMAT_HWCN) || (args.dst_primary_format != FORMAT_C1HWNCoC0)) {51 if ((args.src_primary_format != FORMAT_HWCN) || (args.dst_primary_format != FORMAT_C1HWNCoC0)) {
52- const std::string error = "Dose not support trans format from " +52+ const std::string error = "Does not support trans format from " +
53 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +53 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
54 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));54 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
55 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());55 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -31,7 +31,7 @@ Status CheckArgsForNc1hwc0ToNchw(const TransArgs &args) {
31 const auto &src_shape = args.src_shape;31 const auto &src_shape = args.src_shape;
32 const auto &dst_shape = args.dst_shape;32 const auto &dst_shape = args.dst_shape;
33 if ((args.src_primary_format != FORMAT_NC1HWC0) || (args.dst_primary_format != FORMAT_NCHW)) {33 if ((args.src_primary_format != FORMAT_NC1HWC0) || (args.dst_primary_format != FORMAT_NCHW)) {
34- const std::string error = "Dose not support trans format from " +34+ const std::string error = "Does not support trans format from " +
35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -31,7 +31,7 @@ Status CheckArgsForNc1hwc0ToNhwc(const TransArgs &args) {
31 auto src_shape = args.src_shape;31 auto src_shape = args.src_shape;
32 auto dst_shape = args.dst_shape;32 auto dst_shape = args.dst_shape;
33 if ((args.src_primary_format != FORMAT_NC1HWC0) || (args.dst_primary_format != FORMAT_NHWC)) {33 if ((args.src_primary_format != FORMAT_NC1HWC0) || (args.dst_primary_format != FORMAT_NHWC)) {
34- const std::string error = "Dose not support trans format from " +34+ const std::string error = "Does not support trans format from " +
35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +35 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));36 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());37 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -56,7 +56,7 @@ Status TransShapeNchwToNc1hwc0(const std::vector<int64_t> &src_shape, const Data
56 56 
57Status CheckArgsForNchwToNc1hwc0(const TransArgs &args) {57Status CheckArgsForNchwToNc1hwc0(const TransArgs &args) {
58 if ((args.src_primary_format != FORMAT_NCHW) || (args.dst_primary_format != FORMAT_NC1HWC0)) {58 if ((args.src_primary_format != FORMAT_NCHW) || (args.dst_primary_format != FORMAT_NC1HWC0)) {
59- const std::string error = "Dose not support trans format from " +59+ const std::string error = "Does not support trans format from " +
60 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +60 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
61 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));61 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
62 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());62 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -54,7 +54,7 @@ Status TransShapeNhwcToNc1hwc0(const std::vector<int64_t> &src_shape, const Data
54 54 
55Status CheckArgsForNhwcToNc1hwc0(const TransArgs &args) {55Status CheckArgsForNhwcToNc1hwc0(const TransArgs &args) {
56 if ((args.src_primary_format != FORMAT_NHWC) || (args.dst_primary_format != FORMAT_NC1HWC0)) {56 if ((args.src_primary_format != FORMAT_NHWC) || (args.dst_primary_format != FORMAT_NC1HWC0)) {
57- const std::string error = "Dose not support trans format from " +57+ const std::string error = "Does not support trans format from " +
58 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +58 FmtToStr(TypeUtils::FormatToSerialString(args.src_primary_format)) + " to " +
59 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));59 FmtToStr(TypeUtils::FormatToSerialString(args.dst_primary_format));
60 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());60 GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
@@ -74,7 +74,8 @@ ge::Status CopyAttrValueSizeByType(const ge::AnyValue &attr_value, uint8_t *base
74 (void)attr_value.GetValue<T>(val);74 (void)attr_value.GetValue<T>(val);
75 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), &val, sizeof(T));75 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), &val, sizeof(T));
76 if (mem_ret != EOK) {76 if (mem_ret != EOK) {
77- GELOGE(ge::FAILED, "memcpy failed.");77+ GELOGE(ge::FAILED, "memcpy failed, copy scalar attr value of size %zu at offset %zu, max_size %zu failed.",
78+ sizeof(T), offset, max_size);
78 return ge::FAILED;79 return ge::FAILED;
79 }80 }
80 offset += sizeof(T);81 offset += sizeof(T);
@@ -91,7 +92,8 @@ ge::Status CopyAttrValueSizeByType<std::string>(const ge::AnyValue &attr_value,
91 }92 }
92 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), val.data(), val.length());93 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), val.data(), val.length());
93 if (mem_ret != EOK) {94 if (mem_ret != EOK) {
94- GELOGE(ge::FAILED, "memcpy failed.");95+ GELOGE(ge::FAILED, "memcpy failed, copy string attr value of length %zu at offset %zu, max_size %zu failed.",
96+ val.length(), offset, max_size);
95 return ge::FAILED;97 return ge::FAILED;
96 }98 }
97 offset += val.length();99 offset += val.length();
@@ -108,7 +110,8 @@ ge::Status CopyListAttrValueSizeByType(const ge::AnyValue &attr_value, uint8_t *
108 T tmp_val = val;110 T tmp_val = val;
109 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), &tmp_val, sizeof(T));111 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), &tmp_val, sizeof(T));
110 if (mem_ret != EOK) {112 if (mem_ret != EOK) {
111- GELOGE(ge::FAILED, "memcpy failed.");113+ GELOGE(ge::FAILED, "memcpy failed, copy list attr element of size %zu at offset %zu, max_size %zu failed.",
114+ sizeof(T), offset, max_size);
112 return ge::FAILED;115 return ge::FAILED;
113 }116 }
114 offset += sizeof(T);117 offset += sizeof(T);
@@ -127,7 +130,9 @@ ge::Status CopyListAttrValueSizeByType<std::string>(const ge::AnyValue &attr_val
127 }130 }
128 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), val.data(), val.length());131 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), val.data(), val.length());
129 if (mem_ret != EOK) {132 if (mem_ret != EOK) {
130- GELOGE(ge::FAILED, "memcpy failed.");133+ GELOGE(ge::FAILED,
134+ "memcpy failed, copy string list attr element of length %zu at offset %zu, max_size %zu failed.",
135+ val.length(), offset, max_size);
131 return ge::FAILED;136 return ge::FAILED;
132 }137 }
133 offset += val.length();138 offset += val.length();
@@ -144,7 +149,9 @@ ge::Status CopyListListAttrValueSizeByType(const ge::AnyValue &attr_value, uint8
144 for (const auto &val : vals) {149 for (const auto &val : vals) {
145 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), &val, sizeof(T));150 const auto mem_ret = memcpy_s((base + offset), (max_size - offset), &val, sizeof(T));
146 if (mem_ret != EOK) {151 if (mem_ret != EOK) {
147- GELOGE(ge::FAILED, "memcpy failed.");152+ GELOGE(ge::FAILED,
153+ "memcpy failed, copy nested list attr element of size %zu at offset %zu, max_size %zu failed.",
154+ sizeof(T), offset, max_size);
148 return ge::FAILED;155 return ge::FAILED;
149 }156 }
150 offset += sizeof(T);157 offset += sizeof(T);
@@ -251,7 +258,7 @@ static Status GetTensorInfos(const OpDesc &op_desc, CompileCacheDesc &cache_desc
251static Status GetOriginAttr(const std::string &op_type, std::set<string> &ordered_origin_attr) {258static Status GetOriginAttr(const std::string &op_type, std::set<string> &ordered_origin_attr) {
252 auto node_op = ge::OperatorFactory::CreateOperator("node_op", op_type.c_str());259 auto node_op = ge::OperatorFactory::CreateOperator("node_op", op_type.c_str());
253 if (node_op.IsEmpty()) {260 if (node_op.IsEmpty()) {
254- GELOGE(FAILED, "get op from OperatorFactory fail. opType: %s", op_type.c_str());261+ GELOGE(FAILED, "get op from OperatorFactory failed. opType: %s", op_type.c_str());
255 return FAILED;262 return FAILED;
256 }263 }
257 264 
@@ -364,7 +371,8 @@ Status NodeCompileCacheModule::CopyAttrToMem(const std::map<std::string, AnyValu
364 const auto mem_ret =371 const auto mem_ret =
365 memcpy_s((attr_mem.get() + offset), (attr_size - offset), it->first.data(), it->first.length());372 memcpy_s((attr_mem.get() + offset), (attr_size - offset), it->first.data(), it->first.length());
366 if (mem_ret != EOK) {373 if (mem_ret != EOK) {
367- GELOGE(FAILED, "memcpy failed.");374+ GELOGE(FAILED, "memcpy failed, copy attr name [%s] of length %zu at offset %zu failed.", it->first.c_str(),
375+ it->first.length(), offset);
368 return FAILED;376 return FAILED;
369 }377 }
370 FMK_SIZET_ADDCHECK(offset, it->first.length());378 FMK_SIZET_ADDCHECK(offset, it->first.length());
@@ -101,7 +101,7 @@ Status GraphNode::ParseFrozenInputIndex() {
101 frozen_input.c_str());101 frozen_input.c_str());
102 int32_t frozen_input_index = -1;102 int32_t frozen_input_index = -1;
103 GE_ASSERT_SUCCESS(ConvertToInt32(frozen_info_vec[kIndexOfFrozenDataIndex], frozen_input_index));103 GE_ASSERT_SUCCESS(ConvertToInt32(frozen_info_vec[kIndexOfFrozenDataIndex], frozen_input_index));
104- GE_ASSERT_TRUE((frozen_input_index >= 0), "Frozen_input_index must be greater than zero: %u", frozen_input_index);104+ GE_ASSERT_TRUE((frozen_input_index >= 0), "Frozen_input_index must be non-negative: %u", frozen_input_index);
105 (void)frozen_input_indexes_.insert(static_cast<uint32_t>(frozen_input_index));105 (void)frozen_input_indexes_.insert(static_cast<uint32_t>(frozen_input_index));
106 if (frozen_info_vec.size() == 1UL) {106 if (frozen_info_vec.size() == 1UL) {
107 GELOGD("Parse frozen input index[%d] success.", frozen_input_index);107 GELOGD("Parse frozen input index[%d] success.", frozen_input_index);
@@ -805,7 +805,7 @@ Status HostMemResource::AssignVarMem(const std::string &var_name, const uint64_t
805 mem_offset = static_cast<size_t>(PtrToValue(buffer));805 mem_offset = static_cast<size_t>(PtrToValue(buffer));
806 FMK_UINT64_ADDCHECK(var_mem_size_, size);806 FMK_UINT64_ADDCHECK(var_mem_size_, size);
807 var_mem_size_ += size;807 var_mem_size_ += size;
808- GELOGI("[IMAS]AssignVarMem Set session_%" PRIu64 " name[%s] output[%zu] size[%lu]", session_id, var_name.c_str(),808+ GELOGI("AssignVarMem Set session_%" PRIu64 " name[%s] output[%zu] size[%lu]", session_id, var_name.c_str(),
809 mem_offset, size);809 mem_offset, size);
810 return SUCCESS;810 return SUCCESS;
811}811}
@@ -876,7 +876,7 @@ ge::Status VarManager::SetVarAddr(const std::string &var_name, const ge::GeTenso
876 876 
877 const std::lock_guard<std::recursive_mutex> lock(mutex_);877 const std::lock_guard<std::recursive_mutex> lock(mutex_);
878 if (var_resource_ == nullptr) {878 if (var_resource_ == nullptr) {
879- GELOGW("VarManager has not been init.");879+ GELOGW("VarManager has not been init, in SetVarAddr.");
880 return ge::INTERNAL_ERROR;880 return ge::INTERNAL_ERROR;
881 }881 }
882 var_resource_->SetVarAddr(var_name, tensor_desc, dev_ptr, memory_type, op_desc);882 var_resource_->SetVarAddr(var_name, tensor_desc, dev_ptr, memory_type, op_desc);
@@ -891,7 +891,7 @@ ge::Status VarManager::GetVarAddr(const std::string &var_name, const ge::GeTenso
891 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());891 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());
892 892 
893 if (var_resource_ == nullptr) {893 if (var_resource_ == nullptr) {
894- GELOGW("VarManager has not been init.");894+ GELOGW("VarManager has not been init, in GetVarAddr.");
895 return ge::INTERNAL_ERROR;895 return ge::INTERNAL_ERROR;
896 }896 }
897 const auto ret = var_resource_->GetVarAddr(var_name, tensor_desc, &dev_ptr, memory_type);897 const auto ret = var_resource_->GetVarAddr(var_name, tensor_desc, &dev_ptr, memory_type);
@@ -1102,7 +1102,7 @@ void VarManager::SetVarIsReady(const std::string &var_name, const ge::GeTensorDe
1102 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());1102 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());
1103 1103 
1104 if (var_resource_ == nullptr) {1104 if (var_resource_ == nullptr) {
1105- GELOGW("VarManager has not been init.");1105+ GELOGW("VarManager has not been init, in SetVarIsReady.");
1106 return;1106 return;
1107 }1107 }
1108 var_resource_->SetVarIsReady(var_name, tensor_desc, device_id);1108 var_resource_->SetVarIsReady(var_name, tensor_desc, device_id);
@@ -1116,7 +1116,7 @@ bool VarManager::IsVarReady(const std::string &var_name, const ge::GeTensorDesc
1116 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());1116 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());
1117 1117 
1118 if (var_resource_ == nullptr) {1118 if (var_resource_ == nullptr) {
1119- GELOGW("VarManager has not been init.");1119+ GELOGW("VarManager has not been init, in IsVarReady.");
1120 return false;1120 return false;
1121 }1121 }
1122 return var_resource_->IsVarReady(var_name, tensor_desc, device_id);1122 return var_resource_->IsVarReady(var_name, tensor_desc, device_id);
@@ -1129,7 +1129,7 @@ bool VarManager::IsVarExist(const std::string &var_name, const ge::GeTensorDesc
1129 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());1129 ge::TypeUtils::FormatToSerialString(tensor_desc.GetFormat()).c_str());
1130 1130 
1131 if (var_resource_ == nullptr) {1131 if (var_resource_ == nullptr) {
1132- GELOGW("VarManager has not been init.");1132+ GELOGW("VarManager has not been init, in IsVarExist, var_name:%s.", var_name.c_str());
1133 return false;1133 return false;
1134 }1134 }
1135 return var_resource_->IsVarExist(var_name, tensor_desc);1135 return var_resource_->IsVarExist(var_name, tensor_desc);
@@ -1138,7 +1138,7 @@ bool VarManager::IsVarExist(const std::string &var_name, const ge::GeTensorDesc
1138bool VarManager::IsVarExist(const std::string &var_name) const {1138bool VarManager::IsVarExist(const std::string &var_name) const {
1139 const std::lock_guard<std::recursive_mutex> lock(mutex_);1139 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1140 if (var_resource_ == nullptr) {1140 if (var_resource_ == nullptr) {
1141- GELOGW("VarManager has not been init.");1141+ GELOGW("VarManager has not been init, in IsVarExist, var_name:%s.", var_name.c_str());
1142 return false;1142 return false;
1143 }1143 }
1144 return var_resource_->IsVarExist(var_name);1144 return var_resource_->IsVarExist(var_name);
@@ -1235,7 +1235,7 @@ ge::Status VarManager::GetCurVarDesc(const std::string &var_name, ge::GeTensorDe
1235 GELOGI("VarManager::GetCurVarDesc var_name = %s.", var_name.c_str());1235 GELOGI("VarManager::GetCurVarDesc var_name = %s.", var_name.c_str());
1236 1236 
1237 if (var_resource_ == nullptr) {1237 if (var_resource_ == nullptr) {
1238- GELOGW("VarManager has not been init.");1238+ GELOGW("VarManager has not been init, in GetCurVarDesc.");
1239 return ge::INTERNAL_ERROR;1239 return ge::INTERNAL_ERROR;
1240 }1240 }
1241 return var_resource_->GetCurVarDesc(var_name, tensor_desc);1241 return var_resource_->GetCurVarDesc(var_name, tensor_desc);
@@ -1250,7 +1250,7 @@ ge::Status VarManager::SaveBroadCastInfo(const uint32_t graph_id, const VarBroad
1250 broad_cast_info.input_offset, broad_cast_info.input_size, broad_cast_info.output_offset,1250 broad_cast_info.input_offset, broad_cast_info.input_size, broad_cast_info.output_offset,
1251 broad_cast_info.output_size);1251 broad_cast_info.output_size);
1252 if (var_resource_ == nullptr) {1252 if (var_resource_ == nullptr) {
1253- GELOGW("VarManager has not been init.");1253+ GELOGW("VarManager has not been init, in SaveBroadCastInfo.");
1254 return ge::INTERNAL_ERROR;1254 return ge::INTERNAL_ERROR;
1255 }1255 }
1256 var_resource_->SaveBroadCastInfo(graph_id, broad_cast_info);1256 var_resource_->SaveBroadCastInfo(graph_id, broad_cast_info);
@@ -1341,7 +1341,7 @@ bool VarManager::CheckAndSetVarLoaded(const OpDescPtr &op_desc, const uint32_t d
1341rtMemType_t VarManager::GetVarMemType(const int64_t offset) {1341rtMemType_t VarManager::GetVarMemType(const int64_t offset) {
1342 const std::lock_guard<std::recursive_mutex> lock(mutex_);1342 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1343 if (var_resource_ == nullptr) {1343 if (var_resource_ == nullptr) {
1344- GELOGW("VarManager has not been init.");1344+ GELOGW("VarManager has not been init, in GetVarMemType.");
1345 return RT_MEMORY_RESERVED;1345 return RT_MEMORY_RESERVED;
1346 }1346 }
1347 return var_resource_->GetVarMemType(offset);1347 return var_resource_->GetVarMemType(offset);
@@ -1570,7 +1570,7 @@ uint8_t *VarManager::GetHostPoolMemory(const rtMemType_t memory_type, const size
1570ge::Status VarManager::SetTransRoad(const std::string &var_name, const VarTransRoad &trans_road) {1570ge::Status VarManager::SetTransRoad(const std::string &var_name, const VarTransRoad &trans_road) {
1571 const std::lock_guard<std::recursive_mutex> lock(mutex_);1571 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1572 if (var_resource_ == nullptr) {1572 if (var_resource_ == nullptr) {
1573- GELOGW("VarManager has not been init.");1573+ GELOGW("VarManager has not been init, in SetTransRoad.");
1574 return ge::INTERNAL_ERROR;1574 return ge::INTERNAL_ERROR;
1575 }1575 }
1576 return var_resource_->SetTransRoad(var_name, trans_road);1576 return var_resource_->SetTransRoad(var_name, trans_road);
@@ -1579,7 +1579,7 @@ ge::Status VarManager::SetTransRoad(const std::string &var_name, const VarTransR
1579VarTransRoad *VarManager::GetTransRoad(const std::string &var_name) {1579VarTransRoad *VarManager::GetTransRoad(const std::string &var_name) {
1580 const std::lock_guard<std::recursive_mutex> lock(mutex_);1580 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1581 if (var_resource_ == nullptr) {1581 if (var_resource_ == nullptr) {
1582- GELOGW("VarManager has not been init.");1582+ GELOGW("VarManager has not been init, in GetTransRoad.");
1583 return nullptr;1583 return nullptr;
1584 }1584 }
1585 return var_resource_->GetTransRoad(var_name);1585 return var_resource_->GetTransRoad(var_name);
@@ -1588,7 +1588,7 @@ VarTransRoad *VarManager::GetTransRoad(const std::string &var_name) {
1588Status VarManager::SetChangedGraphId(const std::string &var_name, const uint32_t graph_id) {1588Status VarManager::SetChangedGraphId(const std::string &var_name, const uint32_t graph_id) {
1589 const std::lock_guard<std::recursive_mutex> lock(mutex_);1589 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1590 if (var_resource_ == nullptr) {1590 if (var_resource_ == nullptr) {
1591- GELOGW("VarManager has not been init.");1591+ GELOGW("VarManager has not been init, in SetChangedGraphId.");
1592 return INTERNAL_ERROR;1592 return INTERNAL_ERROR;
1593 }1593 }
1594 return var_resource_->SetChangedGraphId(var_name, graph_id);1594 return var_resource_->SetChangedGraphId(var_name, graph_id);
@@ -1597,7 +1597,7 @@ Status VarManager::SetChangedGraphId(const std::string &var_name, const uint32_t
1597Status VarManager::GetChangedGraphId(const std::string &var_name, uint32_t &graph_id) const {1597Status VarManager::GetChangedGraphId(const std::string &var_name, uint32_t &graph_id) const {
1598 const std::lock_guard<std::recursive_mutex> lock(mutex_);1598 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1599 if (var_resource_ == nullptr) {1599 if (var_resource_ == nullptr) {
1600- GELOGW("VarManager has not been init.");1600+ GELOGW("VarManager has not been init, in GetChangedGraphId.");
1601 return INTERNAL_ERROR;1601 return INTERNAL_ERROR;
1602 }1602 }
1603 return var_resource_->GetChangedGraphId(var_name, graph_id);1603 return var_resource_->GetChangedGraphId(var_name, graph_id);
@@ -1606,7 +1606,7 @@ Status VarManager::GetChangedGraphId(const std::string &var_name, uint32_t &grap
1606std::set<std::string> VarManager::GetChangedVarNames(const uint32_t graph_id) const {1606std::set<std::string> VarManager::GetChangedVarNames(const uint32_t graph_id) const {
1607 const std::lock_guard<std::recursive_mutex> lock(mutex_);1607 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1608 if (var_resource_ == nullptr) {1608 if (var_resource_ == nullptr) {
1609- GELOGW("VarManager has not been init.");1609+ GELOGW("VarManager has not been init, in GetChangedVarNames.");
1610 return std::set<std::string>();1610 return std::set<std::string>();
1611 }1611 }
1612 return var_resource_->GetChangedVarNames(graph_id);1612 return var_resource_->GetChangedVarNames(graph_id);
@@ -1661,7 +1661,7 @@ Status VarManager::SetMemoryMallocSize(const std::map<std::string, std::string>
1661void VarManager::RemoveChangedGraphId(const std::string &var_name) {1661void VarManager::RemoveChangedGraphId(const std::string &var_name) {
1662 const std::lock_guard<std::recursive_mutex> lock(mutex_);1662 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1663 if (var_resource_ == nullptr) {1663 if (var_resource_ == nullptr) {
1664- GELOGW("VarManager has not been init.");1664+ GELOGW("VarManager has not been init, in RemoveChangedGraphId.");
1665 return;1665 return;
1666 }1666 }
1667 var_resource_->RemoveChangedGraphId(var_name);1667 var_resource_->RemoveChangedGraphId(var_name);
@@ -1670,7 +1670,7 @@ void VarManager::RemoveChangedGraphId(const std::string &var_name) {
1670Status VarManager::SetAllocatedGraphId(const std::string &var_name, const uint32_t graph_id) {1670Status VarManager::SetAllocatedGraphId(const std::string &var_name, const uint32_t graph_id) {
1671 const std::lock_guard<std::recursive_mutex> lock(mutex_);1671 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1672 if (var_resource_ == nullptr) {1672 if (var_resource_ == nullptr) {
1673- GELOGW("VarManager has not been init.");1673+ GELOGW("VarManager has not been init, in SetAllocatedGraphId.");
1674 return INTERNAL_ERROR;1674 return INTERNAL_ERROR;
1675 }1675 }
1676 return var_resource_->SetAllocatedGraphId(var_name, graph_id);1676 return var_resource_->SetAllocatedGraphId(var_name, graph_id);
@@ -1679,7 +1679,7 @@ Status VarManager::SetAllocatedGraphId(const std::string &var_name, const uint32
1679Status VarManager::GetAllocatedGraphId(const std::string &var_name, uint32_t &graph_id) const {1679Status VarManager::GetAllocatedGraphId(const std::string &var_name, uint32_t &graph_id) const {
1680 const std::lock_guard<std::recursive_mutex> lock(mutex_);1680 const std::lock_guard<std::recursive_mutex> lock(mutex_);
1681 if (var_resource_ == nullptr) {1681 if (var_resource_ == nullptr) {
1682- GELOGW("VarManager has not been init.");1682+ GELOGW("VarManager has not been init, in GetAllocatedGraphId.");
1683 return INTERNAL_ERROR;1683 return INTERNAL_ERROR;
1684 }1684 }
1685 return var_resource_->GetAllocatedGraphId(var_name, graph_id);1685 return var_resource_->GetAllocatedGraphId(var_name, graph_id);
@@ -1693,7 +1693,7 @@ Status VarManager::GetAllVariables(std::map<std::string, GeTensorDesc> &all_vari
1693 }1693 }
1694 auto new_variable_desc = var_resource_->GetAllVarDesc();1694 auto new_variable_desc = var_resource_->GetAllVarDesc();
1695 if (new_variable_desc.size() == 0U) {1695 if (new_variable_desc.size() == 0U) {
1696- GELOGW("VarManager don't have variables.");1696+ GELOGW("VarManager doesn't have variables.");
1697 return INTERNAL_ERROR;1697 return INTERNAL_ERROR;
1698 }1698 }
1699 1699 
Mbase/graph/unfold/graph_unfolder.cc+3-3文件内容审核中,请稍后刷新重试
@@ -152,12 +152,12 @@ std::string DataSliceAdapter::GetTensorStr(const OpDesc::Vistor<ge::GeTensorDesc
152 continue;152 continue;
153 }153 }
154 if (iter_ori == FORMAT_MAP_STR.cend() || iter == FORMAT_MAP_STR.cend()) {154 if (iter_ori == FORMAT_MAP_STR.cend() || iter == FORMAT_MAP_STR.cend()) {
155- ss << "ori_fomat:" << ori_format << ",ori_shape:" << ori_shape.ToString();155+ ss << "ori_format:" << ori_format << ",ori_shape:" << ori_shape.ToString();
156 ss << ",format:" << format << ",shape:" << shape.ToString();156 ss << ",format:" << format << ",shape:" << shape.ToString();
157 ss << ",reshape_type:" << (reshape_type == nullptr ? "" : *reshape_type) << ";";157 ss << ",reshape_type:" << (reshape_type == nullptr ? "" : *reshape_type) << ";";
158 continue;158 continue;
159 }159 }
160- ss << "ori_fomat:" << iter_ori->second << ",ori_shape:" << ori_shape.ToString();160+ ss << "ori_format:" << iter_ori->second << ",ori_shape:" << ori_shape.ToString();
161 ss << ",format:" << iter->second << ",shape:" << shape.ToString();161 ss << ",format:" << iter->second << ",shape:" << shape.ToString();
162 ss << ",reshape_type:" << (reshape_type == nullptr ? "" : *reshape_type) << ";";162 ss << ",reshape_type:" << (reshape_type == nullptr ? "" : *reshape_type) << ";";
163 }163 }
@@ -589,7 +589,7 @@ Status DataSliceAdapter::TransAxisByType(const AxisType axis_type, const OpDescP
589 break;589 break;
590 default:590 default:
591 ret = FAILED;591 ret = FAILED;
592- GELOGW("Unsupport axis_type = %d", static_cast<int>(axis_type));592+ GELOGW("Unsupported axis_type = %d", static_cast<int>(axis_type));
593 break;593 break;
594 }594 }
595 if (ret != SUCCESS) {595 if (ret != SUCCESS) {
@@ -123,7 +123,9 @@ Status DataSliceElementwiseImpl::InferAxisSlice(Operator &op, const AxisTypeInfo
123 std::vector<std::vector<int64_t>> split_ranges = GetInputSplitRanges(123 std::vector<std::vector<int64_t>> split_ranges = GetInputSplitRanges(
124 input_desc, input_cutinfo[i], out_data_slice[0][output_cutinfo[0].second[0]], is_invalid_info);124 input_desc, input_cutinfo[i], out_data_slice[0][output_cutinfo[0].second[0]], is_invalid_info);
125 if (is_invalid_info) {125 if (is_invalid_info) {
126- GELOGE(FAILED, "The op[%s] input split range larger than input dim.", op_desc->GetName().c_str());126+ GELOGE(FAILED, "The op[%s] input split range[%ld] larger than input dim[%ld].", op_desc->GetName().c_str(),
127+ out_data_slice[0][output_cutinfo[0].second[0]].back(),
128+ input_desc->MutableShape().GetDim(input_cutinfo[i].second[0]));
127 return FAILED;129 return FAILED;
128 }130 }
129 in_data_slice.push_back(split_ranges);131 in_data_slice.push_back(split_ranges);
@@ -155,7 +155,7 @@ std::shared_ptr<GraphInfo> Analyzer::GetJsonObject(uint64_t session_id, uint64_t
155 " does not exist! "155 " does not exist! "
156 "graph_id:%" PRIu64 "",156 "graph_id:%" PRIu64 "",
157 session_id, graph_id);157 session_id, graph_id);
158- REPORT_INNER_ERR_MSG("E19999", "Sessin_id %" PRIu64 " does not exist, graph_id %" PRIu64 "", session_id, graph_id);158+ REPORT_INNER_ERR_MSG("E19999", "Session_id %" PRIu64 " does not exist, graph_id %" PRIu64 "", session_id, graph_id);
159 return nullptr;159 return nullptr;
160 } else {160 } else {
161 auto iter1 = (iter->second).find(graph_id);161 auto iter1 = (iter->second).find(graph_id);
@@ -213,7 +213,7 @@ ge::Status Analyzer::SaveAnalyzerDataToFile(uint64_t session_id, uint64_t graph_
213 auto graph_info = GetJsonObject(session_id, graph_id);213 auto graph_info = GetJsonObject(session_id, graph_id);
214 GE_CHECK_NOTNULL(graph_info);214 GE_CHECK_NOTNULL(graph_info);
215 if (graph_info->op_info.size() == 0) {215 if (graph_info->op_info.size() == 0) {
216- GELOGD("session_id:%" PRIu64 " graph_id:%" PRIu64 " does not owner op info, break it!", session_id, graph_id);216+ GELOGD("session_id:%" PRIu64 " graph_id:%" PRIu64 " does not own op info, break it!", session_id, graph_id);
217 return SUCCESS;217 return SUCCESS;
218 }218 }
219 std::lock_guard<std::mutex> lg(file_mutex_);219 std::lock_guard<std::mutex> lg(file_mutex_);
@@ -1143,7 +1143,7 @@ graphStatus Impl::InitDomiOmgContext(const std::string &input_shape, const std::
1143 omg_context_.format = iter->second;1143 omg_context_.format = iter->second;
1144 } else {1144 } else {
1145 GELOGE(GRAPH_PARAM_INVALID,1145 GELOGE(GRAPH_PARAM_INVALID,
1146- "[Check][Param:InputForamt] %s not support , expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.",1146+ "[Check][Param:InputFormat] %s not support , expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.",
1147 input_format.c_str());1147 input_format.c_str());
1148 return GRAPH_PARAM_INVALID;1148 return GRAPH_PARAM_INVALID;
1149 }1149 }
@@ -1599,7 +1599,7 @@ graphStatus aclgrphBundleSaveModelImpl(const std::string &output_file, const Mod
1599 GE_ASSERT_NOTNULL(root_model);1599 GE_ASSERT_NOTNULL(root_model);
1600 GE_ASSERT_SUCCESS(1600 GE_ASSERT_SUCCESS(
1601 VerifyVarOffset(root_model->GetRootGraph(), var_name_to_verify_info),1601 VerifyVarOffset(root_model->GetRootGraph(), var_name_to_verify_info),
1602- "Variable validation failed. Please ensure that the variables has been compiled under the same session.");1602+ "Variable validation failed. Please ensure that the variables have been compiled under the same session.");
1603 model_helper.GetGeRootModel()->GetRootGraph();1603 model_helper.GetGeRootModel()->GetRootGraph();
1604 GELOGD("Load root model successfully.");1604 GELOGD("Load root model successfully.");
1605 ModelBufferData cur_buf;1605 ModelBufferData cur_buf;
@@ -147,7 +147,7 @@ Status ConstructShapeFromStr(const std::string &shape_str, GeShape &shape) {
147 int64_t dim = -1;147 int64_t dim = -1;
148 GE_ASSERT_SUCCESS(ConvertToInt64(ge::StringUtils::Trim(str), dim), "Shape: %s is invalid in option %s",148 GE_ASSERT_SUCCESS(ConvertToInt64(ge::StringUtils::Trim(str), dim), "Shape: %s is invalid in option %s",
149 shape_str.c_str(), kHintInputShape);149 shape_str.c_str(), kHintInputShape);
150- GE_ASSERT_TRUE(dim >= 0L, "Shape in ge.inputHintOption should not less than 0, but get: %lld.", dim);150+ GE_ASSERT_TRUE(dim >= 0L, "Shape in ge.inputHintOption should not be less than 0, but get: %lld.", dim);
151 shape.AppendDim(dim);151 shape.AppendDim(dim);
152 }152 }
153 return GRAPH_SUCCESS;153 return GRAPH_SUCCESS;
@@ -165,7 +165,7 @@ Status ConstructValueListFromStr(const std::string &value_str, std::vector<int64
165 int64_t val = -1;165 int64_t val = -1;
166 GE_ASSERT_SUCCESS(ConvertToInt64(ge::StringUtils::Trim(str), val), "Value: %s is invalid in option",166 GE_ASSERT_SUCCESS(ConvertToInt64(ge::StringUtils::Trim(str), val), "Value: %s is invalid in option",
167 value_str.c_str());167 value_str.c_str());
168- GE_ASSERT_TRUE(val >= 0L, "Value in %s should not less than 0, but get: %lld.", kHintInputValue, val);168+ GE_ASSERT_TRUE(val >= 0L, "Value in %s should not be less than 0, but get: %lld.", kHintInputValue, val);
169 values.push_back(val);169 values.push_back(val);
170 }170 }
171 return GRAPH_SUCCESS;171 return GRAPH_SUCCESS;
@@ -1216,11 +1216,11 @@ Status GeGenerator::BuildSingleOp(OpDescPtr &op_desc, const std::vector<GeTensor
1216Status GeGenerator::ResetOutputShapeRange(const OpDescPtr &op_desc, const size_t index,1216Status GeGenerator::ResetOutputShapeRange(const OpDescPtr &op_desc, const size_t index,
1217 std::vector<std::pair<int64_t, int64_t>> &shape_range) {1217 std::vector<std::pair<int64_t, int64_t>> &shape_range) {
1218 GE_CHK_BOOL_RET_STATUS((op_desc->GetInputsSize() == op_desc->GetOutputsSize()), INTERNAL_ERROR,1218 GE_CHK_BOOL_RET_STATUS((op_desc->GetInputsSize() == op_desc->GetOutputsSize()), INTERNAL_ERROR,
1219- "Netoutput node inputs des size and outputs des size must same.");1219+ "The size of input descs and output descs must be the same.");
1220 (void)op_desc->GetOutputDesc(index).GetShapeRange(shape_range);1220 (void)op_desc->GetOutputDesc(index).GetShapeRange(shape_range);
1221 if (shape_range.size() == 0U) {1221 if (shape_range.size() == 0U) {
1222 // if outputdesc shaperange does not exist, use inputdesc shaperange which infer by ge1222 // if outputdesc shaperange does not exist, use inputdesc shaperange which infer by ge
1223- GELOGI("Netoutput do not has outputdesc shape range use inputdes shape range.");1223+ GELOGI("Netoutput has no outputdesc shape range, use inputdesc shape range instead");
1224 (void)op_desc->GetInputDesc(index).GetShapeRange(shape_range);1224 (void)op_desc->GetInputDesc(index).GetShapeRange(shape_range);
1225 }1225 }
1226 return SUCCESS;1226 return SUCCESS;
@@ -1285,7 +1285,7 @@ Status GeGenerator::ResetTensorDesc(const size_t index, const GeShape &data_shap
1285 std::vector<GeTensor> &vector_dynamic,1285 std::vector<GeTensor> &vector_dynamic,
1286 std::vector<std::pair<int64_t, int64_t>> &dynamic_shape_range) {1286 std::vector<std::pair<int64_t, int64_t>> &dynamic_shape_range) {
1287 if (index >= vector_dynamic.size()) {1287 if (index >= vector_dynamic.size()) {
1288- GELOGE(PARAM_INVALID, "vector num is not match.");1288+ GELOGE(PARAM_INVALID, "vector num does not match.");
1289 return PARAM_INVALID;1289 return PARAM_INVALID;
1290 }1290 }
1291 GeTensorDesc &desc = vector_dynamic[index].MutableTensorDesc();1291 GeTensorDesc &desc = vector_dynamic[index].MutableTensorDesc();
@@ -1530,7 +1530,7 @@ Status GeGenerator::SetExternalGraphRebuildStateCtrl(void *rebuild_ctrl) const {
1530 impl_->rebuild_ctrl_.reset(PtrToPtr<void, GraphRebuildStateCtrl>(rebuild_ctrl),1530 impl_->rebuild_ctrl_.reset(PtrToPtr<void, GraphRebuildStateCtrl>(rebuild_ctrl),
1531 [](const GraphRebuildStateCtrl *rebuild_ctrl_param) {1531 [](const GraphRebuildStateCtrl *rebuild_ctrl_param) {
1532 (void)rebuild_ctrl_param;1532 (void)rebuild_ctrl_param;
1533- GELOGI("no delete rebuild");1533+ GELOGI("no need to delete before rebuild");
1534 });1534 });
1535 impl_->graph_manager_.SetExternalGraphRebuildStateCtrl(impl_->rebuild_ctrl_);1535 impl_->graph_manager_.SetExternalGraphRebuildStateCtrl(impl_->rebuild_ctrl_);
1536 return SUCCESS;1536 return SUCCESS;
@@ -129,7 +129,7 @@ CmpStatus CompressConv2d(CompressOpConfig *const param, char *const weightRe,
129 param->compressConfig.init_offset = compressParameters.totalCompressedLength;129 param->compressConfig.init_offset = compressParameters.totalCompressedLength;
130 if (compressParameters.dataBase + param->compressConfig.inputSize > compressParameters.weightSizeTotal) {130 if (compressParameters.dataBase + param->compressConfig.inputSize > compressParameters.weightSizeTotal) {
131 LogFatal("weightSizeTotal is:" << compressParameters.weightSizeTotal131 LogFatal("weightSizeTotal is:" << compressParameters.weightSizeTotal
132- << ", datebase is:" << compressParameters.dataBase132+ << ", database is:" << compressParameters.dataBase
133 << ", size is:" << param->compressConfig.inputSize << ".");133 << ", size is:" << param->compressConfig.inputSize << ".");
134 return RET_ERROR;134 return RET_ERROR;
135 }135 }
@@ -115,7 +115,7 @@ void DataCompressor::InitDict(const char *data, size_t len) {
115 115 
116 sort(indexFreq.begin(), indexFreq.end(), FreqCmp);116 sort(indexFreq.begin(), indexFreq.end(), FreqCmp);
117 117 
118- Log("Freqency List:");118+ Log("Frequency List:");
119 dict_.resize(dictSize_);119 dict_.resize(dictSize_);
120 for (uint32_t i = 0; i < dictSize_; i++) {120 for (uint32_t i = 0; i < dictSize_; i++) {
121 int code = indexFreq[i].first;121 int code = indexFreq[i].first;
@@ -63,12 +63,12 @@ static std::string PrettyTime() {
63 } \63 } \
64 } while (0)64 } while (0)
65 65 
66-#define LogFatal(content) \66+#define LogFatal(content) \
67- do { \67+ do { \
68- pid_t pid = getpid(); \68+ pid_t pid = getpid(); \
69- const std::string processName = GetProcessName(pid); \69+ const std::string processName = GetProcessName(pid); \
70- std::cout << "[WARNING] CMP(" << pid << "," << processName << "):" << PrettyTime() << " [" << __FILE__ << ":" \70+ std::cout << "[ERROR] CMP(" << pid << "," << processName << "):" << PrettyTime() << " [" << __FILE__ << ":" \
71- << __LINE__ << "]" << __func__ << content << std::endl; \71+ << __LINE__ << "]" << __func__ << content << std::endl; \
72 } while (0)72 } while (0)
73 73 
74void LogCharBuffer(const char *input, size_t len);74void LogCharBuffer(const char *input, size_t len);
@@ -181,7 +181,7 @@ OpDescPtr TransOpCreator::CreateTransPoseDOp(const std::string &op_name, const G
181 const GeTensorDesc &output_desc) {181 const GeTensorDesc &output_desc) {
182 auto op_desc = MakeShared<OpDesc>(op_name, TRANSPOSED);182 auto op_desc = MakeShared<OpDesc>(op_name, TRANSPOSED);
183 if (op_desc == nullptr) {183 if (op_desc == nullptr) {
184- GELOGE(FAILED, "Failed to new transopsed opdesc.");184+ GELOGE(FAILED, "Failed to new transposed opdesc.");
185 return nullptr;185 return nullptr;
186 }186 }
187 187 
@@ -103,10 +103,10 @@ bool IsAttrValuesMatch(const NodePtr &p_node, const NodePtr &t_node, const std::
103 GE_WARN_ASSERT(gert::bg::GetAllIrAttrs(p_node, p_attr_values));103 GE_WARN_ASSERT(gert::bg::GetAllIrAttrs(p_node, p_attr_values));
104 GE_WARN_ASSERT(gert::bg::GetAllIrAttrs(t_node, t_attr_values));104 GE_WARN_ASSERT(gert::bg::GetAllIrAttrs(t_node, t_attr_values));
105 GE_WARN_ASSERT(p_attr_values.size() == attr_num,105 GE_WARN_ASSERT(p_attr_values.size() == attr_num,
106- "P node[%][%s] ir attr value num:[%zu] is not equal with ir attr def num:[%zu]", p_node->GetNamePtr(),106+ "P node[%s][%s] ir attr value num:[%zu] is not equal with ir attr def num:[%zu]", p_node->GetNamePtr(),
107 p_node->GetTypePtr(), p_attr_values.size(), attr_num);107 p_node->GetTypePtr(), p_attr_values.size(), attr_num);
108 GE_WARN_ASSERT(t_attr_values.size() == attr_num,108 GE_WARN_ASSERT(t_attr_values.size() == attr_num,
109- "T node[%][%s] ir attr value num:[%zu] is not equal with ir attr def num:[%zu]", t_node->GetNamePtr(),109+ "T node[%s][%s] ir attr value num:[%zu] is not equal with ir attr def num:[%zu]", t_node->GetNamePtr(),
110 t_node->GetTypePtr(), t_attr_values.size(), attr_num);110 t_node->GetTypePtr(), t_attr_values.size(), attr_num);
111 111 
112 for (size_t i = 0U; i < attr_num; ++i) {112 for (size_t i = 0U; i < attr_num; ++i) {
@@ -55,7 +55,7 @@ class SubgraphOutputImpl {
55 SubgraphOutputImpl() = default;55 SubgraphOutputImpl() = default;
56 explicit SubgraphOutputImpl(NodeIo node_output) : output_(std::move(node_output)) {}56 explicit SubgraphOutputImpl(NodeIo node_output) : output_(std::move(node_output)) {}
57 Status SetOutput(const NodeIo &node_output) {57 Status SetOutput(const NodeIo &node_output) {
58- GE_ASSERT_TRUE(NodeAdapter::GNode2Node(output_.node) == nullptr, "SubgraphOutput has already set");58+ GE_ASSERT_TRUE(NodeAdapter::GNode2Node(output_.node) == nullptr, "SubgraphOutput has already been set");
59 auto node = NodeAdapter::GNode2Node(node_output.node);59 auto node = NodeAdapter::GNode2Node(node_output.node);
60 GE_ASSERT_NOTNULL(node);60 GE_ASSERT_NOTNULL(node);
61 GE_ASSERT_NOTNULL(node->GetOutDataAnchor(node_output.index), "Node [%s][%s] output [%ld] is not exist",61 GE_ASSERT_NOTNULL(node->GetOutDataAnchor(node_output.index), "Node [%s][%s] output [%ld] is not exist",
@@ -140,7 +140,7 @@ NodeCompileCacheItem *FuzzCompileBinSelector::SelectBin(const NodePtr &node, con
140 140 
141 NodeCompileCacheItem node_cci;141 NodeCompileCacheItem node_cci;
142 if (NodeCompileCacheItem::Build(bin_type, node, handle, node_cci) != SUCCESS) {142 if (NodeCompileCacheItem::Build(bin_type, node, handle, node_cci) != SUCCESS) {
143- GELOGI("Fail to build compile cache item of node %s.", node->GetName().c_str());143+ GELOGW("Fail to build compile cache item of node %s.", node->GetName().c_str());
144 return nullptr;144 return nullptr;
145 }145 }
146 146 
@@ -121,7 +121,7 @@ Status WhileOpLabelMaker::Run(uint32_t &label_index) {
121 // link Data input.121 // link Data input.
122 const auto &all_in_data = cond_out_node->GetAllInDataAnchors();122 const auto &all_in_data = cond_out_node->GetAllInDataAnchors();
123 if (all_in_data.size() != kCondOutputNum) {123 if (all_in_data.size() != kCondOutputNum) {
124- GELOGE(FAILED, "[Check][Param] Node: %s Cond sbugraph output size:%zu should equal size:%u.",124+ GELOGE(FAILED, "[Check][Param] Node: %s Cond subgraph output size:%zu should equal size:%u.",
125 switch_node->GetName().c_str(), all_in_data.size(), kCondOutputNum);125 switch_node->GetName().c_str(), all_in_data.size(), kCondOutputNum);
126 return FAILED;126 return FAILED;
127 }127 }
Mcompiler/graph/manager/graph_manager.cc+12-11文件内容审核中,请稍后刷新重试
@@ -81,7 +81,7 @@ void GraphRebuildStateCtrl::SetStateChanged(const std::string &resource_name) {
81 if (graph_id_to_var_names.second.count(resource_name) > 0) {81 if (graph_id_to_var_names.second.count(resource_name) > 0) {
82 GELOGI(82 GELOGI(
83 "The resource %s has been changed, total changed times %d, "83 "The resource %s has been changed, total changed times %d, "
84- "the graph %u contains which should be re-build before next run",84+ "the graph %u contains the changed resource and should be re-built before next run",
85 resource_name.c_str(), times, graph_id_to_var_names.first);85 resource_name.c_str(), times, graph_id_to_var_names.first);
86 /// The graph being compiled right now is also added to the rebuild-list86 /// The graph being compiled right now is also added to the rebuild-list
87 /// and can be deleted by calling `SetGraphBuildEnd` at the end of compilation.87 /// and can be deleted by calling `SetGraphBuildEnd` at the end of compilation.
@@ -397,7 +397,7 @@ Status TryMergeSubgraph(const NodePtr &node1, const NodePtr &node2, const NodeFu
397 if (axis1 != axis2) {397 if (axis1 != axis2) {
398 // 判断轴是否是顺序子集关系,子集关系认为也是可以循环合并的,后期schedue adapter补轴实现398 // 判断轴是否是顺序子集关系,子集关系认为也是可以循环合并的,后期schedue adapter补轴实现
399 if (!BackendUtils::CheckAxisSubsetRelation(axis1, axis2)) {399 if (!BackendUtils::CheckAxisSubsetRelation(axis1, axis2)) {
400- GELOGI("sched axis diffrent and not subset relation, try tuning subgraph transpose axis.");400+ GELOGI("sched axis different and not subset relation, try tuning subgraph transpose axis.");
401 // 如果不是循序子集尝试做transpose轴变换401 // 如果不是循序子集尝试做transpose轴变换
402 if (BackendUtils::TuningSubgraphBeforeMerge(node1, node2, compute_graph1, compute_graph2, fuse_info) != SUCCESS) {402 if (BackendUtils::TuningSubgraphBeforeMerge(node1, node2, compute_graph1, compute_graph2, fuse_info) != SUCCESS) {
403 GELOGI("tuning subgraph transpose axis failed, can fuse false.");403 GELOGI("tuning subgraph transpose axis failed, can fuse false.");
@@ -670,7 +670,7 @@ Status AscGraphAxisMapping::FindAxisIndex(std::vector<ge::Expression> &node_repe
670 670 
671 // 没有锚点可辅助判断的剩余轴,沿用原先从右到左的贪心匹配策略。671 // 没有锚点可辅助判断的剩余轴,沿用原先从右到左的贪心匹配策略。
672 if (FillUnmappedAxisIndex(node_repeats, base_repeats, match_state) != SUCCESS) {672 if (FillUnmappedAxisIndex(node_repeats, base_repeats, match_state) != SUCCESS) {
673- GELOGD_IF(open_log_, "some axis repeat(%s) don't find from base repeats(%s).",673+ GELOGD_IF(open_log_, "Some axis repeats(%s) were not found in base repeats(%s).",
674 AutofuseUtils::VectorToStr(node_repeats).c_str(), AutofuseUtils::VectorToStr(base_repeats).c_str());674 AutofuseUtils::VectorToStr(node_repeats).c_str(), AutofuseUtils::VectorToStr(base_repeats).c_str());
675 return FAILED;675 return FAILED;
676 }676 }
@@ -1061,7 +1061,7 @@ bool AscGraphAxisMapping::CanLoopMerge(const NodePtr &node1, const NodePtr &node
1061 node2->GetType().c_str(), AutofuseUtils::VectorToStr(axis2).c_str());1061 node2->GetType().c_str(), AutofuseUtils::VectorToStr(axis2).c_str());
1062 1062 
1063 if (axis1.empty() || axis2.empty()) {1063 if (axis1.empty() || axis2.empty()) {
1064- GELOGI("sched axis convert failed, can't merge.");1064+ GELOGW("sched axis convert failed, can't merge.");
1065 return false;1065 return false;
1066 }1066 }
1067 1067 
@@ -1073,8 +1073,8 @@ bool AscGraphAxisMapping::CanLoopMerge(const NodePtr &node1, const NodePtr &node
1073 }1073 }
1074 }1074 }
1075 1075 
1076- GELOGI_IF(open_log_, "node %s(%s) and node %s(%s) can cyclic merge.", node1->GetNamePtr(), node1->GetType().c_str(),1076+ GELOGI_IF(open_log_, "node %s(%s) and node %s(%s) can be merged cyclically.", node1->GetNamePtr(),
1077- node2->GetNamePtr(), node2->GetType().c_str());1077+ node1->GetType().c_str(), node2->GetNamePtr(), node2->GetType().c_str());
1078 return true;1078 return true;
1079}1079}
1080 1080 
@@ -254,7 +254,7 @@ bool IsSplitComplete(const NodePtr &node) {
254 GE_ASSERT_NOTNULL(attr);254 GE_ASSERT_NOTNULL(attr);
255 // 复用缓存结果255 // 复用缓存结果
256 if (attr->GetSplitComplete()) {256 if (attr->GetSplitComplete()) {
257- GELOGD("split node %s is compelete", node->GetName().c_str());257+ GELOGD("split node %s is complete", node->GetName().c_str());
258 return true;258 return true;
259 }259 }
260 GE_ASSERT_TRUE(attr->GetFuseType() == loop::FuseType::kSplit);260 GE_ASSERT_TRUE(attr->GetFuseType() == loop::FuseType::kSplit);
@@ -2100,7 +2100,7 @@ bool BackendUtils::IsCanMergeAxisGroup(optimize::autoschedule::AxisGroup &group1
2100 // 如果两者都不是对方的子集,无需合并2100 // 如果两者都不是对方的子集,无需合并
2101 auto ret = CanMergeAxisGroup(group1, group2, merged_axes_group, is_ge_call);2101 auto ret = CanMergeAxisGroup(group1, group2, merged_axes_group, is_ge_call);
2102 if (ret != SUCCESS) {2102 if (ret != SUCCESS) {
2103- GELOGD("axis group not map, can merge failed.");2103+ GELOGD("axis group not map, can't merge.");
2104 }2104 }
2105 return ret;2105 return ret;
2106 }2106 }
@@ -2563,7 +2563,7 @@ Status BackendUtils::GetViewOpNextNodeByLoad(const NodePtr &load_node, NodePtr &
2563 2563 
2564 if ((cur_node->GetType() == kBroadcastType)) {2564 if ((cur_node->GetType() == kBroadcastType)) {
2565 finded_node = cur_node;2565 finded_node = cur_node;
2566- GELOGD("finded node name:%s(%s).", cur_node->GetName().c_str(), cur_node->GetType().c_str());2566+ GELOGD("found node name:%s(%s).", cur_node->GetName().c_str(), cur_node->GetType().c_str());
2567 break;2567 break;
2568 }2568 }
2569 cur_node = next_node;2569 cur_node = next_node;
@@ -2587,7 +2587,7 @@ Status BackendUtils::GetViewOpNextNodeByLoad(const ge::Node *load_node, NodePtr
2587 if ((cur_node->GetType() == kBroadcastType)) {2587 if ((cur_node->GetType() == kBroadcastType)) {
2588 // 需要转换为 NodePtr 存储2588 // 需要转换为 NodePtr 存储
2589 finded_node = cur_out_anchor_peer->GetOwnerNode();2589 finded_node = cur_out_anchor_peer->GetOwnerNode();
2590- GELOGD("finded node name:%s(%s).", cur_node->GetNamePtr(), cur_node->GetType().c_str());2590+ GELOGD("found node name:%s(%s).", cur_node->GetNamePtr(), cur_node->GetType().c_str());
2591 break;2591 break;
2592 }2592 }
2593 cur_node = next_node;2593 cur_node = next_node;
@@ -2964,7 +2964,7 @@ bool BackendUtils::AscNodeInputIsSimplestLoad(const NodePtr &peer_node, const In
2964 const auto pre_data_node = node_out_anchor->GetOwnerNodeBarePtr();2964 const auto pre_data_node = node_out_anchor->GetOwnerNodeBarePtr();
2965 GE_ASSERT_NOTNULL(pre_data_node);2965 GE_ASSERT_NOTNULL(pre_data_node);
2966 if (!IsSimplestLoad(peer_node.get(), pre_load_node, pre_data_node, attr_infos)) {2966 if (!IsSimplestLoad(peer_node.get(), pre_load_node, pre_data_node, attr_infos)) {
2967- GELOGD("cur node %s(%s) ascgraph date node %s(%s) have view op.", peer_node->GetNamePtr(),2967+ GELOGD("cur node %s(%s) ascgraph data node %s(%s) have view op.", peer_node->GetNamePtr(),
2968 peer_node->GetType().c_str(), pre_data_node->GetNamePtr(), pre_data_node->GetType().c_str());2968 peer_node->GetType().c_str(), pre_data_node->GetNamePtr(), pre_data_node->GetType().c_str());
2969 return false;2969 return false;
2970 }2970 }
@@ -66,7 +66,7 @@ Status FusionGraphManager::DumpGraph(const std::string &graph_name, const std::s
66 if (graph != nullptr) {66 if (graph != nullptr) {
67 AutofuseUtils::DumpGraphToOnnx(*graph, path, graph_name + suffix);67 AutofuseUtils::DumpGraphToOnnx(*graph, path, graph_name + suffix);
68 } else {68 } else {
69- GELOGW("dump cache graph(%s) failed, it not in graph manager (cache graph first).", graph_name.c_str());69+ GELOGW("dump cache graph(%s) failed, it is not in graph manager (cache graph first).", graph_name.c_str());
70 }70 }
71 return SUCCESS;71 return SUCCESS;
72}72}
@@ -106,7 +106,7 @@ Status FusionGraphManager::DumpGraphAndSubgraphs(const std::vector<std::string>
106 dump_order.push_back(std::make_pair(subgraph2, ""));106 dump_order.push_back(std::make_pair(subgraph2, ""));
107 processing_queue.push_back(subgraph2);107 processing_queue.push_back(subgraph2);
108 } else {108 } else {
109- GELOGD("can't find cache graph(%s), it not in merged graph map keys.", current_graph.c_str());109+ GELOGD("can't find cache graph(%s), it is not in merged graph map keys.", current_graph.c_str());
110 }110 }
111 processing_queue.pop_front(); // 批量处理完成后统一pop111 processing_queue.pop_front(); // 批量处理完成后统一pop
112 }112 }
@@ -91,7 +91,7 @@ bool TransposeFusionStrategy::CheckVerticalFusion(const NodePtr &node1, const No
91 }91 }
92 92 
93 GELOGI(93 GELOGI(
94- "node1 %s(%s) and node2 %s(%s) cannot fuse, the reason is [%s]"94+ "node1 %s(%s) and node2 %s(%s) cannot fuse, the reason is [%s] "
95 "Transpose can only undergo vertical fusion with Pointwise.",95 "Transpose can only undergo vertical fusion with Pointwise.",
96 node1->GetName().c_str(), node1->GetType().c_str(), node2->GetName().c_str(), node2->GetType().c_str(),96 node1->GetName().c_str(), node1->GetType().c_str(), node2->GetName().c_str(), node2->GetType().c_str(),
97 ge::NotFuseReasonCode(ge::NotFuseReason::kTransposeCanNotFuseWithNotPointWise));97 ge::NotFuseReasonCode(ge::NotFuseReason::kTransposeCanNotFuseWithNotPointWise));
@@ -120,7 +120,7 @@ KernelBox SetLoopKernel(const ge::OutDataAnchorPtr &dst, const LoopVar &result)
120 if (meta->type == FuseType::kSplit && !ge::AutoFuseConfig::LoweringConfig().experimental_lowering_split) {120 if (meta->type == FuseType::kSplit && !ge::AutoFuseConfig::LoweringConfig().experimental_lowering_split) {
121 GELOGI(121 GELOGI(
122 "Drop lower result %s of %s as disabled, you can enable it by setting "122 "Drop lower result %s of %s as disabled, you can enable it by setting "
123- "AUTOFUSE_FLAGS=\"--autofuse_enable_pass=split\""123+ "AUTOFUSE_FLAGS=\"--autofuse_enable_pass=split\" "
124 "and unsetting AUTOFUSE_FLAGS=\"--autofuse_disable_pass=split\"",124 "and unsetting AUTOFUSE_FLAGS=\"--autofuse_disable_pass=split\"",
125 result.Readable().c_str(), BufferName(dst).c_str());125 result.Readable().c_str(), BufferName(dst).c_str());
126 meta->type = FuseType::kExtern;126 meta->type = FuseType::kExtern;
@@ -197,7 +197,7 @@ graphStatus GetScalarFromInput(const ge::InDataAnchorPtr &src, ge::loop::LoopVar
197 } else {197 } else {
198 GE_WARN_ASSERT(dtype == ge::DT_FLOAT16,198 GE_WARN_ASSERT(dtype == ge::DT_FLOAT16,
199 "Const Scalar only support {DT_FLOAT, DT_INT8, DT_INT32, DT_UINT8, DT_INT16, DT_UINT16, DT_UINT32}");199 "Const Scalar only support {DT_FLOAT, DT_INT8, DT_INT32, DT_UINT8, DT_INT16, DT_UINT16, DT_UINT32}");
200- GELOGW("Unable to tran not support DT_FLOAT16");200+ GELOGW("Unable to transform: DT_FLOAT16 is not supported");
201 return GRAPH_FAILED;201 return GRAPH_FAILED;
202 }202 }
203 GELOGD("Node %s create scalar ascir without load ascir", src_node->GetName().c_str());203 GELOGD("Node %s create scalar ascir without load ascir", src_node->GetName().c_str());
@@ -555,7 +555,7 @@ void PadDimsToMax(std::vector<std::vector<Expression>> &input_dims, size_t max_d
555KernelBox StoreMatMul(const ge::OutDataAnchorPtr &dst, const std::vector<ge::InDataAnchorPtr> &inputs,555KernelBox StoreMatMul(const ge::OutDataAnchorPtr &dst, const std::vector<ge::InDataAnchorPtr> &inputs,
556 const MatMulAttr &matmul_attr) {556 const MatMulAttr &matmul_attr) {
557 if ((inputs.size() <= 1U) || (inputs.size() > 4U)) {557 if ((inputs.size() <= 1U) || (inputs.size() > 4U)) {
558- GELOGI("Drop lower result of %s as it has err inputs num=%zu", BufferName(dst).c_str(), inputs.size());558+ GELOGI("Drop lower result of %s as it has invalid inputs num=%zu", BufferName(dst).c_str(), inputs.size());
559 return StoreExtern(dst);559 return StoreExtern(dst);
560 }560 }
561 std::vector<Expression> dims;561 std::vector<Expression> dims;
@@ -594,7 +594,7 @@ KernelBox StoreConv2D(const ge::OutDataAnchorPtr &dst, const std::vector<ge::InD
594 const Conv2DAttr &conv2d_attr) {594 const Conv2DAttr &conv2d_attr) {
595 GELOGI("StoreConv2D called for dst: %s, inputs.size(): %zu", BufferName(dst).c_str(), inputs.size());595 GELOGI("StoreConv2D called for dst: %s, inputs.size(): %zu", BufferName(dst).c_str(), inputs.size());
596 if (!IsValidConv2DInputs(inputs)) {596 if (!IsValidConv2DInputs(inputs)) {
597- GELOGI("Drop lower result of %s as it has err inputs num=%zu", BufferName(dst).c_str(), inputs.size());597+ GELOGI("Drop lower result of %s as it has invalid inputs num=%zu", BufferName(dst).c_str(), inputs.size());
598 return StoreExtern(dst);598 return StoreExtern(dst);
599 }599 }
600 std::vector<Expression> dims;600 std::vector<Expression> dims;
@@ -658,7 +658,7 @@ bool CheckAndGetDims(const std::vector<Expression> &long_dims, const std::vector
658 658 
659 for (size_t i = 0U; i < is_exist.size(); i++) {659 for (size_t i = 0U; i < is_exist.size(); i++) {
660 if ((!is_exist[i]) && (long_dims[i] != Symbol(1))) {660 if ((!is_exist[i]) && (long_dims[i] != Symbol(1))) {
661- GELOGW("Axes that do not exist must be 1, Long axes: %zu, not equal than 1", i);661+ GELOGW("Axes that do not exist must be 1, axis %zu is not equal to 1", i);
662 return false;662 return false;
663 }663 }
664 if (!is_exist[i]) {664 if (!is_exist[i]) {
@@ -694,7 +694,7 @@ void AddReshapeAxisChange(const LoopVar &reshape, const std::vector<Expression>
694// 新增支持 [A*B, C]->[A,B,C]/[A,B,C]->[A*B,C]694// 新增支持 [A*B, C]->[A,B,C]/[A,B,C]->[A*B,C]
695LoopVar Reshape(const LoopVar &op, const std::vector<Expression> &src_dims, const std::vector<Expression> &dst_dims) {695LoopVar Reshape(const LoopVar &op, const std::vector<Expression> &src_dims, const std::vector<Expression> &dst_dims) {
696 std::vector<int64_t> dims_new;696 std::vector<int64_t> dims_new;
697- GE_WARN_ASSERT(src_dims.size() != dst_dims.size(), "Input dims size equal than output dims");697+ GE_WARN_ASSERT(src_dims.size() != dst_dims.size(), "Input dims size is equal to output dims size");
698 LoopVar reshape = op;698 LoopVar reshape = op;
699 size_t short_idx = 0U;699 size_t short_idx = 0U;
700 std::vector<size_t> mul_idx;700 std::vector<size_t> mul_idx;
@@ -237,7 +237,7 @@ class LoadOp : public LoopOp {
237 237 
238 graphStatus RealizeImpl() override {238 graphStatus RealizeImpl() override {
239 // 对于已经是Load的节点,Realize无需做任何事情239 // 对于已经是Load的节点,Realize无需做任何事情
240- GELOGW("Realize LoadOp %s has not effect", src_->GetOwnerNode()->GetName().c_str());240+ GELOGW("Realize LoadOp %s has no effect", src_->GetOwnerNode()->GetName().c_str());
241 return GRAPH_SUCCESS;241 return GRAPH_SUCCESS;
242 }242 }
243 243 
@@ -303,7 +303,7 @@ class LoadGatherOp : public LoopOp {
303 303 
304 graphStatus RealizeImpl() override {304 graphStatus RealizeImpl() override {
305 // 对于已经是Load的节点,Realize无需做任何事情305 // 对于已经是Load的节点,Realize无需做任何事情
306- GELOGW("Realize LoadGatherOp %s has not effect", dst_->GetOwnerNode()->GetName().c_str());306+ GELOGW("Realize LoadGatherOp %s has no effect", dst_->GetOwnerNode()->GetName().c_str());
307 return GRAPH_SUCCESS;307 return GRAPH_SUCCESS;
308 }308 }
309 309 
@@ -211,7 +211,7 @@ bool IsSingleTransposeShouldSkipLifting(const NodePtr &node) {
211 GE_ASSERT_TRUE(repeat.GetHint(dim), "Failed to get int value, expr = %s",211 GE_ASSERT_TRUE(repeat.GetHint(dim), "Failed to get int value, expr = %s",
212 ge::SymbolicUtils::ToString(repeat).c_str());212 ge::SymbolicUtils::ToString(repeat).c_str());
213 const auto data_type_size = GetSizeByDataType(asc_node->inputs[0].attr.dtype);213 const auto data_type_size = GetSizeByDataType(asc_node->inputs[0].attr.dtype);
214- GE_ASSERT_TRUE(data_type_size > 0, "data_type_size must greater than 0",214+ GE_ASSERT_TRUE(data_type_size > 0, "data_type_size must be greater than 0",
215 ge::SymbolicUtils::ToString(repeat).c_str());215 ge::SymbolicUtils::ToString(repeat).c_str());
216 constexpr int64_t limited_tail_size = 512U;216 constexpr int64_t limited_tail_size = 512U;
217 const auto limited_size = limited_tail_size / data_type_size;217 const auto limited_size = limited_tail_size / data_type_size;
@@ -266,7 +266,7 @@ bool IsSkipLifting(const NodePtr &node, size_t min_compute_nodes) {
266 // step4: compute node num266 // step4: compute node num
267 vector<const Node *> compute_nodes = AutofuseUtils::GetComputeOps(origin_nodes);267 vector<const Node *> compute_nodes = AutofuseUtils::GetComputeOps(origin_nodes);
268 if (compute_nodes.size() >= min_compute_nodes) {268 if (compute_nodes.size() >= min_compute_nodes) {
269- GELOGD("Skip lifting node%s, as num fused nodes num %zu >= %zu", node->GetNamePtr(), compute_nodes.size(),269+ GELOGD("Skip lifting node: %s, as num fused nodes num %zu >= %zu", node->GetNamePtr(), compute_nodes.size(),
270 min_compute_nodes);270 min_compute_nodes);
271 return true;271 return true;
272 }272 }
@@ -298,7 +298,7 @@ bool IsSkipLifting(const NodePtr &node, size_t min_compute_nodes) {
298 }298 }
299 if ((origin_nodes.size() == kNumOne) && (origin_nodes.at(0) != nullptr) &&299 if ((origin_nodes.size() == kNumOne) && (origin_nodes.at(0) != nullptr) &&
300 (origin_nodes.at(0)->GetAllInDataAnchorsSize() >= min_one_node_in_data)) {300 (origin_nodes.at(0)->GetAllInDataAnchorsSize() >= min_one_node_in_data)) {
301- GELOGI("Skip lifting node: %s, as it Only one node But Origin Input Size %u", node->GetNamePtr(),301+ GELOGI("Skip lifting node: %s, as it has only one node but origin input size is %u", node->GetNamePtr(),
302 fuse_attrs->GetOriginNodes().at(0)->GetAllInDataAnchorsSize());302 fuse_attrs->GetOriginNodes().at(0)->GetAllInDataAnchorsSize());
303 return true;303 return true;
304 }304 }
@@ -581,7 +581,7 @@ graphStatus LoweringManager::LoweringGraph(const ComputeGraphPtr &graph, const L
581 if (!IsNodeShouldLowering(node) || Lowering(node) != GRAPH_SUCCESS) {581 if (!IsNodeShouldLowering(node) || Lowering(node) != GRAPH_SUCCESS) {
582 GELOGD(582 GELOGD(
583 "Fallback lowering for node %s, type %s, as: This node should not lowering, "583 "Fallback lowering for node %s, type %s, as: This node should not lowering, "
584- "or not register lowering func, or unable to imply lowering",584+ "or not register lowering func, or unable to apply lowering",
585 node->GetName().c_str(), node->GetType().c_str());585 node->GetName().c_str(), node->GetType().c_str());
586 (void)FallbackLowering(node);586 (void)FallbackLowering(node);
587 continue;587 continue;
@@ -184,7 +184,7 @@ graphStatus LowerConcatHelper::NeedLifting(bool &need_lifting) {
184 if (!IsTile()) {184 if (!IsTile()) {
185 GE_CHK_BOOL_RET_SPECIAL_STATUS(num_inputs_ > backend_spec->concat_max_input_num, GRAPH_SUCCESS,185 GE_CHK_BOOL_RET_SPECIAL_STATUS(num_inputs_ > backend_spec->concat_max_input_num, GRAPH_SUCCESS,
186 "num_inputs = %zu, do not lifting", num_inputs_);186 "num_inputs = %zu, do not lifting", num_inputs_);
187- GE_CHK_BOOL_RET_SPECIAL_STATUS(num_inputs_ == 1U, GRAPH_SUCCESS, "single input, do not lifting");187+ GE_CHK_BOOL_RET_SPECIAL_STATUS(num_inputs_ == 1U, GRAPH_SUCCESS, "single input, no lifting");
188 }188 }
189 GE_ASSERT_SUCCESS(ParseConcatNode());189 GE_ASSERT_SUCCESS(ParseConcatNode());
190 // 暂不处理concat_dim后为动态shape的场景190 // 暂不处理concat_dim后为动态shape的场景
@@ -175,7 +175,7 @@ graphStatus ConcatToBroadcast(const NodePtr &node) {
175 indices.emplace_back(output_dims);175 indices.emplace_back(output_dims);
176 indices.emplace_back(x_dims);176 indices.emplace_back(x_dims);
177 loop::Index broadcast;177 loop::Index broadcast;
178- LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcast) == GRAPH_SUCCESS, node, "Failed to imply input broadcast");178+ LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcast) == GRAPH_SUCCESS, node, "Failed to apply input broadcast");
179 loop::Store(node->GetOutDataAnchor(0), loop::Broadcast(x, x_dims, broadcast));179 loop::Store(node->GetOutDataAnchor(0), loop::Broadcast(x, x_dims, broadcast));
180 GELOGD("concat node: %s lowered to broadcast", node->GetNamePtr());180 GELOGD("concat node: %s lowered to broadcast", node->GetNamePtr());
181 (void)AttrUtils::SetBool(node->GetOpDesc(), "_disable_lifting", true);181 (void)AttrUtils::SetBool(node->GetOpDesc(), "_disable_lifting", true);
@@ -257,7 +257,7 @@ graphStatus GetMultiples(const NodePtr &node, std::vector<int64_t> &multiples) {
257 "Failed to get multiples dim");257 "Failed to get multiples dim");
258 258 
259 const std::vector<int64_t> dims = multiples_tensor.GetTensorDesc().GetShape().GetDims();259 const std::vector<int64_t> dims = multiples_tensor.GetTensorDesc().GetShape().GetDims();
260- LOWERING_WARN_RECORD_REASON(dims.size() == 1U, node, "Multiples dims(%zu) is not 1.", dims.size());260+ LOWERING_WARN_RECORD_REASON(dims.size() == 1U, node, "Multiple dims(%zu) is not 1.", dims.size());
261 LOWERING_WARN_RECORD_REASON(multiples_tensor.GetData() != nullptr, node, "Multiples_tensor is null");261 LOWERING_WARN_RECORD_REASON(multiples_tensor.GetData() != nullptr, node, "Multiples_tensor is null");
262 262 
263 const ge::DataType tensor_dtype = multiples_tensor.GetTensorDesc().GetDataType();263 const ge::DataType tensor_dtype = multiples_tensor.GetTensorDesc().GetDataType();
@@ -376,7 +376,7 @@ graphStatus BroadCastByInDataAnchors(const NodePtr &node, const vector<InDataAnc
376 indices.emplace_back(sym_attr->symbolic_tensor.GetOriginSymbolShape().GetDims());376 indices.emplace_back(sym_attr->symbolic_tensor.GetOriginSymbolShape().GetDims());
377 }377 }
378 LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node,378 LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node,
379- "Failed to imply broadcast input");379+ "Failed to apply broadcast input");
380 return GRAPH_SUCCESS;380 return GRAPH_SUCCESS;
381}381}
382 382 
@@ -801,7 +801,7 @@ bool IsRedundantNode(const NodePtr &node, std::vector<ge::Expression> &x_dims) {
801 const auto out_anchor = node->GetOutDataAnchor(0);801 const auto out_anchor = node->GetOutDataAnchor(0);
802 std::vector<Expression> dst_dims;802 std::vector<Expression> dst_dims;
803 if (loop::GetBufferShape(out_anchor, dst_dims) != GRAPH_SUCCESS) {803 if (loop::GetBufferShape(out_anchor, dst_dims) != GRAPH_SUCCESS) {
804- GELOGI("Failed to get output buffer shape, skip tans to direct load");804+ GELOGI("Failed to get output buffer shape, skip trans to direct load");
805 return false;805 return false;
806 }806 }
807 if (dst_dims.size() != x_dims.size()) {807 if (dst_dims.size() != x_dims.size()) {
@@ -1513,7 +1513,7 @@ REGISTER_LOWERING(ClipByValue) {
1513 indices.emplace_back(clip_value_min_dims);1513 indices.emplace_back(clip_value_min_dims);
1514 indices.emplace_back(clip_value_max_dims);1514 indices.emplace_back(clip_value_max_dims);
1515 1515 
1516- LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node, "Failed to imply broadcast.");1516+ LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node, "Failed to apply broadcast.");
1517 constexpr size_t clip_value_min_idx = 1U;1517 constexpr size_t clip_value_min_idx = 1U;
1518 constexpr size_t clip_value_max_idx = 2U;1518 constexpr size_t clip_value_max_idx = 2U;
1519 auto clip_value_min_var = loop::Broadcast(clip_value_min_tensor, indices[clip_value_min_idx], broadcasted);1519 auto clip_value_min_var = loop::Broadcast(clip_value_min_tensor, indices[clip_value_min_idx], broadcasted);
@@ -1636,7 +1636,7 @@ REGISTER_LOWERING(AddN) {
1636 indices.emplace_back(sym_attr->symbolic_tensor.GetOriginSymbolShape().GetDims());1636 indices.emplace_back(sym_attr->symbolic_tensor.GetOriginSymbolShape().GetDims());
1637 }1637 }
1638 LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node,1638 LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node,
1639- "Failed to imply input broadcast");1639+ "Failed to apply input broadcast");
1640 1640 
1641 auto sum = loop::Broadcast(loop::Load(node->GetInDataAnchor(0)), indices[0], broadcasted);1641 auto sum = loop::Broadcast(loop::Load(node->GetInDataAnchor(0)), indices[0], broadcasted);
1642 for (size_t i = 1U; i < node->GetAllInDataAnchorsSize(); i++) {1642 for (size_t i = 1U; i < node->GetAllInDataAnchorsSize(); i++) {
@@ -1743,7 +1743,7 @@ REGISTER_LOWERING(BroadcastTo) {
1743 indices.emplace_back(x_dims);1743 indices.emplace_back(x_dims);
1744 1744 
1745 loop::Index broadcast;1745 loop::Index broadcast;
1746- LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcast) == GRAPH_SUCCESS, node, "Failed to imply input broadcast");1746+ LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcast) == GRAPH_SUCCESS, node, "Failed to apply input broadcast");
1747 loop::Store(node->GetOutDataAnchor(0), loop::Broadcast(x, x_dims, broadcast));1747 loop::Store(node->GetOutDataAnchor(0), loop::Broadcast(x, x_dims, broadcast));
1748 return GRAPH_SUCCESS;1748 return GRAPH_SUCCESS;
1749}1749}
@@ -2539,7 +2539,7 @@ REGISTER_LOWERING(TanhGrad) {
2539 std::vector<loop::Index> indices;2539 std::vector<loop::Index> indices;
2540 indices.emplace_back(y_dims);2540 indices.emplace_back(y_dims);
2541 indices.emplace_back(dy_dims);2541 indices.emplace_back(dy_dims);
2542- LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcast) == GRAPH_SUCCESS, node, "Failed to imply input broadcast");2542+ LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcast) == GRAPH_SUCCESS, node, "Failed to apply input broadcast");
2543 const auto y = loop::Broadcast(loop::Load(node->GetInDataAnchor(0)), indices[0], broadcast);2543 const auto y = loop::Broadcast(loop::Load(node->GetInDataAnchor(0)), indices[0], broadcast);
2544 const auto dy = loop::Broadcast(loop::Load(node->GetInDataAnchor(1)), indices[1], broadcast);2544 const auto dy = loop::Broadcast(loop::Load(node->GetInDataAnchor(1)), indices[1], broadcast);
2545 const auto dims_size = std::max(y_dims.size(), dy_dims.size());2545 const auto dims_size = std::max(y_dims.size(), dy_dims.size());
@@ -2578,7 +2578,7 @@ REGISTER_LOWERING(FusedMulAddN) {
2578 indices.emplace_back(input1_exp);2578 indices.emplace_back(input1_exp);
2579 indices.emplace_back(input2_exp);2579 indices.emplace_back(input2_exp);
2580 LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node,2580 LOWERING_WARN_RECORD_REASON(Broadcast(indices, broadcasted) == GRAPH_SUCCESS, node,
2581- "Failed to imply input broadcast");2581+ "Failed to apply input broadcast");
2582 auto x1 = loop::Broadcast(loop::Load(node->GetInDataAnchor(0)), indices[0], broadcasted);2582 auto x1 = loop::Broadcast(loop::Load(node->GetInDataAnchor(0)), indices[0], broadcasted);
2583 auto x2 = loop::Broadcast(loop::Load(node->GetInDataAnchor(1)), indices[1], broadcasted);2583 auto x2 = loop::Broadcast(loop::Load(node->GetInDataAnchor(1)), indices[1], broadcasted);
2584 auto x3 = loop::Broadcast(loop::Load(node->GetInDataAnchor(2)), indices[2], broadcasted);2584 auto x3 = loop::Broadcast(loop::Load(node->GetInDataAnchor(2)), indices[2], broadcasted);
@@ -2617,7 +2617,7 @@ REGISTER_LOWERING(L2Loss) {
2617REGISTER_LOWERING(BNInferenceD) {2617REGISTER_LOWERING(BNInferenceD) {
2618 LOWERING_WARN_RECORD_REASON((node->GetInDataAnchor(0) != nullptr && node->GetInDataAnchor(1) != nullptr &&2618 LOWERING_WARN_RECORD_REASON((node->GetInDataAnchor(0) != nullptr && node->GetInDataAnchor(1) != nullptr &&
2619 node->GetInDataAnchor(2) != nullptr),2619 node->GetInDataAnchor(2) != nullptr),
2620- node, "Exist one input is nullptr");2620+ node, "One of the inputs is nullptr");
2621 bool exist_scale = node->GetInDataAnchor(3) != nullptr && node->GetInDataAnchor(3)->GetPeerOutAnchor() != nullptr;2621 bool exist_scale = node->GetInDataAnchor(3) != nullptr && node->GetInDataAnchor(3)->GetPeerOutAnchor() != nullptr;
2622 bool exist_b = node->GetInDataAnchor(4) != nullptr && node->GetInDataAnchor(4)->GetPeerOutAnchor() != nullptr;2622 bool exist_b = node->GetInDataAnchor(4) != nullptr && node->GetInDataAnchor(4)->GetPeerOutAnchor() != nullptr;
2623 2623 
@@ -2735,7 +2735,8 @@ REGISTER_LOWERING(AscendQuant) {
2735 2735 
2736 int32_t dst_type = static_cast<int32_t>(ge::DT_INT8);2736 int32_t dst_type = static_cast<int32_t>(ge::DT_INT8);
2737 (void)AttrUtils::GetInt(node->GetOpDesc(), "dst_type", dst_type);2737 (void)AttrUtils::GetInt(node->GetOpDesc(), "dst_type", dst_type);
2738- LOWERING_WARN_RECORD_REASON(static_cast<ge::DataType>(dst_type) != ge::DT_BOOL, node, "Dst type no support bool.");2738+ LOWERING_WARN_RECORD_REASON(static_cast<ge::DataType>(dst_type) != ge::DT_BOOL, node,
2739+ "Dst type does not support bool.");
2739 2740 
2740 auto x = loop::Load(node->GetInDataAnchor(0));2741 auto x = loop::Load(node->GetInDataAnchor(0));
2741 std::ostringstream scale_oss;2742 std::ostringstream scale_oss;
@@ -88,7 +88,7 @@ graphStatus ConcatSliceSimplificationPass::HandleSlice(const NodePtr &node) {
88 88 
89 size_t input_index = std::numeric_limits<size_t>::max();89 size_t input_index = std::numeric_limits<size_t>::max();
90 if (!FindInput(concat_node, concat_dim, sizes, offsets, input_index)) {90 if (!FindInput(concat_node, concat_dim, sizes, offsets, input_index)) {
91- GELOGD("slice: %s does not from single source of concat", node->GetNamePtr());91+ GELOGD("slice: %s does not come from a single source of concat", node->GetNamePtr());
92 return GRAPH_SUCCESS;92 return GRAPH_SUCCESS;
93 }93 }
94 // replace node94 // replace node
@@ -289,7 +289,7 @@ graphStatus FlattenConcatPass::Run(const ComputeGraphPtr &graph) const {
289 if (!autofuse::AutoFuseConfig::LoweringConfig().experimental_lowering_concat) {289 if (!autofuse::AutoFuseConfig::LoweringConfig().experimental_lowering_concat) {
290 GELOGI(290 GELOGI(
291 "You can enable concat by setting AUTOFUSE_FLAGS=\"--autofuse_enable_pass=concat\" and unsetting "291 "You can enable concat by setting AUTOFUSE_FLAGS=\"--autofuse_enable_pass=concat\" and unsetting "
292- "AUTOFUS_FLAGS=\"--autofuse_disable_pass=concat\"");292+ "AUTOFUSE_FLAGS=\"--autofuse_disable_pass=concat\"");
293 return ge::GRAPH_SUCCESS;293 return ge::GRAPH_SUCCESS;
294 }294 }
295 GE_CHECK_NOTNULL(graph);295 GE_CHECK_NOTNULL(graph);
@@ -530,7 +530,7 @@ graphStatus SplitNodeCombine(const ComputeGraphPtr &graph, NodePtr &split_node)
530graphStatus FlattenSplitPass::Run(const ComputeGraphPtr &graph) {530graphStatus FlattenSplitPass::Run(const ComputeGraphPtr &graph) {
531 if (!autofuse::AutoFuseConfig::LoweringConfig().experimental_lowering_split) {531 if (!autofuse::AutoFuseConfig::LoweringConfig().experimental_lowering_split) {
532 GELOGI(532 GELOGI(
533- "you can enable split by setting AUTOFUSE_FLAGS=\"--autofuse_enable_pass=split\""533+ "you can enable split by setting AUTOFUSE_FLAGS=\"--autofuse_enable_pass=split\" "
534 "and unsetting AUTOFUSE_FLAGS=\"--autofuse_disable_pass=split\"");534 "and unsetting AUTOFUSE_FLAGS=\"--autofuse_disable_pass=split\"");
535 return ge::GRAPH_SUCCESS;535 return ge::GRAPH_SUCCESS;
536 }536 }
@@ -82,7 +82,7 @@ bool CheckShape(const NodePtr &node) {
82 82 
83bool NodeForwardFusionJudge(const NodePtr &node) {83bool NodeForwardFusionJudge(const NodePtr &node) {
84 if (GetFuseType(node) != "pointwise") {84 if (GetFuseType(node) != "pointwise") {
85- GELOGD("now node's is %s, which is not pointwise", node->GetType().c_str());85+ GELOGD("now node's type is %s, which is not pointwise", node->GetType().c_str());
86 return false;86 return false;
87 }87 }
88 if (node->GetInNodesSize() != 1 || node->GetOutNodesSize() != 1) {88 if (node->GetInNodesSize() != 1 || node->GetOutNodesSize() != 1) {
@@ -231,7 +231,7 @@ Status CandidateNodesElimination(const AscGraph &graph, std::unordered_map<NodeP
231 GELOGD("Generating CSE key for node %s", node->GetName().c_str());231 GELOGD("Generating CSE key for node %s", node->GetName().c_str());
232 GE_ASSERT_SUCCESS(GetCseKey(node, key));232 GE_ASSERT_SUCCESS(GetCseKey(node, key));
233 GELOGD("Generated CSE key for node %s", node->GetName().c_str());233 GELOGD("Generated CSE key for node %s", node->GetName().c_str());
234- GE_ASSERT_TRUE(!key.empty(), "node %s", node->GetName().c_str());234+ GE_ASSERT_TRUE(!key.empty(), "CSE key of node %s is empty", node->GetName().c_str());
235 auto iter = keys_to_node.find(key);235 auto iter = keys_to_node.find(key);
236 if (iter == keys_to_node.cend()) {236 if (iter == keys_to_node.cend()) {
237 keys_to_node[key] = node;237 keys_to_node[key] = node;
@@ -179,7 +179,7 @@ inline Status SelectOptimalLoopAxisByTransposeCount(
179 size_t &optimal_loop_axis_index) {179 size_t &optimal_loop_axis_index) {
180 GE_ASSERT_SUCCESS(FindOptimalTransposeCount(load_store_transpose_cnt, optimal_loop_axis_index));180 GE_ASSERT_SUCCESS(FindOptimalTransposeCount(load_store_transpose_cnt, optimal_loop_axis_index));
181 optimal_loop_axes = unique_loop_axes[optimal_loop_axis_index];181 optimal_loop_axes = unique_loop_axes[optimal_loop_axis_index];
182- GELOGI("slect optimal loop axes : %s.", AutofuseUtils::VectorToStr(optimal_loop_axes).c_str());182+ GELOGI("select optimal loop axes : %s.", AutofuseUtils::VectorToStr(optimal_loop_axes).c_str());
183 return SUCCESS;183 return SUCCESS;
184}184}
185 185 
@@ -276,7 +276,7 @@ class AutoFuseConfig {
276 int64_t value;276 int64_t value;
277 ss >> value;277 ss >> value;
278 if (ss.fail() || !ss.eof() || value > recomputation_max || value < 0) {278 if (ss.fail() || !ss.eof() || value > recomputation_max || value < 0) {
279- GELOGW("Recomputation threshold value is out of range");279+ GELOGW("Recomputation threshold value %ld is out of range, should be in [0, %ld]", value, recomputation_max);
280 recomputation_threshold = 1U;280 recomputation_threshold = 1U;
281 return;281 return;
282 }282 }
@@ -166,7 +166,7 @@ Status DeleteCastForDataTypeUnconsistantNode(const ge::ComputeGraphPtr &compute_
166 GE_ASSERT_NOTNULL(owner_graph);166 GE_ASSERT_NOTNULL(owner_graph);
167 GE_ASSERT_SUCCESS(GraphUtils::RemoveNodeWithoutRelink(owner_graph, node), "Remove node[%s][%s] failed.",167 GE_ASSERT_SUCCESS(GraphUtils::RemoveNodeWithoutRelink(owner_graph, node), "Remove node[%s][%s] failed.",
168 node->GetTypePtr(), node->GetNamePtr());168 node->GetTypePtr(), node->GetNamePtr());
169- GELOGI("Delete node:[%][%s] after autofuse", node->GetName().c_str(), node->GetType().c_str());169+ GELOGI("Delete node:[%s][%s] after autofuse", node->GetName().c_str(), node->GetType().c_str());
170 }170 }
171 }171 }
172 return GRAPH_SUCCESS;172 return GRAPH_SUCCESS;
@@ -203,7 +203,7 @@ Status AutofuseOptimize::PostProcess(const ge::ComputeGraphPtr &compute_graph) c
203 203 
204Status AutofuseOptimize::Run(const ge::ComputeGraphPtr &compute_graph, const std::vector<GeTensor> &inputs) const {204Status AutofuseOptimize::Run(const ge::ComputeGraphPtr &compute_graph, const std::vector<GeTensor> &inputs) const {
205 if (!IsEnableAutofuse()) {205 if (!IsEnableAutofuse()) {
206- GELOGI("Auto fuse env is disable, skip it.");206+ GELOGI("Auto fuse env is disabled, skip it.");
207 return GRAPH_SUCCESS;207 return GRAPH_SUCCESS;
208 }208 }
209 209 
@@ -513,7 +513,7 @@ class AscOpDynamicInput {
513 template <typename Container>513 template <typename Container>
514 AscOpDynamicInput<INPUT_INDEX> &AssignImpl(const Container &outputs) {514 AscOpDynamicInput<INPUT_INDEX> &AssignImpl(const Container &outputs) {
515 if (op_ == nullptr) {515 if (op_ == nullptr) {
516- GELOGE(FAILED, "op_ in null");516+ GELOGE(FAILED, "op_ is null");
517 return *this;517 return *this;
518 }518 }
519 if (inited_) {519 if (inited_) {
@@ -434,13 +434,13 @@ void GraphOptimize::TranFrameOp(const ComputeGraphPtr &compute_graph) const {
434 if (iter != local_framework_op_vec.end()) {434 if (iter != local_framework_op_vec.end()) {
435 // set - original_type435 // set - original_type
436 if (!AttrUtils::SetStr(op, ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE, op->GetType())) {436 if (!AttrUtils::SetStr(op, ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE, op->GetType())) {
437- GELOGW("TranFrameOp SetStr ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE failed");437+ GELOGW("TransFrameOp SetStr ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE failed");
438 }438 }
439 // set - framework_type439 // set - framework_type
440 // [No need to verify return value]440 // [No need to verify return value]
441 ge::OpDescUtilsEx::SetType(op, "FrameworkOp");441 ge::OpDescUtilsEx::SetType(op, "FrameworkOp");
442 if (!AttrUtils::SetInt(op, ATTR_NAME_FRAMEWORK_FWK_TYPE, domi::FrameworkType::TENSORFLOW)) {442 if (!AttrUtils::SetInt(op, ATTR_NAME_FRAMEWORK_FWK_TYPE, domi::FrameworkType::TENSORFLOW)) {
443- GELOGW("TranFrameOp SetInt ATTR_NAME_FRAMEWORK_FWK_TYPE failed");443+ GELOGW("TransFrameOp SetInt ATTR_NAME_FRAMEWORK_FWK_TYPE failed");
444 }444 }
445 }445 }
446 }446 }
@@ -59,7 +59,9 @@ Status MemLayoutConflictOptimizer::Run(ge::ComputeGraphPtr graph) {
59 }59 }
60 60 
61 // 只有对根图调用拓扑排序,才能遍历到所有的子图。子图上的子图也是挂在根图上的。61 // 只有对根图调用拓扑排序,才能遍历到所有的子图。子图上的子图也是挂在根图上的。
62- GE_ASSERT_SUCCESS(graph->TopologicalSorting(), "[Call][TopologicalSorting] for graph:%s failed.",62+ GE_ASSERT_SUCCESS(graph->TopologicalSorting(),
63+ "[Call][TopologicalSorting] for graph:%s failed before memory layout "
64+ "conflict optimize.",
63 graph->GetName().c_str());65 graph->GetName().c_str());
64 for (auto &static_graph : top_static_graphs) {66 for (auto &static_graph : top_static_graphs) {
65 GE_ASSERT_SUCCESS(CtrlNodeConflict::SolveCtrlNodeSubGraphConflict(static_graph),67 GE_ASSERT_SUCCESS(CtrlNodeConflict::SolveCtrlNodeSubGraphConflict(static_graph),
@@ -67,7 +69,9 @@ Status MemLayoutConflictOptimizer::Run(ge::ComputeGraphPtr graph) {
67 static_graph->GetName().c_str());69 static_graph->GetName().c_str());
68 }70 }
69 71 
70- GE_ASSERT_SUCCESS(graph->TopologicalSorting(), "[Call][TopologicalSorting] for graph:%s failed.",72+ GE_ASSERT_SUCCESS(graph->TopologicalSorting(),
73+ "[Call][TopologicalSorting] for graph:%s failed after memory layout "
74+ "conflict optimize.",
71 graph->GetName().c_str());75 graph->GetName().c_str());
72 for (auto &static_graph : top_static_graphs) {76 for (auto &static_graph : top_static_graphs) {
73 GE_ASSERT_SUCCESS(Process(static_graph), "static_graph: %s", static_graph->GetName().c_str());77 GE_ASSERT_SUCCESS(Process(static_graph), "static_graph: %s", static_graph->GetName().c_str());
@@ -103,13 +107,13 @@ Status MemLayoutConflictOptimizer::Process(ge::ComputeGraphPtr &graph) {
103 for (const auto &anchor_iter : ordered_symbol_to_anchors) {107 for (const auto &anchor_iter : ordered_symbol_to_anchors) {
104 NodeIndexIOVector all_nodes(anchor_iter.second.cbegin(), anchor_iter.second.cend());108 NodeIndexIOVector all_nodes(anchor_iter.second.cbegin(), anchor_iter.second.cend());
105 for (const auto &node_index_io : all_nodes) {109 for (const auto &node_index_io : all_nodes) {
106- GE_ASSERT_NOTNULL(MemLayoutConflictUtil::GetAnchorFromIndexIo(node_index_io), "node_index_io, %s",110+ GE_ASSERT_NOTNULL(MemLayoutConflictUtil::GetAnchorFromIndexIo(node_index_io),
107- node_index_io.ToString().c_str());111+ "[Optimizer][Call][GetAnchorFromIndexIo] node_index_io, %s", node_index_io.ToString().c_str());
108 }112 }
109 113 
110 AnchorSet conflict_set;114 AnchorSet conflict_set;
111 GE_ASSERT_SUCCESS(MemLayoutConflictUtil::FindConflictNodes(all_nodes, conflict_set, graph_info, checker_),115 GE_ASSERT_SUCCESS(MemLayoutConflictUtil::FindConflictNodes(all_nodes, conflict_set, graph_info, checker_),
112- "[Call][FindConflictNodes] for graph:%s, symbol: %s, is_root_graph_static: %d, "116+ "[Optimizer][Call][FindConflictNodes] for graph:%s, symbol: %s, is_root_graph_static: %d, "
113 "is_feature_map_refreshable: %d, is_physical_memory_refreshable: %d",117 "is_feature_map_refreshable: %d, is_physical_memory_refreshable: %d",
114 graph->GetName().c_str(), anchor_iter.first.c_str(), graph_info.is_root_graph_static,118 graph->GetName().c_str(), anchor_iter.first.c_str(), graph_info.is_root_graph_static,
115 graph_info.is_feature_map_refreshable, graph_info.is_physical_memory_refreshable);119 graph_info.is_feature_map_refreshable, graph_info.is_physical_memory_refreshable);
@@ -269,7 +269,7 @@ OutputRWType GetOutputRWTypeByIndex(const NodePtr &node, uint32_t index, bool us
269 std::unordered_map<uint32_t, OutputRWType>::const_iterator index_2_output_rw_type =269 std::unordered_map<uint32_t, OutputRWType>::const_iterator index_2_output_rw_type =
270 iter->second.output_rw_type_map.find(index);270 iter->second.output_rw_type_map.find(index);
271 if (index_2_output_rw_type == iter->second.output_rw_type_map.cend()) {271 if (index_2_output_rw_type == iter->second.output_rw_type_map.cend()) {
272- GELOGW("Cannot find rw type of node %s from map.It could take some effect on following preprocess.",272+ GELOGW("Cannot find rw type of node %s from map. It could take some effect on following preprocess.",
273 output_node_vec.at(0)->GetName().c_str());273 output_node_vec.at(0)->GetName().c_str());
274 return OutputRWType::kInvalidRWType;274 return OutputRWType::kInvalidRWType;
275 }275 }
@@ -375,14 +375,14 @@ InputRWType GetInputRWTypeByIndex(const NodePtr &node, uint32_t index, bool use_
375 std::unordered_map<std::string, NodeInputOutputRWType>::const_iterator iter =375 std::unordered_map<std::string, NodeInputOutputRWType>::const_iterator iter =
376 node_rwtype_map_.find(data_op_desc->GetName());376 node_rwtype_map_.find(data_op_desc->GetName());
377 if (iter == node_rwtype_map_.cend()) {377 if (iter == node_rwtype_map_.cend()) {
378- GELOGW("Cannot find rw type of node %s from map.It could take some effect on following preprocess.",378+ GELOGW("Cannot find rw type of node %s from map. It could take some effect on following preprocess.",
379 data_op_desc->GetName().c_str());379 data_op_desc->GetName().c_str());
380 return InputRWType::kInvalidRWType;380 return InputRWType::kInvalidRWType;
381 }381 }
382 std::unordered_map<uint32_t, InputRWType>::const_iterator input_rw_type =382 std::unordered_map<uint32_t, InputRWType>::const_iterator input_rw_type =
383 iter->second.input_rw_type_map.find(out_data_anchor->GetIdx());383 iter->second.input_rw_type_map.find(out_data_anchor->GetIdx());
384 if (input_rw_type == iter->second.input_rw_type_map.cend()) {384 if (input_rw_type == iter->second.input_rw_type_map.cend()) {
385- GELOGW("Cannot find rw type of node %s from map.It could take some effect on following preprocess.",385+ GELOGW("Cannot find rw type of node %s from map. It could take some effect on following preprocess.",
386 data_op_desc->GetName().c_str());386 data_op_desc->GetName().c_str());
387 return InputRWType::kInvalidRWType;387 return InputRWType::kInvalidRWType;
388 }388 }
@@ -410,7 +410,7 @@ Status IsOutputRwConfilctAmongSubGraph(const NodePtr &parent_node, uint32_t pare
410 uint32_t peer_index = static_cast<uint32_t>(peer_out_anchor->GetIdx());410 uint32_t peer_index = static_cast<uint32_t>(peer_out_anchor->GetIdx());
411 auto peer_rw_type = GetOutputRWTypeByIndex(peer_node, peer_index);411 auto peer_rw_type = GetOutputRWTypeByIndex(peer_node, peer_index);
412 if (peer_rw_type == OutputRWType::kReadOnly) {412 if (peer_rw_type == OutputRWType::kReadOnly) {
413- GELOGD("SubGrpah[%s] with output parent_index %u has ReadOnly OutputRWType", sub_graph_name.c_str(),413+ GELOGD("SubGraph[%s] with output parent_index %u has ReadOnly OutputRWType", sub_graph_name.c_str(),
414 parent_index);414 parent_index);
415 is_conflict = true;415 is_conflict = true;
416 return ge::SUCCESS;416 return ge::SUCCESS;
@@ -427,7 +427,7 @@ bool JudgeOptimizableByParentNode(const NodePtr &parent_node, uint32_t parent_in
427 // 此PASS需要扩大到所有除While之外的所有控制节点类型,如果某一个子图中某一个输出是可写,其他任一子图对应的相同index输出是可读,427 // 此PASS需要扩大到所有除While之外的所有控制节点类型,如果某一个子图中某一个输出是可写,其他任一子图对应的相同index输出是可读,
428 // 则认为是“读写冲突”,需要后续;流程中插入identity节点,避免“读写冲突”428 // 则认为是“读写冲突”,需要后续;流程中插入identity节点,避免“读写冲突”
429 if (parent_node->GetOpDesc()->GetSubgraphInstanceNames().size() > 1U) {429 if (parent_node->GetOpDesc()->GetSubgraphInstanceNames().size() > 1U) {
430- GELOGD("JudgeOptimizableByParentNode: Check node %s[%s] with output RwConfilct among subGraph ",430+ GELOGD("JudgeOptimizableByParentNode: Check node %s[%s] with output RWConflict among subGraph ",
431 parent_node->GetName().c_str(), parent_node->GetType().c_str());431 parent_node->GetName().c_str(), parent_node->GetType().c_str());
432 bool is_conflict = false;432 bool is_conflict = false;
433 if (IsOutputRwConfilctAmongSubGraph(parent_node, parent_index, is_conflict) == SUCCESS) {433 if (IsOutputRwConfilctAmongSubGraph(parent_node, parent_index, is_conflict) == SUCCESS) {
@@ -976,7 +976,7 @@ Status GraphOptimize::CheckRWConflict(ComputeGraphPtr &compute_graph, bool &has_
976 continue;976 continue;
977 case ConflictResult::WRONG_GRAPH:977 case ConflictResult::WRONG_GRAPH:
978 has_conflict = true;978 has_conflict = true;
979- GELOGI("Node %s output rw type is %s, next node %s input_rw_type is %s.It is wrong graph.",979+ GELOGI("Node %s output rw type is %s, next node %s input_rw_type is %s. It is wrong graph.",
980 node->GetName().c_str(), OutputRWTypeToSerialString(output_rw_type).c_str(),980 node->GetName().c_str(), OutputRWTypeToSerialString(output_rw_type).c_str(),
981 peer_in_node->GetName().c_str(), InputRWTypeToSerialString(input_rw_type).c_str());981 peer_in_node->GetName().c_str(), InputRWTypeToSerialString(input_rw_type).c_str());
982 return SUCCESS;982 return SUCCESS;
@@ -49,14 +49,14 @@ graphStatus InferShape4GatherShapes(gert::InferSymbolShapeContext *context) {
49 GE_ASSERT_NOTNULL(data);49 GE_ASSERT_NOTNULL(data);
50 const auto input_index = *data;50 const auto input_index = *data;
51 GE_ASSERT(input_index < context->GetComputeNodeInputNum(),51 GE_ASSERT(input_index < context->GetComputeNodeInputNum(),
52- "Node %s input_index[%lu] must less than input num[%zu],"52+ "Node %s input_index[%lu] must be less than input num[%zu],"
53 " i: %zu",53 " i: %zu",
54 context->GetNodeName(), input_index, context->GetComputeNodeInputNum(), i);54 context->GetNodeName(), input_index, context->GetComputeNodeInputNum(), i);
55 const auto dim_index = *(data + 1U);55 const auto dim_index = *(data + 1U);
56 auto in_shape = context->GetInputSymbolShape(input_index);56 auto in_shape = context->GetInputSymbolShape(input_index);
57 GE_UNSUPPORTED_IF_NULL(in_shape);57 GE_UNSUPPORTED_IF_NULL(in_shape);
58 GE_ASSERT(dim_index < in_shape->GetDimNum(),58 GE_ASSERT(dim_index < in_shape->GetDimNum(),
59- "Node %s dim_index[%lu] must less than input shape"59+ "Node %s dim_index[%lu] must be less than input shape"
60 " dim number[%zu], i: %zu",60 " dim number[%zu], i: %zu",
61 context->GetNodeName(), dim_index, in_shape->GetDimNum(), i);61 context->GetNodeName(), dim_index, in_shape->GetDimNum(), i);
62 }62 }
@@ -56,13 +56,13 @@ graphStatus GatherCommonInfer(gert::InferSymbolShapeContext *context, const gert
56 real_in_shape.AppendDim(Symbol(1));56 real_in_shape.AppendDim(Symbol(1));
57 in_real_dim_cnt = 1;57 in_real_dim_cnt = 1;
58 }58 }
59- GE_ASSERT_TRUE(in_real_dim_cnt >= 1, "in_real_dim_cnt:%d must be greater than 1", in_real_dim_cnt);59+ GE_ASSERT_TRUE(in_real_dim_cnt >= 1, "in_real_dim_cnt:%d must be greater than or equal to 1", in_real_dim_cnt);
60 GE_ASSERT_TRUE(batch_dims < in_real_dim_cnt, "batch_dims:%d must be less than rank x:%d", batch_dims,60 GE_ASSERT_TRUE(batch_dims < in_real_dim_cnt, "batch_dims:%d must be less than rank x:%d", batch_dims,
61 in_real_dim_cnt);61 in_real_dim_cnt);
62 // todo 添加guard in_shape和indies_shape前batch_dims的维度相同62 // todo 添加guard in_shape和indies_shape前batch_dims的维度相同
63 GE_ASSERT_TRUE(CheckAndUpdateAxis(axis, in_real_dim_cnt), "axis:%d is invalid, in_real_dim_cnt:%d", axis,63 GE_ASSERT_TRUE(CheckAndUpdateAxis(axis, in_real_dim_cnt), "axis:%d is invalid, in_real_dim_cnt:%d", axis,
64 in_real_dim_cnt);64 in_real_dim_cnt);
65- GE_ASSERT_TRUE(batch_dims <= axis, "batch_dims:%d is must be less or equal to axis:%d", batch_dims, axis);65+ GE_ASSERT_TRUE(batch_dims <= axis, "batch_dims:%d must be less than or equal to axis:%d", batch_dims, axis);
66 const auto out_shape = context->GetOutputSymbolShape(0);66 const auto out_shape = context->GetOutputSymbolShape(0);
67 GE_ASSERT_NOTNULL(out_shape);67 GE_ASSERT_NOTNULL(out_shape);
68 for (int64_t i = 0; i < axis; i++) {68 for (int64_t i = 0; i < axis; i++) {
@@ -108,14 +108,14 @@ graphStatus InferShape4BatchMatMulV2(gert::InferSymbolShapeContext *context) {
108 auto shape_x1 = context->GetInputSymbolShape(0);108 auto shape_x1 = context->GetInputSymbolShape(0);
109 GE_UNSUPPORTED_IF_NULL(shape_x1);109 GE_UNSUPPORTED_IF_NULL(shape_x1);
110 auto dim_num_x1 = shape_x1->GetDimNum();110 auto dim_num_x1 = shape_x1->GetDimNum();
111- GE_ASSERT_TRUE(dim_num_x1 >= 1 && dim_num_x1 <= kBatchMatMulMaxDimNum,111+ GE_ASSERT_TRUE(dim_num_x1 >= 1 && dim_num_x1 <= kBatchMatMulMaxDimNum, "X1 invalid, dim_num: %zu must be in [1, 8]",
112- "X1 invalid, dim_num: %zu must in must in [1, 8]", dim_num_x1);112+ dim_num_x1);
113 113 
114 auto shape_x2 = context->GetInputSymbolShape(1);114 auto shape_x2 = context->GetInputSymbolShape(1);
115 GE_UNSUPPORTED_IF_NULL(shape_x2);115 GE_UNSUPPORTED_IF_NULL(shape_x2);
116 auto dim_num_x2 = shape_x2->GetDimNum();116 auto dim_num_x2 = shape_x2->GetDimNum();
117- GE_ASSERT_TRUE(dim_num_x2 >= 1 && dim_num_x2 <= kBatchMatMulMaxDimNum,117+ GE_ASSERT_TRUE(dim_num_x2 >= 1 && dim_num_x2 <= kBatchMatMulMaxDimNum, "X2 invalid, dim_num: %zu must be in [1, 8]",
118- "X2 invalid, dim_num: %zu must in must in [1, 8]", dim_num_x2);118+ dim_num_x2);
119 119 
120 auto shape_out = context->GetOutputSymbolShape(0);120 auto shape_out = context->GetOutputSymbolShape(0);
121 GE_ASSERT_NOTNULL(shape_out);121 GE_ASSERT_NOTNULL(shape_out);
@@ -94,7 +94,7 @@ graphStatus InferShape4Unpack(gert::InferSymbolShapeContext *context) {
94 size_t input_x_dim_size = input_x_shape->GetDimNum();94 size_t input_x_dim_size = input_x_shape->GetDimNum();
95 const int64_t real_axis = (*axis_ptr >= 0 ? *axis_ptr : *axis_ptr + static_cast<int64_t>(input_x_dim_size));95 const int64_t real_axis = (*axis_ptr >= 0 ? *axis_ptr : *axis_ptr + static_cast<int64_t>(input_x_dim_size));
96 if (real_axis < 0 || real_axis >= static_cast<int64_t>(input_x_dim_size)) {96 if (real_axis < 0 || real_axis >= static_cast<int64_t>(input_x_dim_size)) {
97- GELOGE(PARAM_INVALID, "invalid axis=%d but input_x_shape is %d", *axis_ptr, input_x_shape);97+ GELOGE(PARAM_INVALID, "invalid axis=%d but input_x_dim_size is %zu", *axis_ptr, input_x_shape->GetDimNum());
98 return PARAM_INVALID;98 return PARAM_INVALID;
99 }99 }
100 for (size_t i = 0; i < static_cast<size_t>(*num); ++i) {100 for (size_t i = 0; i < static_cast<size_t>(*num); ++i) {
@@ -105,7 +105,7 @@ graphStatus PadV3InferShape(const gert::InferSymbolShapeContext *context, const
105 const auto paddings_contiguous = attrs->GetAttrPointer<bool>(1);105 const auto paddings_contiguous = attrs->GetAttrPointer<bool>(1);
106 GE_ASSERT_NOTNULL(paddings_contiguous);106 GE_ASSERT_NOTNULL(paddings_contiguous);
107 const size_t input_dim_size = x_shape->GetDimNum();107 const size_t input_dim_size = x_shape->GetDimNum();
108- GE_ASSERT(input_dim_size != 0UL, "input shape cannot empty");108+ GE_ASSERT(input_dim_size != 0UL, "input shape cannot be empty");
109 const auto paddings_size = paddings_tensor->GetSymbolicValue()->size();109 const auto paddings_size = paddings_tensor->GetSymbolicValue()->size();
110 GE_ASSERT(paddings_size > 0UL, "Invalid paddings, must be non-empty!");110 GE_ASSERT(paddings_size > 0UL, "Invalid paddings, must be non-empty!");
111 111 
@@ -136,7 +136,7 @@ graphStatus InferShape4PadV3(gert::InferSymbolShapeContext *context) {
136 GE_ASSERT_NOTNULL(paddings_desc);136 GE_ASSERT_NOTNULL(paddings_desc);
137 const auto paddings_dtype = paddings_desc->GetDataType();137 const auto paddings_dtype = paddings_desc->GetDataType();
138 GE_ASSERT(paddings_dtype == DT_INT32 || paddings_dtype == DT_INT64,138 GE_ASSERT(paddings_dtype == DT_INT32 || paddings_dtype == DT_INT64,
139- "paddings data type must is int32 or int64, it is %d", paddings_dtype);139+ "paddings data type must be int32 or int64, it is %d", paddings_dtype);
140 return PadV3InferShape(context, x_shape, paddings_tensor, y_shape);140 return PadV3InferShape(context, x_shape, paddings_tensor, y_shape);
141}141}
142 142 
@@ -44,7 +44,7 @@ graphStatus InferShape4ReduceCommon(gert::InferSymbolShapeContext *context) {
44 auto input1_desc = context->GetInputDesc(1);44 auto input1_desc = context->GetInputDesc(1);
45 GE_ASSERT_NOTNULL(input1_desc);45 GE_ASSERT_NOTNULL(input1_desc);
46 auto dtype = input1_desc->GetDataType();46 auto dtype = input1_desc->GetDataType();
47- GE_ASSERT(dtype == DT_INT32 || dtype == DT_INT64, "axes datatype %s, must in (DT_INT32DT_INT64)",47+ GE_ASSERT(dtype == DT_INT32 || dtype == DT_INT64, "axes datatype %s, must in (DT_INT32, DT_INT64)",
48 TypeUtils::DataTypeToSerialString(dtype).c_str());48 TypeUtils::DataTypeToSerialString(dtype).c_str());
49 if (dtype == DT_INT32) {49 if (dtype == DT_INT32) {
50 return SymbolicInferUtil::ReduceDims<int32_t>(in_shape, axes_tensor, axes_size, *keep_dims, out_shape);50 return SymbolicInferUtil::ReduceDims<int32_t>(in_shape, axes_tensor, axes_size, *keep_dims, out_shape);
@@ -188,7 +188,7 @@ graphStatus InferShape4LayerNormV3(gert::InferSymbolShapeContext *context) {
188 if (begin_norm_axis < 0 || static_cast<size_t>(begin_norm_axis) >= real_dim_num) {188 if (begin_norm_axis < 0 || static_cast<size_t>(begin_norm_axis) >= real_dim_num) {
189 GELOGE(PARAM_INVALID,189 GELOGE(PARAM_INVALID,
190 "the op layernormv3 does not support beginNormAxis"190 "the op layernormv3 does not support beginNormAxis"
191- "(%ld) large than shape dims(%lu)",191+ "(%ld) larger than shape dims(%lu)",
192 begin_norm_axis, real_dim_num);192 begin_norm_axis, real_dim_num);
193 return ge::PARAM_INVALID;193 return ge::PARAM_INVALID;
194 }194 }
@@ -32,7 +32,7 @@ graphStatus InferShape4Select(gert::InferSymbolShapeContext *context) {
32 GE_UNSUPPORTED_IF_NULL(in_shape2);32 GE_UNSUPPORTED_IF_NULL(in_shape2);
33 // 添加guard校验in_shape1和in_shape2相等33 // 添加guard校验in_shape1和in_shape2相等
34 GE_ASSERT_TRUE(in_shape1->GetDimNum() == in_shape2->GetDimNum(),34 GE_ASSERT_TRUE(in_shape1->GetDimNum() == in_shape2->GetDimNum(),
35- "Input1 dim num %zu shpuld equal to Input2 dim num: %zu of Select node", in_shape1->GetDimNum(),35+ "Input1 dim num %zu should equal to Input2 dim num: %zu of Select node", in_shape1->GetDimNum(),
36 in_shape2->GetDimNum());36 in_shape2->GetDimNum());
37 for (size_t i = 0UL; i < in_shape1->GetDimNum(); i++) {37 for (size_t i = 0UL; i < in_shape1->GetDimNum(); i++) {
38 ASSERT_SYMBOL_EQ(in_shape1->GetDim(i), in_shape2->GetDim(i));38 ASSERT_SYMBOL_EQ(in_shape1->GetDim(i), in_shape2->GetDim(i));
@@ -81,8 +81,8 @@ graphStatus InferShape4SparseToDense(gert::InferSymbolShapeContext *context) {
81 }81 }
82 dim_num = (dim_num > 0) ? dim_num : 1;82 dim_num = (dim_num > 0) ? dim_num : 1;
83 auto value_num = input1_tensor->GetSymbolicValue()->size();83 auto value_num = input1_tensor->GetSymbolicValue()->size();
84- GE_ASSERT(static_cast<size_t>(dim_num) <= value_num, "dim_num[%ld] should less than value_num[zu], node %s", dim_num,84+ GE_ASSERT(static_cast<size_t>(dim_num) <= value_num, "dim_num[%ld] should be less than value_num[%zu], node %s",
85- value_num, context->GetNodeName());85+ dim_num, value_num, context->GetNodeName());
86 86 
87 for (int64_t i = 0; i < dim_num; i++) {87 for (int64_t i = 0; i < dim_num; i++) {
88 auto dim_expr = input1_tensor->GetSymbolicValue()->at(i);88 auto dim_expr = input1_tensor->GetSymbolicValue()->at(i);
@@ -143,7 +143,9 @@ graphStatus GetSplitVInput(gert::InferSymbolShapeContext *context, int64_t &num_
143 return UNSUPPORTED;143 return UNSUPPORTED;
144 }144 }
145 auto in_tensor1_exprs = *in_tensor1->GetSymbolicValue();145 auto in_tensor1_exprs = *in_tensor1->GetSymbolicValue();
146- GE_ASSERT_TRUE(static_cast<int64_t>(in_tensor1_exprs.size()) == num_split, "tensorSize");146+ GE_ASSERT_TRUE(static_cast<int64_t>(in_tensor1_exprs.size()) == num_split,
147+ "in_tensor1 exprs size [%ld] mismatch num_split [%ld]", static_cast<int64_t>(in_tensor1_exprs.size()),
148+ num_split);
147 for (auto &expr : in_tensor1_exprs) {149 for (auto &expr : in_tensor1_exprs) {
148 int64_t expr_value = 0;150 int64_t expr_value = 0;
149 if (expr.GetConstValue(expr_value) == false) {151 if (expr.GetConstValue(expr_value) == false) {
@@ -211,8 +211,8 @@ Status SymbolizeInputValue(const GeTensor &tensor, int32_t data_index, const Nod
211 if (SupportSymbolizeValue(tensor) && value_dependent_idxs.count(static_cast<size_t>(data_index)) > 0U) {211 if (SupportSymbolizeValue(tensor) && value_dependent_idxs.count(static_cast<size_t>(data_index)) > 0U) {
212 const int64_t shape_size = tensor.GetTensorDesc().GetShape().GetShapeSize();212 const int64_t shape_size = tensor.GetTensorDesc().GetShape().GetShapeSize();
213 if (shape_size >= 0 && shape_size <= kMaxSymbolizeValueElemNum) {213 if (shape_size >= 0 && shape_size <= kMaxSymbolizeValueElemNum) {
214- GELOGI("symbolize input[%d] value from real host data, data size %zu.", data_index, data_node->GetNamePtr(),214+ GELOGI("symbolize input[%d] value of node %s from real host data, data size %zu.", data_index,
215- tensor.GetData().size());215+ data_node->GetNamePtr(), tensor.GetData().size());
216 const auto dtype = tensor.GetTensorDesc().GetDataType();216 const auto dtype = tensor.GetTensorDesc().GetDataType();
217 switch (dtype) {217 switch (dtype) {
218 case DT_INT32:218 case DT_INT32:
@@ -33,7 +33,7 @@ bool GetElementNum(const std::vector<ge::Expression> &dims_symbols, int64_t &ele
33 return false;33 return false;
34 }34 }
35 if (ge::MulOverflow(element_num, dim_value, element_num)) {35 if (ge::MulOverflow(element_num, dim_value, element_num)) {
36- GELOGW("SymbolicKernel compute unsupported, reason: output element num over flow, node %s[%s].",36+ GELOGW("SymbolicKernel compute unsupported, reason: output element num overflow, node %s[%s].",
37 context->GetNodeName(), context->GetNodeType());37 context->GetNodeName(), context->GetNodeType());
38 return false;38 return false;
39 }39 }
@@ -99,7 +99,7 @@ graphStatus NormalizeInput(gert::InferSymbolComputeContext *context, const std::
99 batch_dims = batch_dims < 0 ? batch_dims + static_cast<int64_t>(indice_dims.size()) : batch_dims;99 batch_dims = batch_dims < 0 ? batch_dims + static_cast<int64_t>(indice_dims.size()) : batch_dims;
100 GE_ASSERT_TRUE(100 GE_ASSERT_TRUE(
101 batch_dims <= axis,101 batch_dims <= axis,
102- "SymbolicKernel compute failed, reason: batch_dims:%ld is must be less or equal to axis:%ld, node %s[%s].",102+ "SymbolicKernel compute failed, reason: batch_dims:%ld must be less than or equal to axis:%ld, node %s[%s].",
103 batch_dims, axis, context->GetNodeName(), context->GetNodeType());103 batch_dims, axis, context->GetNodeName(), context->GetNodeType());
104 return GRAPH_SUCCESS;104 return GRAPH_SUCCESS;
105}105}
@@ -126,10 +126,11 @@ graphStatus CalOutputSymbolValue(gert::InferSymbolComputeContext *context, const
126 for (int64_t j = 0L; j < block_num; j++) {126 for (int64_t j = 0L; j < block_num; j++) {
127 for (int64_t k = 0L; k < indice_block_size; k++) {127 for (int64_t k = 0L; k < indice_block_size; k++) {
128 int64_t gather_index = indice_values[static_cast<size_t>(k + indice_block_size * i)];128 int64_t gather_index = indice_values[static_cast<size_t>(k + indice_block_size * i)];
129- GE_ASSERT_TRUE(gather_index < param_dims[static_cast<size_t>(axis)],129+ GE_ASSERT_TRUE(
130- "SymbolicKernel compute failed, reason: indice index:%lld should less than axis:%lld dim:%lld, "130+ gather_index < param_dims[static_cast<size_t>(axis)],
131- "node %s[%s].",131+ "SymbolicKernel compute failed, reason: indice index:%lld should be less than axis:%lld dim:%lld, "
132- gather_index, axis, param_dims[axis], context->GetNodeName(), context->GetNodeType());132+ "node %s[%s].",
133+ gather_index, axis, param_dims[axis], context->GetNodeName(), context->GetNodeType());
133 const auto start_iter =134 const auto start_iter =
134 param_values.begin() +135 param_values.begin() +
135 (i * outer_block_size + (j * param_dims[static_cast<size_t>(axis)] + gather_index) * block_size);136 (i * outer_block_size + (j * param_dims[static_cast<size_t>(axis)] + gather_index) * block_size);
@@ -223,7 +223,7 @@ void GetShrinkAxisIndex(const int64_t shrink_axis_mask, const std::pair<int64_t,
223Status HandleShrinkAxisShape(const std::set<int64_t> &shrink_axis_indexes, StrdedSliceIndexInputs &index_input) {223Status HandleShrinkAxisShape(const std::set<int64_t> &shrink_axis_indexes, StrdedSliceIndexInputs &index_input) {
224 for (const auto &shrink_axis_id : shrink_axis_indexes) {224 for (const auto &shrink_axis_id : shrink_axis_indexes) {
225 GE_ASSERT_TRUE((shrink_axis_id < static_cast<int64_t>(index_input.start_indexes.size())) && (shrink_axis_id >= 0));225 GE_ASSERT_TRUE((shrink_axis_id < static_cast<int64_t>(index_input.start_indexes.size())) && (shrink_axis_id >= 0));
226- GELOGI("Change strideslice index to [%lld, %lld, 1] of dim[%lld]", index_input.start_indexes[shrink_axis_id],226+ GELOGI("Change StridedSlice index to [%lld, %lld, 1] of dim[%lld]", index_input.start_indexes[shrink_axis_id],
227 index_input.end_indexes[shrink_axis_id], shrink_axis_id);227 index_input.end_indexes[shrink_axis_id], shrink_axis_id);
228 index_input.end_indexes[shrink_axis_id] = index_input.start_indexes[shrink_axis_id] + 1;228 index_input.end_indexes[shrink_axis_id] = index_input.start_indexes[shrink_axis_id] + 1;
229 index_input.strides_indexes[shrink_axis_id] = 1;229 index_input.strides_indexes[shrink_axis_id] = 1;
@@ -509,7 +509,7 @@ Status BaseCluster::BuildPartitionFrame() {
509 "[Call][SetSubgraphInstanceName] for op:%s failed, index:0, name:%s.",509 "[Call][SetSubgraphInstanceName] for op:%s failed, index:0, name:%s.",
510 partitioned_op->GetName().c_str(), subgraph_->GetName().c_str());510 partitioned_op->GetName().c_str(), subgraph_->GetName().c_str());
511 GE_CHK_STATUS_RET(BuildPartitionNodes(partitioned_op),511 GE_CHK_STATUS_RET(BuildPartitionNodes(partitioned_op),
512- "[Call][SetSubgraphInstanceName] for op:%s failed, index:0, name:%s.",512+ "[Call][BuildPartitionNodes] for op:%s failed, index:0, name:%s.",
513 partitioned_op->GetName().c_str(), subgraph_->GetName().c_str());513 partitioned_op->GetName().c_str(), subgraph_->GetName().c_str());
514 partition_node_ = AddPartitionedCallKeepTopo(graph, nodes_, partitioned_op);514 partition_node_ = AddPartitionedCallKeepTopo(graph, nodes_, partitioned_op);
515 GE_ASSERT_NOTNULL(partition_node_, "[Add][Node] %s to graph:%s failed.", partitioned_op->GetName().c_str(),515 GE_ASSERT_NOTNULL(partition_node_, "[Add][Node] %s to graph:%s failed.", partitioned_op->GetName().c_str(),
@@ -517,7 +517,7 @@ Status BaseCluster::BuildPartitionFrame() {
517 GE_CHK_GRAPH_STATUS_RET(partition_node_->SetOwnerComputeGraph(graph),517 GE_CHK_GRAPH_STATUS_RET(partition_node_->SetOwnerComputeGraph(graph),
518 "[Set][OwnerComputeGraph] %s for node:%s failed.", graph->GetName().c_str(),518 "[Set][OwnerComputeGraph] %s for node:%s failed.", graph->GetName().c_str(),
519 partitioned_op->GetName().c_str());519 partitioned_op->GetName().c_str());
520- GE_CHK_STATUS_RET(RemoveNodeFromRoot(graph), "[Call][SetSubgraphInstanceName] for op:%s failed, index:0, name:%s.",520+ GE_CHK_STATUS_RET(RemoveNodeFromRoot(graph), "[Call][RemoveNodeFromRoot] for op:%s failed, index:0, name:%s.",
521 partitioned_op->GetName().c_str(), subgraph_->GetName().c_str());521 partitioned_op->GetName().c_str(), subgraph_->GetName().c_str());
522 subgraph_->SetParentNode(partition_node_);522 subgraph_->SetParentNode(partition_node_);
523 subgraph_->SetParentGraph(graph);523 subgraph_->SetParentGraph(graph);
@@ -250,7 +250,7 @@ Status DynamicShapePartitioner::IsGraphNeedUnknownShapePartition(bool &need_unkn
250 return SUCCESS;250 return SUCCESS;
251 }251 }
252 252 
253- GE_CHK_STATUS_RET(MarkUnknownShapeNodes(), "[Call][MarkUnknownShapeNodes] failed, root grah name:%s.",253+ GE_CHK_STATUS_RET(MarkUnknownShapeNodes(), "[Call][MarkUnknownShapeNodes] failed, root graph name:%s.",
254 GetRootGraph()->GetName().c_str());254 GetRootGraph()->GetName().c_str());
255 // 动态节点支持no tiling时:255 // 动态节点支持no tiling时:
256 // 1. 若是子图分档场景,则必须要走静态图;256 // 1. 若是子图分档场景,则必须要走静态图;
@@ -372,7 +372,7 @@ Status DynamicShapePartitioner::GetMultiBatchIndependCompileGraphs(const Compute
372 bool enable_dynamic_batch = false;372 bool enable_dynamic_batch = false;
373 (void)ge::AttrUtils::GetBool(compute_graph, "_enable_dynamic_batch", enable_dynamic_batch);373 (void)ge::AttrUtils::GetBool(compute_graph, "_enable_dynamic_batch", enable_dynamic_batch);
374 if (!enable_dynamic_batch) {374 if (!enable_dynamic_batch) {
375- GELOGI("No need to partited graph for no multi batch graph.");375+ GELOGI("No need to partition graph for no multi batch graph.");
376 return SUCCESS;376 return SUCCESS;
377 }377 }
378 for (const auto &node : compute_graph->GetDirectNode()) {378 for (const auto &node : compute_graph->GetDirectNode()) {
@@ -557,7 +557,7 @@ Status DynamicShapePartitioner::PruneUniqueClusters() {
557}557}
558 558 
559Status DynamicShapePartitioner::GenerateCluster() {559Status DynamicShapePartitioner::GenerateCluster() {
560- GE_CHK_STATUS_RET(MarkUnknownShapeNodes(), "[Call][MarkUnknownShapeNodes] failed, root grah name:%s.",560+ GE_CHK_STATUS_RET(MarkUnknownShapeNodes(), "[Call][MarkUnknownShapeNodes] failed, root graph name:%s.",
561 GetRootGraph()->GetName().c_str());561 GetRootGraph()->GetName().c_str());
562 GE_CHK_STATUS_RET(InitClusters(), "[Init][Clusters] failed, graph:%s.", GetRootGraph()->GetName().c_str());562 GE_CHK_STATUS_RET(InitClusters(), "[Init][Clusters] failed, graph:%s.", GetRootGraph()->GetName().c_str());
563 GE_CHK_STATUS_RET(MergeClusters(), "[Merge][Clusters] failed, graph:%s.", GetRootGraph()->GetName().c_str());563 GE_CHK_STATUS_RET(MergeClusters(), "[Merge][Clusters] failed, graph:%s.", GetRootGraph()->GetName().c_str());
@@ -744,7 +744,7 @@ Status DynamicShapePartitioner::MergeClustersInputData() {
744 GE_ASSERT_NOTNULL(dynamic_shape_cluster, "[Cast][Cluster] to DynamicShapeCluster failed.");744 GE_ASSERT_NOTNULL(dynamic_shape_cluster, "[Cast][Cluster] to DynamicShapeCluster failed.");
745 cluster_pre = dynamic_shape_cluster;745 cluster_pre = dynamic_shape_cluster;
746 }746 }
747- GELOGD("Success merge input node cluster from %lu to %lu.", cluster->Id(), cluster->Id());747+ GELOGD("Successfully merged input node cluster from %lu to %lu.", cluster->Id(), cluster->Id());
748 for (const auto &node : cluster->Nodes()) {748 for (const auto &node : cluster->Nodes()) {
749 SetCluster(node, cluster_pre);749 SetCluster(node, cluster_pre);
750 }750 }
@@ -771,7 +771,7 @@ Status DynamicShapePartitioner::TryMergeClusters(const ClusterFilter &cluster_fi
771 continue;771 continue;
772 }772 }
773 if (cluster->TryMerge(in_cluster->shared_from_this())) {773 if (cluster->TryMerge(in_cluster->shared_from_this())) {
774- GELOGD("Success merge known shape cluster from %lu to %lu.", in_cluster->Id(), cluster->Id());774+ GELOGD("Successfully merged known shape cluster from %lu to %lu.", in_cluster->Id(), cluster->Id());
775 for (const auto &node : in_cluster->Nodes()) {775 for (const auto &node : in_cluster->Nodes()) {
776 SetCluster(node, cluster);776 SetCluster(node, cluster);
777 }777 }
@@ -139,7 +139,7 @@ void AddNextIterNodes(const NodePtr &cur_node, OrderedNodeSet &out_nodes_before_
139 // A-->B-->C if B was139 // A-->B-->C if B was
140 // Unlink edge may happen, add these node to queue if needed140 // Unlink edge may happen, add these node to queue if needed
141 if ((!IsNodeAlreadySeen(node, graph_state)) && (IsNodeReadyToQueue(node, graph_state))) {141 if ((!IsNodeAlreadySeen(node, graph_state)) && (IsNodeReadyToQueue(node, graph_state))) {
142- GELOGD("Node %s may lost from cur node %s, add to queue if not seen.", node->GetName().c_str(),142+ GELOGD("Node %s may be lost from cur node %s, add to queue if not seen.", node->GetName().c_str(),
143 cur_node->GetName().c_str());143 cur_node->GetName().c_str());
144 graph_state.AddNodeToQueue(node);144 graph_state.AddNodeToQueue(node);
145 }145 }
@@ -525,7 +525,7 @@ Status GEPass::RunPassesNodeOnce(NodePtr &node, const NamesToPass &names_to_pass
525 525 
526 if (has_sub_graph) {526 if (has_sub_graph) {
527 NotifyPassGraphStart(graph_, names_to_passes);527 NotifyPassGraphStart(graph_, names_to_passes);
528- GELOGD("There are subgraphs on node %s, run passes for for the second time", node->GetName().c_str());528+ GELOGD("There are subgraphs on node %s, run passes for the second time", node->GetName().c_str());
529 SetFlagOption(kOptimizeAfterSubGraph, names_to_passes);529 SetFlagOption(kOptimizeAfterSubGraph, names_to_passes);
530 ret = RunPassesOnNode(node, names_to_passes, graph_state, rp_state);530 ret = RunPassesOnNode(node, names_to_passes, graph_state, rp_state);
531 if (ret != SUCCESS) {531 if (ret != SUCCESS) {
@@ -36,7 +36,7 @@ Status AttachStreamLabelPass::Run(ComputeGraphPtr graph) {
36 graph->GetName().c_str());36 graph->GetName().c_str());
37 }37 }
38 // 临时方案,正式方案需要根据图结构来给cmo算子分流,待正式方案上库后删除38 // 临时方案,正式方案需要根据图结构来给cmo算子分流,待正式方案上库后删除
39- GE_CHK_STATUS_RET(SetCmoStreamLabel(cmo_nodes), "Failed to set stream labels for cmo nodes in graph:%s failed.",39+ GE_CHK_STATUS_RET(SetCmoStreamLabel(cmo_nodes), "Failed to set stream labels for cmo nodes in graph:%s.",
40 graph->GetName().c_str());40 graph->GetName().c_str());
41 41 
42 GELOGD("AttachStreamLabelPass Leave.");42 GELOGD("AttachStreamLabelPass Leave.");
@@ -35,7 +35,7 @@ Status FlowCtrlPass::Run(ComputeGraphPtr compute_graph) {
35 return NOT_CHANGED;35 return NOT_CHANGED;
36 }36 }
37 37 
38- GELOGI("FlowCtrl pass begin.graph is [%s].", compute_graph->GetName().c_str());38+ GELOGI("FlowCtrl pass begin, graph is [%s].", compute_graph->GetName().c_str());
39 bool graph_change = false;39 bool graph_change = false;
40 // 1. Add FP/BP flow ctrl (big cycle)40 // 1. Add FP/BP flow ctrl (big cycle)
41 for (auto &node : compute_graph->GetDirectNode()) {41 for (auto &node : compute_graph->GetDirectNode()) {
@@ -106,7 +106,7 @@ bool FlowCtrlPass::CheckMultiDataSet(ComputeGraphPtr &compute_graph) const {
106 data_set_num++;106 data_set_num++;
107 }107 }
108 }108 }
109- GELOGI("The ComputeGraph contain %d dataSet.", data_set_num);109+ GELOGI("The ComputeGraph contains %d dataSet.", data_set_num);
110 return (data_set_num > 1) ? true : false;110 return (data_set_num > 1) ? true : false;
111}111}
112 112 
@@ -26,7 +26,7 @@ Status MarkAgnosticPass::Run(ComputeGraphPtr graph) {
26 GE_CHECK_NOTNULL(op_desc);26 GE_CHECK_NOTNULL(op_desc);
27 const GeTensorDescPtr op_tensor = op_desc->MutableInputDesc(0);27 const GeTensorDescPtr op_tensor = op_desc->MutableInputDesc(0);
28 if (op_tensor == nullptr) {28 if (op_tensor == nullptr) {
29- GELOGD("Op: %s, Index:0,has no input", node->GetName().c_str());29+ GELOGD("Op: %s, Index:0, has no input", node->GetName().c_str());
30 continue;30 continue;
31 }31 }
32 AttrUtils::SetInt(op_tensor, ATTR_NAME_FORMAT_CONTINUOUS, 1);32 AttrUtils::SetInt(op_tensor, ATTR_NAME_FORMAT_CONTINUOUS, 1);
@@ -173,14 +173,14 @@ NodePtr AddMemcpyBeforeNode(const NodePtr &node, int32_t index) {
173Status BypassSwitchOut(const NodePtr &switch_node, int32_t out_index) {173Status BypassSwitchOut(const NodePtr &switch_node, int32_t out_index) {
174 auto nodes_and_anchors = GetOutDataNodesByIndex(switch_node, out_index);174 auto nodes_and_anchors = GetOutDataNodesByIndex(switch_node, out_index);
175 if (nodes_and_anchors.empty()) {175 if (nodes_and_anchors.empty()) {
176- GELOGD("The switch node %s does not has out branch %d, skip the bypass process", switch_node->GetName().c_str(),176+ GELOGD("The switch node %s does not have out branch %d, skip the bypass process", switch_node->GetName().c_str(),
177 out_index);177 out_index);
178 return SUCCESS;178 return SUCCESS;
179 }179 }
180 180 
181 auto data_node_and_anchor = GetInDataNodeByIndex(switch_node, SWITCH_DATA_INPUT);181 auto data_node_and_anchor = GetInDataNodeByIndex(switch_node, SWITCH_DATA_INPUT);
182 if (data_node_and_anchor.first == nullptr) {182 if (data_node_and_anchor.first == nullptr) {
183- GELOGW("Cannot bypass switch node %s, the node does not has a data input", switch_node->GetName().c_str());183+ GELOGW("Cannot bypass switch node %s, the node does not have a data input", switch_node->GetName().c_str());
184 return SUCCESS;184 return SUCCESS;
185 }185 }
186 186 
@@ -96,7 +96,7 @@ Status SwitchLogicRemovePass::Run(NodePtr &node) {
96 if (pred_node_and_out != pred_node_next_switch) {96 if (pred_node_and_out != pred_node_next_switch) {
97 continue;97 continue;
98 }98 }
99- GELOGI("The switch nodes cascaded %s and %s have the save pred node %s, the %s can be remove",99+ GELOGI("The switch nodes cascaded %s and %s have the same pred node %s, the %s can be remove",
100 node->GetName().c_str(), dst_node->GetName().c_str(), pred_node_and_out.first->GetName().c_str(),100 node->GetName().c_str(), dst_node->GetName().c_str(), pred_node_and_out.first->GetName().c_str(),
101 dst_node->GetName().c_str());101 dst_node->GetName().c_str());
102 ret = RemoveSwitchNodeLogically(i, dst_node);102 ret = RemoveSwitchNodeLogically(i, dst_node);
@@ -119,7 +119,7 @@ Status SwitchLogicRemovePass::RemoveSwitchNodeLogically(int32_t parent_index, No
119 GE_CHECK_NOTNULL(switch_node);119 GE_CHECK_NOTNULL(switch_node);
120 auto out_anchor = switch_node->GetOutDataAnchor(i);120 auto out_anchor = switch_node->GetOutDataAnchor(i);
121 if (out_anchor == nullptr) {121 if (out_anchor == nullptr) {
122- GELOGW("The switch removing %s does not has %d out anchor, ignore it", switch_node->GetName().c_str(), i);122+ GELOGW("The switch removing %s does not have %d out anchor, ignore it", switch_node->GetName().c_str(), i);
123 continue;123 continue;
124 }124 }
125 125 
@@ -171,16 +171,17 @@ Status SwitchToStreamSwitchPass::ReplaceSwitchNode(const ComputeGraphPtr &graph,
171 OpDescPtr cond_desc = peer_cond_anchor->GetOwnerNode()->GetOpDesc();171 OpDescPtr cond_desc = peer_cond_anchor->GetOwnerNode()->GetOpDesc();
172 GE_CHECK_NOTNULL(cond_desc);172 GE_CHECK_NOTNULL(cond_desc);
173 DataType cond_data_type = cond_desc->GetOutputDesc(peer_cond_anchor->GetIdx()).GetDataType();173 DataType cond_data_type = cond_desc->GetOutputDesc(peer_cond_anchor->GetIdx()).GetDataType();
174- GE_CHK_BOOL_EXEC(174+ GE_CHK_BOOL_EXEC(cond_data_type == DT_BOOL,
175- cond_data_type == DT_BOOL,175+ REPORT_INNER_ERR_MSG("E19999",
176- REPORT_INNER_ERR_MSG("E19999",176+ "Pred_input of Switch node:%s(%s) only support DT_BOOL data_type, "
177- "Pred_input of Switch node:%s(%s) only support DT_BOOL data_type, "177+ "but the actual type is %s",
178- "but %s exactly",178+ switch_node->GetName().c_str(), switch_node->GetType().c_str(),
179- switch_node->GetName().c_str(), switch_node->GetType().c_str(),179+ TypeUtils::DataTypeToSerialString(cond_data_type).c_str());
180- TypeUtils::DataTypeToSerialString(cond_data_type).c_str());180+ return FAILED,
181- return FAILED, "[Check][Param] Pred_input of Switch node:%s(%s) only support DT_BOOL data_type, but %s exactly",181+ "[Check][Param] Pred_input of Switch node:%s(%s) only support DT_BOOL data_type, but the "
182- switch_node->GetName().c_str(), switch_node->GetType().c_str(),182+ "actual type is %s",
183- TypeUtils::DataTypeToSerialString(cond_data_type).c_str());183+ switch_node->GetName().c_str(), switch_node->GetType().c_str(),
184+ TypeUtils::DataTypeToSerialString(cond_data_type).c_str());
184 185 
185 OpDescPtr switch_desc = switch_node->GetOpDesc();186 OpDescPtr switch_desc = switch_node->GetOpDesc();
186 GE_CHECK_NOTNULL(switch_desc);187 GE_CHECK_NOTNULL(switch_desc);
@@ -119,11 +119,11 @@ Status BufferPoolMemoryPass::CheckBufferPoolSize(int64_t total_size, int64_t poo
119 }119 }
120 if (calc_total_size[pool_id] > buffer_pool_size) {120 if (calc_total_size[pool_id] > buffer_pool_size) {
121 GELOGE(INTERNAL_ERROR,121 GELOGE(INTERNAL_ERROR,
122- "[Check][Size]The memory required at the same is greater than buffer pool size, "122+ "[Check][Size]The memory required at the same time is greater than buffer pool size, "
123 "pool id:%" PRId64 ", pool size:%" PRId64 ", required size:%" PRId64 ".",123 "pool id:%" PRId64 ", pool size:%" PRId64 ", required size:%" PRId64 ".",
124 pool_id, buffer_pool_size, calc_total_size[pool_id]);124 pool_id, buffer_pool_size, calc_total_size[pool_id]);
125 REPORT_INNER_ERR_MSG("E19999",125 REPORT_INNER_ERR_MSG("E19999",
126- "The memory required at the same is greater than buffer pool size, pool id:%" PRId64126+ "The memory required at the same time is greater than buffer pool size, pool id:%" PRId64
127 ","127 ","
128 " pool size:%" PRId64 ", required size:%" PRId64 ".",128 " pool size:%" PRId64 ", required size:%" PRId64 ".",
129 pool_id, buffer_pool_size, calc_total_size[pool_id]);129 pool_id, buffer_pool_size, calc_total_size[pool_id]);
@@ -34,7 +34,7 @@ inline bool IsDataFlowOps(const std::string &op_type) {
34Status DataFlowPreparePass::Run(ge::ComputeGraphPtr graph) {34Status DataFlowPreparePass::Run(ge::ComputeGraphPtr graph) {
35 GE_CHECK_NOTNULL(graph);35 GE_CHECK_NOTNULL(graph);
36 if (graph->GetParentGraph() != nullptr) {36 if (graph->GetParentGraph() != nullptr) {
37- GELOGD("Subgraph %s is not need to process", graph->GetName().c_str());37+ GELOGD("Subgraph %s does not need to be processed", graph->GetName().c_str());
38 return SUCCESS;38 return SUCCESS;
39 }39 }
40 std::map<std::string, std::unordered_set<NodePtr>> data_flow_ops_groups;40 std::map<std::string, std::unordered_set<NodePtr>> data_flow_ops_groups;
@@ -99,7 +99,7 @@ Status GetOriginalFormatPass::SetOriginalFormat(const ge::ComputeGraphPtr &graph
99 !AttrUtils::GetInt(tmpSecondOpPtr, ATTR_NAME_FORMAT, second_input_format), continue_flag = true; break);99 !AttrUtils::GetInt(tmpSecondOpPtr, ATTR_NAME_FORMAT, second_input_format), continue_flag = true; break);
100 100 
101 if (first_input_format != second_input_format) {101 if (first_input_format != second_input_format) {
102- GELOGW("biasadd node is followed two nodes with different format, get original format failed");102+ GELOGW("biasadd node is followed by two nodes with different format, get original format failed");
103 continue_flag = true;103 continue_flag = true;
104 break;104 break;
105 }105 }
@@ -239,7 +239,7 @@ Status NetOutputPass::TryToSetOutputMaxSize(const NodePtr &output_node) const {
239 try {239 try {
240 max_size = std::stol(output_max_size_str);240 max_size = std::stol(output_max_size_str);
241 } catch (std::out_of_range &) {241 } catch (std::out_of_range &) {
242- GELOGE(PARAM_INVALID, "Value[%s] is out of range.", output_max_size_str.c_str());242+ GELOGE(PARAM_INVALID, "Value[%s] is out of int64 range.", output_max_size_str.c_str());
243 return PARAM_INVALID;243 return PARAM_INVALID;
244 } catch (std::invalid_argument &) {244 } catch (std::invalid_argument &) {
245 GELOGE(PARAM_INVALID, "Value[%s] is invalid.", output_max_size_str.c_str());245 GELOGE(PARAM_INVALID, "Value[%s] is invalid.", output_max_size_str.c_str());
@@ -40,7 +40,7 @@ Status ParallelConcatStartOpPass::Run(NodePtr &node) {
40 REPORT_INNER_ERR_MSG("E19999", "Output tensor num:%zu of node:%s(%s) != %zu, check invalid",40 REPORT_INNER_ERR_MSG("E19999", "Output tensor num:%zu of node:%s(%s) != %zu, check invalid",
41 node_op_desc->GetOutputsSize(), node_op_desc->GetName().c_str(),41 node_op_desc->GetOutputsSize(), node_op_desc->GetName().c_str(),
42 node_op_desc->GetType().c_str(), kParallelConcatStartOutputSize);42 node_op_desc->GetType().c_str(), kParallelConcatStartOutputSize);
43- GELOGE(PARAM_INVALID, "[Check][Param] Node[%s] output size is unexpected, the value is %zu, expected valude:%zu.",43+ GELOGE(PARAM_INVALID, "[Check][Param] Node[%s] output size is unexpected, the value is %zu, expected value:%zu.",
44 node_name.c_str(), node_op_desc->GetOutputsSize(), kParallelConcatStartOutputSize);44 node_name.c_str(), node_op_desc->GetOutputsSize(), kParallelConcatStartOutputSize);
45 return PARAM_INVALID;45 return PARAM_INVALID;
46 }46 }
@@ -306,7 +306,7 @@ Status SuperKernelPass::AutomaticSplitScope(const std::set<std::string> &no_fusi
306 const int64_t end_id = cut_points[i + 1].topo_id;306 const int64_t end_id = cut_points[i + 1].topo_id;
307 const bool begin_exclusive = cut_points[i].is_exclusive;307 const bool begin_exclusive = cut_points[i].is_exclusive;
308 GE_ASSERT_TRUE((end_id >= begin_id), "%ld vs %ld", begin_id, end_id);308 GE_ASSERT_TRUE((end_id >= begin_id), "%ld vs %ld", begin_id, end_id);
309- GELOGI("try to judge scope %s cut id form %ld to %ld", scope.c_str(), begin_id, end_id);309+ GELOGI("try to judge scope %s cut id from %ld to %ld", scope.c_str(), begin_id, end_id);
310 std::string new_scope_name = base_name + "_split_" + to_string(begin_id) + "_" + to_string(end_id);310 std::string new_scope_name = base_name + "_split_" + to_string(begin_id) + "_" + to_string(end_id);
311 if (new_scope_name == scope) {311 if (new_scope_name == scope) {
312 new_scope_name += "_r";312 new_scope_name += "_r";
@@ -1297,7 +1297,7 @@ Status SuperKernelScope::RefreshSendList(const NodePtr src_node, const uint32_t
1297 (void)AttrUtils::GetListInt(src_node->GetOpDesc(), "_sk_send_event_ids", sk_send_event_ids);1297 (void)AttrUtils::GetListInt(src_node->GetOpDesc(), "_sk_send_event_ids", sk_send_event_ids);
1298 for (const auto &ele : sk_send_event_ids) {1298 for (const auto &ele : sk_send_event_ids) {
1299 if (delete_event_id_set_.find(ele) != delete_event_id_set_.end()) {1299 if (delete_event_id_set_.find(ele) != delete_event_id_set_.end()) {
1300- GELOGI("event id %u is delete, no need to insert to _sk_send_event_ids", ele);1300+ GELOGI("event id %u is deleted, no need to insert to _sk_send_event_ids", ele);
1301 continue;1301 continue;
1302 }1302 }
1303 sk_send_event_ids_newest.emplace_back(ele);1303 sk_send_event_ids_newest.emplace_back(ele);
@@ -1317,7 +1317,7 @@ Status SuperKernelScope::RefreshRcvList(const NodePtr dst_node, const uint32_t e
1317 (void)AttrUtils::GetListInt(dst_node->GetOpDesc(), "_sk_rcv_event_ids", sk_rcv_event_ids);1317 (void)AttrUtils::GetListInt(dst_node->GetOpDesc(), "_sk_rcv_event_ids", sk_rcv_event_ids);
1318 for (const auto &ele : sk_rcv_event_ids) {1318 for (const auto &ele : sk_rcv_event_ids) {
1319 if (delete_event_id_set_.find(ele) != delete_event_id_set_.end()) {1319 if (delete_event_id_set_.find(ele) != delete_event_id_set_.end()) {
1320- GELOGI("event id %u is delete, no need to insert to _sk_send_event_ids", ele);1320+ GELOGI("event id %u is deleted, no need to insert to _sk_send_event_ids", ele);
1321 continue;1321 continue;
1322 }1322 }
1323 sk_rcv_event_ids_newest.emplace_back(ele);1323 sk_rcv_event_ids_newest.emplace_back(ele);
@@ -139,7 +139,7 @@ Status TransOpBreadthFusionPass::Run(ge::ComputeGraphPtr graph) {
139 for (auto const &id_to_trans_nodes : ids_to_trans_nodes) {139 for (auto const &id_to_trans_nodes : ids_to_trans_nodes) {
140 if (id_to_trans_nodes.second.size() > 1) {140 if (id_to_trans_nodes.second.size() > 1) {
141 GELOGI(141 GELOGI(
142- "Begin to breath fusion output trans-op-nodes for %s,"142+ "Begin to breadth fusion output trans-op-nodes for %s,"
143 " trans id %s, trans-op count %zu.",143 " trans id %s, trans-op count %zu.",
144 node->GetName().c_str(), id_to_trans_nodes.first.c_str(), id_to_trans_nodes.second.size());144 node->GetName().c_str(), id_to_trans_nodes.first.c_str(), id_to_trans_nodes.second.size());
145 graphStatus status = Fusion(id_to_trans_nodes.second, graph);145 graphStatus status = Fusion(id_to_trans_nodes.second, graph);
@@ -19,7 +19,7 @@
19namespace ge {19namespace ge {
20Status TransOpNearbyAllreduceFusionPass::Run(NodePtr &node) {20Status TransOpNearbyAllreduceFusionPass::Run(NodePtr &node) {
21 if (node == nullptr) {21 if (node == nullptr) {
22- GELOGW("null node is existed in graph");22+ GELOGW("null node exists in graph");
23 return SUCCESS;23 return SUCCESS;
24 }24 }
25 25 
@@ -61,7 +61,7 @@ bool TransOpNearbyAllreduceFusionPass::IsSymmetricTransOps(const NodePtr &node1,
61 GE_CHECK_NOTNULL_EXEC(node2_output_desc, return false);61 GE_CHECK_NOTNULL_EXEC(node2_output_desc, return false);
62 62 
63 // two symmetric trans ops should have symmetric input/output datatype63 // two symmetric trans ops should have symmetric input/output datatype
64- GELOGD("format: nod1_input=%d, nod1_output=%d, nod2_input=%d, nod2_output=%d", node1_input_desc->GetFormat(),64+ GELOGD("format: node1_input=%d, node1_output=%d, node2_input=%d, node2_output=%d", node1_input_desc->GetFormat(),
65 node1_output_desc->GetFormat(), node2_input_desc->GetFormat(), node2_output_desc->GetFormat());65 node1_output_desc->GetFormat(), node2_input_desc->GetFormat(), node2_output_desc->GetFormat());
66 if (node1_input_desc->GetFormat() != node2_output_desc->GetFormat() ||66 if (node1_input_desc->GetFormat() != node2_output_desc->GetFormat() ||
67 node1_output_desc->GetFormat() != node2_input_desc->GetFormat()) {67 node1_output_desc->GetFormat() != node2_input_desc->GetFormat()) {
@@ -69,7 +69,7 @@ bool TransOpNearbyAllreduceFusionPass::IsSymmetricTransOps(const NodePtr &node1,
69 }69 }
70 70 
71 // two symmetric trans ops should have symmetric input/output format71 // two symmetric trans ops should have symmetric input/output format
72- GELOGD("datatype: nod1_input=%d, nod1_output=%d, nod2_input=%d, nod2_output=%d", node1_input_desc->GetDataType(),72+ GELOGD("datatype: node1_input=%d, node1_output=%d, node2_input=%d, node2_output=%d", node1_input_desc->GetDataType(),
73 node1_output_desc->GetDataType(), node2_input_desc->GetDataType(), node2_output_desc->GetDataType());73 node1_output_desc->GetDataType(), node2_input_desc->GetDataType(), node2_output_desc->GetDataType());
74 if (node1_input_desc->GetDataType() != node2_output_desc->GetDataType() ||74 if (node1_input_desc->GetDataType() != node2_output_desc->GetDataType() ||
75 node1_output_desc->GetDataType() != node2_input_desc->GetDataType()) {75 node1_output_desc->GetDataType() != node2_input_desc->GetDataType()) {
@@ -81,7 +81,7 @@ Status TransposeTransDataPass::Run(NodePtr &node) {
81 GE_ASSERT_NOTNULL(op_desc->GetOutputDescPtr(0));81 GE_ASSERT_NOTNULL(op_desc->GetOutputDescPtr(0));
82 auto output_format = op_desc->GetOutputDescPtr(0)->GetFormat();82 auto output_format = op_desc->GetOutputDescPtr(0)->GetFormat();
83 if (input_format == output_format) {83 if (input_format == output_format) {
84- GELOGW("Node %s input format is %s, output format is %s, should not happened. Ignore pass.",84+ GELOGW("Node %s input format is %s, output format is %s, should not happen. Ignore pass.",
85 op_desc->GetName().c_str(), TypeUtils::FormatToSerialString(input_format).c_str(),85 op_desc->GetName().c_str(), TypeUtils::FormatToSerialString(input_format).c_str(),
86 TypeUtils::FormatToSerialString(output_format).c_str());86 TypeUtils::FormatToSerialString(output_format).c_str());
87 return SUCCESS;87 return SUCCESS;
@@ -280,7 +280,7 @@ Status AtomicAddrCleanPass::LinkToPotentialPrecedenceNode(ComputeGraphPtr &graph
280 }280 }
281 if (std::find(need_gentask_atomic_node_.begin(), need_gentask_atomic_node_.end(), second_node) !=281 if (std::find(need_gentask_atomic_node_.begin(), need_gentask_atomic_node_.end(), second_node) !=
282 need_gentask_atomic_node_.end()) {282 need_gentask_atomic_node_.end()) {
283- GELOGD("Node %s need gen atomic task, skip link it to %s", second_node->GetName().c_str(),283+ GELOGD("Node %s needs to generate an atomic task, skip linking it to %s", second_node->GetName().c_str(),
284 atomic_clean_node->GetName().c_str());284 atomic_clean_node->GetName().c_str());
285 continue;285 continue;
286 }286 }
@@ -290,7 +290,7 @@ Status HcclContinuousMemcpyPass::InsertAssignAfterBroadcastIfNeed(const ComputeG
290 290 
291 for (auto peer_in_anchor : var_out_anchor->GetPeerInDataAnchors()) {291 for (auto peer_in_anchor : var_out_anchor->GetPeerInDataAnchors()) {
292 if (peer_in_anchor->GetOwnerNode()->GetType() == ASSIGN) {292 if (peer_in_anchor->GetOwnerNode()->GetType() == ASSIGN) {
293- GELOGD("variable %s out assign node is exist.", var_out_anchor->GetOwnerNode()->GetName().c_str());293+ GELOGD("variable %s out assign node already exists.", var_out_anchor->GetOwnerNode()->GetName().c_str());
294 return SUCCESS;294 return SUCCESS;
295 }295 }
296 }296 }
@@ -279,7 +279,7 @@ Status HcclMemcpyPass::InsertAssignAfterBroadcastIfNeed(const ComputeGraphPtr &g
279 279 
280 for (auto peer_in_anchor : var_out_anchor->GetPeerInDataAnchors()) {280 for (auto peer_in_anchor : var_out_anchor->GetPeerInDataAnchors()) {
281 if (peer_in_anchor->GetOwnerNode()->GetType() == ASSIGN) {281 if (peer_in_anchor->GetOwnerNode()->GetType() == ASSIGN) {
282- GELOGD("variable %s out assign node is exist.", var_out_anchor->GetOwnerNode()->GetName().c_str());282+ GELOGD("variable %s out assign node already exists.", var_out_anchor->GetOwnerNode()->GetName().c_str());
283 return SUCCESS;283 return SUCCESS;
284 }284 }
285 }285 }
@@ -124,7 +124,7 @@ Status SubgraphPass::SubgraphInputNode(const ComputeGraphPtr &graph, const NodeP
124 }124 }
125 // Data->InputContinuesRequiredOp in subgraph need memcpy.125 // Data->InputContinuesRequiredOp in subgraph need memcpy.
126 if (input_continues_required_flag) {126 if (input_continues_required_flag) {
127- GELOGD("Data %s output_node required continues input.", node->GetName().c_str());127+ GELOGD("Data %s output_node requires continuous input.", node->GetName().c_str());
128 std::string name = node->GetName() + "_output_0_Memcpy";128 std::string name = node->GetName() + "_output_0_Memcpy";
129 if (InsertMemcpyNode(out_data_anchor, in_anchors, name) != SUCCESS) {129 if (InsertMemcpyNode(out_data_anchor, in_anchors, name) != SUCCESS) {
130 GELOGE(FAILED, "[Insert][Memcpy] after %s failed.", node->GetName().c_str());130 GELOGE(FAILED, "[Insert][Memcpy] after %s failed.", node->GetName().c_str());
@@ -56,7 +56,7 @@ void NotaskPassBase::RunOnTargetNode(const ge::NodePtr &node) {
56 if (IsUnknownShapeOp(op_desc)) {56 if (IsUnknownShapeOp(op_desc)) {
57 GELOGI("%s node [%s] is unknown shape op.", GetOpLabel().c_str(), node->GetName().c_str());57 GELOGI("%s node [%s] is unknown shape op.", GetOpLabel().c_str(), node->GetName().c_str());
58 } else if (IsOwnerGraphUnknown(node)) {58 } else if (IsOwnerGraphUnknown(node)) {
59- GELOGI("%s node [%s] is belong to unknown graph.", GetOpLabel().c_str(), node->GetName().c_str());59+ GELOGI("[%s] node [%s] belongs to an unknown graph.", GetOpLabel().c_str(), node->GetName().c_str());
60 } else if (!InputCheck(node)) {60 } else if (!InputCheck(node)) {
61 GELOGI("%s node [%s] input does not meet the conditions.", GetOpLabel().c_str(), node->GetName().c_str());61 GELOGI("%s node [%s] input does not meet the conditions.", GetOpLabel().c_str(), node->GetName().c_str());
62 } else if (!CheckFormat(op_desc)) {62 } else if (!CheckFormat(op_desc)) {
@@ -242,7 +242,7 @@ Status CreateSubGraphWithScopePass::ProcessHeterogeneousMultiBatch(const Compute
242 }242 }
243 std::vector<NodePtr> dynamic_shape_nodes;243 std::vector<NodePtr> dynamic_shape_nodes;
244 GE_CHK_STATUS_RET(CollectDynamicNodes(graph, dynamic_shape_nodes), "Collect dynamic nodes failed.");244 GE_CHK_STATUS_RET(CollectDynamicNodes(graph, dynamic_shape_nodes), "Collect dynamic nodes failed.");
245- GE_CHK_STATUS_RET(UpdateDynamicConfigAttrs(dynamic_shape_nodes), "Update dynamic cConfig attrs failed.");245+ GE_CHK_STATUS_RET(UpdateDynamicConfigAttrs(dynamic_shape_nodes), "Update dynamic config attrs failed.");
246 GE_CHK_STATUS_RET(CreateMultiBatchScope(graph), "Create multi batch scope failed.");246 GE_CHK_STATUS_RET(CreateMultiBatchScope(graph), "Create multi batch scope failed.");
247 return SUCCESS;247 return SUCCESS;
248}248}
@@ -468,7 +468,7 @@ Status CreateSubGraphWithScopePass::ParseMultiDimsAttr(const std::vector<NodePtr
468 }468 }
469 GELOGI("Input node[%s] has dynamic dims attr, input shape[%s], input multi dims[%s].", node->GetName().c_str(),469 GELOGI("Input node[%s] has dynamic dims attr, input shape[%s], input multi dims[%s].", node->GetName().c_str(),
470 input_shape.c_str(), multi_dims.c_str());470 input_shape.c_str(), multi_dims.c_str());
471- GE_CHK_STATUS_RET(ParseSubGraphMultiAttrs(node, input_shape, multi_dims), "Parse subgraph mulit attrs failed");471+ GE_CHK_STATUS_RET(ParseSubGraphMultiAttrs(node, input_shape, multi_dims), "Parse subgraph multi attrs failed");
472 GE_CHK_STATUS_RET(RefreshTensorShape(node), "Refresh tensor shape failed");472 GE_CHK_STATUS_RET(RefreshTensorShape(node), "Refresh tensor shape failed");
473 }473 }
474 return SUCCESS;474 return SUCCESS;
@@ -821,9 +821,9 @@ Status CreateSubGraphWithScopePass::CheckCtrlAnchorInvalid(const NodePtr &node,
821 }821 }
822 const auto &it = std::find(scope_nodes.begin(), scope_nodes.end(), peer_node);822 const auto &it = std::find(scope_nodes.begin(), scope_nodes.end(), peer_node);
823 if (it == scope_nodes.end()) {823 if (it == scope_nodes.end()) {
824- REPORT_INNER_ERR_MSG("E19999", "Exit control edge between [%s] and [%s].", peer_node->GetName().c_str(),824+ REPORT_INNER_ERR_MSG("E19999", "Exist control edge between [%s] and [%s].", peer_node->GetName().c_str(),
825 node->GetName().c_str());825 node->GetName().c_str());
826- GELOGE(PARAM_INVALID, "Exit control edge between [%s] and [%s].", peer_node->GetName().c_str(),826+ GELOGE(PARAM_INVALID, "Exist control edge between [%s] and [%s].", peer_node->GetName().c_str(),
827 node->GetName().c_str());827 node->GetName().c_str());
828 return FAILED;828 return FAILED;
829 }829 }
@@ -920,7 +920,7 @@ Status CreateSubGraphWithScopePass::MergeInputAnchors(const ComputeGraphPtr &sub
920 const int32_t peer_anchor_idx = peer_anchor->GetIdx();920 const int32_t peer_anchor_idx = peer_anchor->GetIdx();
921 GE_RETURN_WITH_LOG_IF_TRUE(peer_anchor_idx < 0, "Value of peer_anchor_idx[%d] is less than 0.", peer_anchor_idx);921 GE_RETURN_WITH_LOG_IF_TRUE(peer_anchor_idx < 0, "Value of peer_anchor_idx[%d] is less than 0.", peer_anchor_idx);
922 GE_RETURN_WITH_LOG_IF_TRUE(max_shape.size() <= static_cast<size_t>(peer_anchor_idx),922 GE_RETURN_WITH_LOG_IF_TRUE(max_shape.size() <= static_cast<size_t>(peer_anchor_idx),
923- "Value of max_op_shape[%s] invalid, peer ancher index[%d]", max_op_shape.c_str(),923+ "Value of max_op_shape[%s] invalid, peer anchor index[%d]", max_op_shape.c_str(),
924 peer_anchor_idx);924 peer_anchor_idx);
925 (void)AttrUtils::SetStr(data_desc, ATTR_NAME_OP_MAX_SHAPE, max_shape[peer_anchor_idx]);925 (void)AttrUtils::SetStr(data_desc, ATTR_NAME_OP_MAX_SHAPE, max_shape[peer_anchor_idx]);
926 GELOGI("Node[%s] max_op_shape:[%s], max_shape[%d]:[%s]", node->GetName().c_str(), max_op_shape.c_str(),926 GELOGI("Node[%s] max_op_shape:[%s], max_shape[%d]:[%s]", node->GetName().c_str(), max_op_shape.c_str(),
@@ -625,7 +625,7 @@ Status MultiBatchClonePass::CreateIndexNode(const ComputeGraphPtr &graph) {
625 REPORT_INNER_ERR_MSG("E19999", "Add edge between op:%s(%s)(index:0) and op:%s(%s)(index:1) failed",625 REPORT_INNER_ERR_MSG("E19999", "Add edge between op:%s(%s)(index:0) and op:%s(%s)(index:1) failed",
626 const_node->GetName().c_str(), const_node->GetType().c_str(), index_node->GetName().c_str(),626 const_node->GetName().c_str(), const_node->GetType().c_str(), index_node->GetName().c_str(),
627 index_node->GetType().c_str());627 index_node->GetType().c_str());
628- GELOGE(FAILED, "[Add][Edge] between node:%s to MapIndex:%s", const_node->GetName().c_str(),628+ GELOGE(FAILED, "Add edge between node:%s and MapIndex:%s failed", const_node->GetName().c_str(),
629 index_node->GetName().c_str());629 index_node->GetName().c_str());
630 return FAILED;630 return FAILED;
631 }631 }
@@ -1333,7 +1333,7 @@ Status MultiBatchClonePass::CreateOriGraph(const ComputeGraphPtr &graph) {
1333 GELOGD("No need to change original graph without getnext node.");1333 GELOGD("No need to change original graph without getnext node.");
1334 return SUCCESS;1334 return SUCCESS;
1335 }1335 }
1336- GELOGD("Start change original graph: %s when exit getnext node.", graph->GetName().c_str());1336+ GELOGD("Start change original graph: %s when exist getnext node.", graph->GetName().c_str());
1337 size_t data_index = all_data_nodes_.size() - kNumOfGetnextNode;1337 size_t data_index = all_data_nodes_.size() - kNumOfGetnextNode;
1338 for (const auto &node : graph->GetDirectNode()) {1338 for (const auto &node : graph->GetDirectNode()) {
1339 if (IsGetNextType(node)) {1339 if (IsGetNextType(node)) {
@@ -229,7 +229,7 @@ Status SubgraphMultiDimsClonePass::CreateConcatNode(const ComputeGraphPtr &subgr
229 REPORT_INNER_ERR_MSG("E19999", "Add edge between op:%s(%s)(index:0) and op:%s(%s)(index:1) failed",229 REPORT_INNER_ERR_MSG("E19999", "Add edge between op:%s(%s)(index:0) and op:%s(%s)(index:1) failed",
230 const_node_->GetName().c_str(), const_node_->GetType().c_str(),230 const_node_->GetName().c_str(), const_node_->GetType().c_str(),
231 concat_node_->GetName().c_str(), concat_node_->GetType().c_str());231 concat_node_->GetName().c_str(), concat_node_->GetType().c_str());
232- GELOGE(FAILED, "[Add][Edge] between node:%s to concat_node:%s", const_node_->GetName().c_str(),232+ GELOGE(FAILED, "Add edge between node:%s and concat_node:%s failed", const_node_->GetName().c_str(),
233 concat_node_->GetName().c_str());233 concat_node_->GetName().c_str());
234 return FAILED;234 return FAILED;
235 }235 }
@@ -286,7 +286,7 @@ Status SubgraphMultiDimsClonePass::CreateMapIndexNode(const ComputeGraphPtr &sub
286 REPORT_INNER_ERR_MSG("E19999", "Add edge between op:%s(%s)(index:0) and op:%s(%s)(index:1) failed",286 REPORT_INNER_ERR_MSG("E19999", "Add edge between op:%s(%s)(index:0) and op:%s(%s)(index:1) failed",
287 const_node_->GetName().c_str(), const_node_->GetType().c_str(),287 const_node_->GetName().c_str(), const_node_->GetType().c_str(),
288 map_index_node_->GetName().c_str(), map_index_node_->GetType().c_str());288 map_index_node_->GetName().c_str(), map_index_node_->GetType().c_str());
289- GELOGE(FAILED, "[Add][Edge] between node:%s to MapIndex:%s", const_node_->GetName().c_str(),289+ GELOGE(FAILED, "Add edge between node:%s and MapIndex:%s failed", const_node_->GetName().c_str(),
290 map_index_node_->GetName().c_str());290 map_index_node_->GetName().c_str());
291 return FAILED;291 return FAILED;
292 }292 }
@@ -151,7 +151,7 @@ Status PassUtils::RemoveBranch(const NodePtr &node, std::vector<NodePtr> &delete
151 if (node_type == NETOUTPUT) {151 if (node_type == NETOUTPUT) {
152 if (dst_in_anchor->IsTypeOf<InDataAnchor>()) {152 if (dst_in_anchor->IsTypeOf<InDataAnchor>()) {
153 REPORT_INNER_ERR_MSG("E19999",153 REPORT_INNER_ERR_MSG("E19999",
154- "Node:%s(%s) nactive branch connected to NetOutput with data anchor, "154+ "Node:%s(%s) Inactive branch connected to NetOutput with data anchor, "
155 "check invalid",155 "check invalid",
156 node->GetName().c_str(), node->GetType().c_str());156 node->GetName().c_str(), node->GetType().c_str());
157 GELOGE(INTERNAL_ERROR, "[Check][Param] [%s] Inactive branch connected to NetOutput with data anchor.",157 GELOGE(INTERNAL_ERROR, "[Check][Param] [%s] Inactive branch connected to NetOutput with data anchor.",
@@ -166,7 +166,7 @@ std::vector<ComputeGraphPtr> InferBasePass::GetCurNodeSubgraphs(const NodePtr &n
166 }166 }
167 auto sub_graph = root_graph->GetSubgraph(name);167 auto sub_graph = root_graph->GetSubgraph(name);
168 if (sub_graph == nullptr) {168 if (sub_graph == nullptr) {
169- GELOGW("The subgrpah %s for node %s is null.", name.c_str(), node->GetName().c_str());169+ GELOGW("The subgraph %s for node %s is null.", name.c_str(), node->GetName().c_str());
170 continue;170 continue;
171 }171 }
172 cur_node_subgraph.emplace_back(sub_graph);172 cur_node_subgraph.emplace_back(sub_graph);
@@ -291,10 +291,11 @@ graphStatus InferBasePass::UpdateTensorDescToParentNodeOutput(const NodePtr &nod
291 }291 }
292 GELOGI("Parent node %s index of edge desc is %d", node->GetNamePtr(), ref_i);292 GELOGI("Parent node %s index of edge desc is %d", node->GetNamePtr(), ref_i);
293 if (ref_i < 0 || static_cast<uint32_t>(ref_i) >= node->GetAllOutDataAnchorsSize()) {293 if (ref_i < 0 || static_cast<uint32_t>(ref_i) >= node->GetAllOutDataAnchorsSize()) {
294- REPORT_INNER_ERR_MSG("E19999", "Invalid ref_index %d of parent node %s, ref_index should less than %u.", ref_i,294+ REPORT_INNER_ERR_MSG("E19999", "Invalid ref_index %d of parent node %s, ref_index should be less than %u.",
295- node->GetName().c_str(), node->GetAllOutDataAnchorsSize());295+ ref_i, node->GetName().c_str(), node->GetAllOutDataAnchorsSize());
296- GELOGE(GRAPH_FAILED, "[Get][Ref_index] Invalid ref_index %d of parent node %s, ref_index should less than %u.",296+ GELOGE(GRAPH_FAILED,
297- ref_i, node->GetName().c_str(), node->GetAllOutDataAnchorsSize());297+ "[Get][Ref_index] Invalid ref_index %d of parent node %s, ref_index should be less than %u.", ref_i,
298+ node->GetName().c_str(), node->GetAllOutDataAnchorsSize());
298 return GRAPH_FAILED;299 return GRAPH_FAILED;
299 }300 }
300 ref_out_tensors[ref_i].emplace_back(netoutput_in_desc);301 ref_out_tensors[ref_i].emplace_back(netoutput_in_desc);
@@ -436,7 +436,7 @@ graphStatus InferShapePass::UpdateOutputFromSubgraphsForSubgraphMultiDims(const
436 dst->SetShapeRange(shape_range);436 dst->SetShapeRange(shape_range);
437 dst->SetOriginShapeRange(shape_range);437 dst->SetOriginShapeRange(shape_range);
438 ge::TensorUtils::SetRealDimCnt(*dst, static_cast<uint32_t>(final_dims.size()));438 ge::TensorUtils::SetRealDimCnt(*dst, static_cast<uint32_t>(final_dims.size()));
439- GELOGD("Update shape[%s] and shape_range by sungraphs for case node in multi dims scene.",439+ GELOGD("Update shape[%s] and shape_range by subgraphs for case node in multi dims scene.",
440 GeShape(final_dims).ToString().c_str());440 GeShape(final_dims).ToString().c_str());
441 441 
442 return GRAPH_SUCCESS;442 return GRAPH_SUCCESS;
@@ -37,7 +37,7 @@ Status MarkForceUnknownForCondPass::Run(ComputeGraphPtr graph) {
37 37 
38 switch_groups[node->GetOpDesc()->GetId()].push_back(node);38 switch_groups[node->GetOpDesc()->GetId()].push_back(node);
39 MarkUnknownForSwitch(node, switch_groups[node->GetOpDesc()->GetId()]);39 MarkUnknownForSwitch(node, switch_groups[node->GetOpDesc()->GetId()]);
40- GELOGD("Init merge group with id [%ld] form node [%s].", node->GetOpDesc()->GetId(), node->GetName().c_str());40+ GELOGD("Init merge group with id [%ld] from node [%s].", node->GetOpDesc()->GetId(), node->GetName().c_str());
41 }41 }
42 42 
43 MarkUnknownForSwitch(switch_groups);43 MarkUnknownForSwitch(switch_groups);
@@ -61,14 +61,14 @@ Status NoUseReshapeRemovePass::Run(ge::NodePtr &node) {
61 }61 }
62 62 
63 if (input_4dims.size() != output_4dims.size()) {63 if (input_4dims.size() != output_4dims.size()) {
64- GELOGI("Input and output dim size is not equal.Keep this reshape op.");64+ GELOGI("Input and output dim size is not equal. Keep this reshape op.");
65 return SUCCESS;65 return SUCCESS;
66 }66 }
67 67 
68 size_t vec_size = input_4dims.size();68 size_t vec_size = input_4dims.size();
69 for (size_t i = 0; i < vec_size; i++) {69 for (size_t i = 0; i < vec_size; i++) {
70 if (input_4dims[i] < 0) {70 if (input_4dims[i] < 0) {
71- GELOGI("Input shape is unknown.Keep this reshape op.");71+ GELOGI("Input shape is unknown. Keep this reshape op.");
72 return SUCCESS;72 return SUCCESS;
73 }73 }
74 if (input_4dims[i] != output_4dims[i]) {74 if (input_4dims[i] != output_4dims[i]) {
@@ -86,7 +86,7 @@ NodePtr DimensionAdjustPass::AddIdentityNodeToGraph(const std::string &name, con
86 ComputeGraphPtr &graph) const {86 ComputeGraphPtr &graph) const {
87 if (graph == nullptr) {87 if (graph == nullptr) {
88 REPORT_INNER_ERR_MSG("E19999", "Param graph is nullptr, check invalid");88 REPORT_INNER_ERR_MSG("E19999", "Param graph is nullptr, check invalid");
89- GELOGE(INTERNAL_ERROR, "[Check][Param] Comput graph ptr is nullptr in creating identity node.");89+ GELOGE(INTERNAL_ERROR, "[Check][Param] Compute graph ptr is nullptr in creating identity node.");
90 return nullptr;90 return nullptr;
91 }91 }
92 92 
@@ -35,7 +35,7 @@ Status PotentialConstTakenEffectPass::OnFinishGraph(ComputeGraphPtr &root_graph,
35 35 
36 if (node->GetOwnerComputeGraph() == nullptr) {36 if (node->GetOwnerComputeGraph() == nullptr) {
37 // if cur node parent node has been deleted, no need to handle node on this deleted graph.37 // if cur node parent node has been deleted, no need to handle node on this deleted graph.
38- GELOGD("Node %s owner graph is null. Perhapse its parent node has been deleted.", node->GetName().c_str());38+ GELOGD("Node %s owner graph is null. Perhaps its parent node has been deleted.", node->GetName().c_str());
39 continue;39 continue;
40 }40 }
41 41 
@@ -816,7 +816,7 @@ graphStatus SameTransdataBreadthFusionPass::AddNewInputForNetOutput(InDataAnchor
816 auto in_tensor_desc = netoutput_op_desc->GetInputDesc(static_cast<uint32_t>(netout_in_anchor->GetIdx()));816 auto in_tensor_desc = netoutput_op_desc->GetInputDesc(static_cast<uint32_t>(netout_in_anchor->GetIdx()));
817 uint32_t parent_index;817 uint32_t parent_index;
818 if (!AttrUtils::GetInt(in_tensor_desc, ATTR_NAME_PARENT_NODE_INDEX, parent_index)) {818 if (!AttrUtils::GetInt(in_tensor_desc, ATTR_NAME_PARENT_NODE_INDEX, parent_index)) {
819- GELOGW("node %s(%s) %d input does not has %s attr.", netoutput_op_desc->GetNamePtr(),819+ GELOGW("node %s(%s) input %d does not have attr %s.", netoutput_op_desc->GetNamePtr(),
820 netoutput_op_desc->GetTypePtr(), netout_in_anchor->GetIdx(), ATTR_NAME_PARENT_NODE_INDEX.c_str());820 netoutput_op_desc->GetTypePtr(), netout_in_anchor->GetIdx(), ATTR_NAME_PARENT_NODE_INDEX.c_str());
821 return GRAPH_SUCCESS;821 return GRAPH_SUCCESS;
822 }822 }
@@ -97,7 +97,7 @@ Status SplitVariableIntoSubgraphPass::Run(NodePtr &node) {
97 root_graph->GetName().c_str());97 root_graph->GetName().c_str());
98 // UnknownShapePartitionedCall will expand after build, will cause same vars in root graph, here to skip98 // UnknownShapePartitionedCall will expand after build, will cause same vars in root graph, here to skip
99 if (IsUnknownShapePartitionedCall(peer_in_node, subgraph)) {99 if (IsUnknownShapePartitionedCall(peer_in_node, subgraph)) {
100- GELOGD("Var node %s(%s), peer in node %s(%s) is unknown shape parititonedcall ,skip split into.",100+ GELOGD("Var node %s(%s), peer in node %s(%s) is unknown shape partitionedcall ,skip split into.",
101 node->GetNamePtr(), node->GetTypePtr(), peer_in_node->GetNamePtr(), peer_in_node->GetTypePtr());101 node->GetNamePtr(), node->GetTypePtr(), peer_in_node->GetNamePtr(), peer_in_node->GetTypePtr());
102 break;102 break;
103 }103 }
@@ -609,7 +609,7 @@ Status VariableOpPass::CheckIfCouldBeOptimized(const SameVarPtr &same_vars, bool
609 }609 }
610 GELOGD("is_var_ref_legally is %d.", is_var_ref_legally);610 GELOGD("is_var_ref_legally is %d.", is_var_ref_legally);
611 if (!is_var_ref_legally) {611 if (!is_var_ref_legally) {
612- GELOGI("variable ref connection are illegally");612+ GELOGI("variable ref connection is illegal");
613 flag = false;613 flag = false;
614 fusion_road.clear();614 fusion_road.clear();
615 return SUCCESS;615 return SUCCESS;
@@ -473,7 +473,7 @@ void VariablePrepareOpPass::GetWritableNodeOutIndex(const NodePtr &node, int32_t
473void VariablePrepareOpPass::GenerateRefTypeAndInputOutputMap(const NodePtr &node) {473void VariablePrepareOpPass::GenerateRefTypeAndInputOutputMap(const NodePtr &node) {
474 auto op_desc = node->GetOpDesc();474 auto op_desc = node->GetOpDesc();
475 if (op_desc == nullptr) {475 if (op_desc == nullptr) {
476- GELOGW("op_desc in null, please check node:[%s]", node->GetName().c_str());476+ GELOGW("op_desc is null, please check node:[%s]", node->GetName().c_str());
477 return;477 return;
478 }478 }
479 for (const auto &name_index : op_desc->GetAllInputName()) {479 for (const auto &name_index : op_desc->GetAllInputName()) {
@@ -24,7 +24,7 @@ Status VariableRefUselessControlOutDeletePass::Run(ge::ComputeGraphPtr graph) {
24 }24 }
25 auto src_nodes = node->GetInDataNodes();25 auto src_nodes = node->GetInDataNodes();
26 if (src_nodes.empty()) {26 if (src_nodes.empty()) {
27- GELOGW("The variable ref name %s(ref %s) does not has a input node", node->GetName().c_str(),27+ GELOGW("The variable ref name %s(ref %s) does not have an input node", node->GetName().c_str(),
28 src_var_name.c_str());28 src_var_name.c_str());
29 continue;29 continue;
30 }30 }
@@ -43,7 +43,7 @@ class GraphLint {
43 }43 }
44 44 
45 graphStatus SetInputRwType(uint64_t input_index, RWType rw_type) {45 graphStatus SetInputRwType(uint64_t input_index, RWType rw_type) {
46- GE_ASSERT_TRUE(input_index < input_rw_type.size(), "Input index %ld should not large than inputs size %zu",46+ GE_ASSERT_TRUE(input_index < input_rw_type.size(), "Input index %ld should not be larger than inputs size %zu",
47 input_index, input_rw_type.size());47 input_index, input_rw_type.size());
48 if (input_rw_type[input_index] == RWType::kWritable) {48 if (input_rw_type[input_index] == RWType::kWritable) {
49 return GRAPH_SUCCESS;49 return GRAPH_SUCCESS;
@@ -1972,7 +1972,7 @@ Status GraphPrepare::UpdateDataNetOutputByStorageFormat() const {
1972 }1972 }
1973 1973 
1974 if (node_ptr->GetType() == CONSTPLACEHOLDER) {1974 if (node_ptr->GetType() == CONSTPLACEHOLDER) {
1975- GE_ASSERT_SUCCESS(UpdateConstPlaceHolderByStorageFormat(node_ptr), "Update %s by storaged format failed.",1975+ GE_ASSERT_SUCCESS(UpdateConstPlaceHolderByStorageFormat(node_ptr), "Update %s by storage format failed.",
1976 node_ptr->GetName().c_str());1976 node_ptr->GetName().c_str());
1977 }1977 }
1978 }1978 }
@@ -110,7 +110,7 @@ Status HcclOfflineOptionBuilder::ParseLogicNumaConfig() {
110 }110 }
111 hccl_comm_config_ = json_obj->dump();111 hccl_comm_config_ = json_obj->dump();
112 } catch (const nlohmann::json::exception &e) {112 } catch (const nlohmann::json::exception &e) {
113- GELOGE(FAILED, "Parser json file %s failed. %s", logic_topo_config_path_.c_str(), e.what());113+ GELOGE(FAILED, "Failed to parse json file %s. %s", logic_topo_config_path_.c_str(), e.what());
114 return FAILED;114 return FAILED;
115 }115 }
116 return SUCCESS;116 return SUCCESS;
@@ -628,7 +628,7 @@ Status AippOp::GetTargetPosition(ComputeGraphPtr graph, NodePtr &target_input,
628 if (subgraph == nullptr) {628 if (subgraph == nullptr) {
629 REPORT_INNER_ERR_MSG("E19999", "Subgraph:%s of op:%s(%s) not find in graph:%s, check invalid", name.c_str(),629 REPORT_INNER_ERR_MSG("E19999", "Subgraph:%s of op:%s(%s) not find in graph:%s, check invalid", name.c_str(),
630 func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str());630 func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str());
631- GELOGE(GE_GRAPH_EMPTY_SUBGRAPH, "[Get][Subgraph] failed, Subgraph:%s of op:%s(%s) not find in graph:%s",631+ GELOGE(GE_GRAPH_EMPTY_SUBGRAPH, "[Get][Subgraph] failed, Subgraph:%s of op:%s(%s) is not found in graph:%s",
632 name.c_str(), func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str());632 name.c_str(), func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str());
633 return GE_GRAPH_EMPTY_SUBGRAPH;633 return GE_GRAPH_EMPTY_SUBGRAPH;
634 }634 }
@@ -727,7 +727,7 @@ Status InsertAippOpUtil::SetModelInputDims(NodePtr &data_node, NodePtr &aipp_nod
727 // When dynamic bacth/hw is set, N or HW need to be set to -1727 // When dynamic bacth/hw is set, N or HW need to be set to -1
728 if (AttrUtils::GetListInt(data_opdesc, ATTR_MBATCH_ORIGIN_INPUT_DIMS, origin_input_dims) &&728 if (AttrUtils::GetListInt(data_opdesc, ATTR_MBATCH_ORIGIN_INPUT_DIMS, origin_input_dims) &&
729 !origin_input_dims.empty()) {729 !origin_input_dims.empty()) {
730- GELOGI("In dynamic bacth/hw scenario, N or HW need to be set to -1. model_input_dims: %s, origin_input_dims: %s",730+ GELOGI("In dynamic batch/hw scenario, N or HW need to be set to -1. model_input_dims: %s, origin_input_dims: %s",
731 ToString(model_input_dims).c_str(), ToString(origin_input_dims).c_str());731 ToString(model_input_dims).c_str(), ToString(origin_input_dims).c_str());
732 for (size_t i = 0UL; i < origin_input_dims.size(); ++i) {732 for (size_t i = 0UL; i < origin_input_dims.size(); ++i) {
733 // N or HW need to be set to -1733 // N or HW need to be set to -1
@@ -531,7 +531,7 @@ Status InitDynamicParams(std::vector<std::vector<int64_t>> &shapes) {
531 if (!GetLocalOmgContext().dynamic_image_size.empty()) {531 if (!GetLocalOmgContext().dynamic_image_size.empty()) {
532 GELOGD("Found dynamic image size option, value %s", GetLocalOmgContext().dynamic_image_size.c_str());532 GELOGD("Found dynamic image size option, value %s", GetLocalOmgContext().dynamic_image_size.c_str());
533 GE_ASSERT_TRUE(ParseDynamicSize(GetLocalOmgContext().dynamic_image_size, shapes),533 GE_ASSERT_TRUE(ParseDynamicSize(GetLocalOmgContext().dynamic_image_size, shapes),
534- "Option dynamic_batch_size[%s] should not have non-digital character",534+ "Option dynamic_image_size[%s] should not have non-digital character",
535 GetLocalOmgContext().dynamic_image_size.c_str());535 GetLocalOmgContext().dynamic_image_size.c_str());
536 for (const auto &shape : shapes) {536 for (const auto &shape : shapes) {
537 GELOGI("Found dynamic image size, shape %s", ToString(shape).c_str());537 GELOGI("Found dynamic image size, shape %s", ToString(shape).c_str());
@@ -787,7 +787,7 @@ Status ParseInputShapes(const std::string &input_shapes,
787 for (const auto &shape : shape_vec) {787 for (const auto &shape : shape_vec) {
788 std::vector<std::string> shape_pair_vec = SplitInputShape(shape);788 std::vector<std::string> shape_pair_vec = SplitInputShape(shape);
789 if (shape_pair_vec.size() != kDefaultShapePairSize) {789 if (shape_pair_vec.size() != kDefaultShapePairSize) {
790- GELOGE(INTERNAL_ERROR, "shape[%s] after split by \":\" must contains two parts: name and value", shape.c_str());790+ GELOGE(INTERNAL_ERROR, "shape[%s] after split by \":\" must contain two parts: name and value", shape.c_str());
791 return INTERNAL_ERROR;791 return INTERNAL_ERROR;
792 }792 }
793 793 
@@ -54,7 +54,7 @@ Status BroadcastGradientArgsKernel::Compute(const OpDescPtr op_desc_ptr, const s
54 BCast bcast;54 BCast bcast;
55 Status ret = bcast.GenerateBcastInfo(x1_dims, x2_dims);55 Status ret = bcast.GenerateBcastInfo(x1_dims, x2_dims);
56 if (ret != SUCCESS) {56 if (ret != SUCCESS) {
57- GELOGE(ret, "Generate bcast info fail.");57+ GELOGE(ret, "Failed to generate bcast info.");
58 return ret;58 return ret;
59 }59 }
60 60 
@@ -56,7 +56,7 @@ Status SqueezeKernel::Compute(const ge::OpDescPtr op_desc_ptr, const std::vector
56 auto tensor_desc = op_desc_ptr->GetOutputDesc(kOutputDescIndex);56 auto tensor_desc = op_desc_ptr->GetOutputDesc(kOutputDescIndex);
57 GeTensorPtr output_ptr = MakeShared<ge::GeTensor>(tensor_desc);57 GeTensorPtr output_ptr = MakeShared<ge::GeTensor>(tensor_desc);
58 if (output_ptr == nullptr) {58 if (output_ptr == nullptr) {
59- GELOGE(PARAM_INVALID, "node [%s] make shared failed.", op_desc_ptr->GetName().c_str());59+ GELOGE(PARAM_INVALID, "Failed to make node [%s] shared.", op_desc_ptr->GetName().c_str());
60 return PARAM_INVALID;60 return PARAM_INVALID;
61 }61 }
62 auto ge_tensor = input.at(kInputDescIndex);62 auto ge_tensor = input.at(kInputDescIndex);
@@ -84,7 +84,7 @@ Status DynamicStitchKernel::ValidateParams(const OpDescPtr &op_desc_ptr, const s
84 }84 }
85 // validate attr N and input.size85 // validate attr N and input.size
86 if ((kDoubleAttrN * n_) > static_cast<int32_t>(input.size())) {86 if ((kDoubleAttrN * n_) > static_cast<int32_t>(input.size())) {
87- GELOGW("Input size %zu is not not match with attr %d. Ignore dynamic stitch kernel.", input.size(), n_);87+ GELOGW("Input size %zu does not match with attr %d. Ignore dynamic stitch kernel.", input.size(), n_);
88 return NOT_CHANGED;88 return NOT_CHANGED;
89 }89 }
90 // validate supported datatype90 // validate supported datatype
@@ -102,7 +102,7 @@ Status AddKernel::ComputeComplex(const OpDescPtr &op_desc_ptr, const std::vector
102 BCast bcast;102 BCast bcast;
103 Status ret = bcast.GenerateBcastInfo(BCast::TransShapeToDimVec(input[kAddFirstInput]->GetTensorDesc()),103 Status ret = bcast.GenerateBcastInfo(BCast::TransShapeToDimVec(input[kAddFirstInput]->GetTensorDesc()),
104 BCast::TransShapeToDimVec(input[kAddSecondInput]->GetTensorDesc()));104 BCast::TransShapeToDimVec(input[kAddSecondInput]->GetTensorDesc()));
105- GE_ASSERT_SUCCESS(ret, "Greater broadcasting failed.");105+ GE_ASSERT_SUCCESS(ret, "Add broadcasting failed.");
106 106 
107 std::vector<int64_t> x_indexes;107 std::vector<int64_t> x_indexes;
108 std::vector<int64_t> y_indexes;108 std::vector<int64_t> y_indexes;
@@ -266,7 +266,7 @@ Status AddKernel::Compute(const OpDescPtr op_desc_ptr, const std::vector<ConstGe
266 }266 }
267 267 
268 if (ret != SUCCESS) {268 if (ret != SUCCESS) {
269- GELOGW("Greater broadcasting failed.");269+ GELOGW("Add broadcasting failed.");
270 return NOT_CHANGED;270 return NOT_CHANGED;
271 }271 }
272 return SUCCESS;272 return SUCCESS;
@@ -151,7 +151,7 @@ Status ComplexCompute(const OpDescPtr op_desc_ptr, const std::vector<ConstGeTens
151 BCast bcast;151 BCast bcast;
152 Status ret = bcast.GenerateBcastInfo(BCast::TransShapeToDimVec(input[0U]->GetTensorDesc()),152 Status ret = bcast.GenerateBcastInfo(BCast::TransShapeToDimVec(input[0U]->GetTensorDesc()),
153 BCast::TransShapeToDimVec(input[1U]->GetTensorDesc()));153 BCast::TransShapeToDimVec(input[1U]->GetTensorDesc()));
154- GE_ASSERT_SUCCESS(ret, "Greater broadcasting failed.");154+ GE_ASSERT_SUCCESS(ret, "Mul broadcasting failed.");
155 155 
156 std::vector<int64_t> x_indexes;156 std::vector<int64_t> x_indexes;
157 std::vector<int64_t> y_indexes;157 std::vector<int64_t> y_indexes;
@@ -68,7 +68,7 @@ Status RsqrtKernel::RsqrtCompute(ConstGeTensorPtr &input_tensor_ptr, GeTensorPtr
68 auto ptr = const_cast<T *>(reinterpret_cast<const T *>(input_tensor_ptr->GetData().data()));68 auto ptr = const_cast<T *>(reinterpret_cast<const T *>(input_tensor_ptr->GetData().data()));
69 for (size_t i = 0; i < data_count; i++) {69 for (size_t i = 0; i < data_count; i++) {
70 if (ZeroCheck(*(ptr + i), data_type) != SUCCESS) {70 if (ZeroCheck(*(ptr + i), data_type) != SUCCESS) {
71- GELOGW("Rsqrt: The input data cannot less than or equal to zero, rsqrt folding failed.");71+ GELOGW("Rsqrt: The input data cannot be less than or equal to zero, rsqrt folding failed.");
72 return NOT_CHANGED;72 return NOT_CHANGED;
73 }73 }
74 switch (data_type) {74 switch (data_type) {
@@ -76,7 +76,7 @@ Status OverflowCheck(T const &x, T const &y, DataType &data_type) {
76 [](TYPE const &x, TYPE const &y, DataType &type, Status &ret) -> TYPE { \76 [](TYPE const &x, TYPE const &y, DataType &type, Status &ret) -> TYPE { \
77 ret = OverflowCheck<TYPE>(x, y, type); \77 ret = OverflowCheck<TYPE>(x, y, type); \
78 if (ret != SUCCESS) { \78 if (ret != SUCCESS) { \
79- GELOGE(PARAM_INVALID, "Result of sub is overflow."); \79+ GELOGE(PARAM_INVALID, "Result of sub overflows."); \
80 return static_cast<TYPE>(0); \80 return static_cast<TYPE>(0); \
81 } \81 } \
82 return static_cast<TYPE>(x) - static_cast<TYPE>(y); \82 return static_cast<TYPE>(x) - static_cast<TYPE>(y); \
@@ -77,7 +77,7 @@ Status ReduceProdKernel::AxisCal(const std::vector<ge::ConstGeTensorPtr> &input)
77 int32_t *axis = const_cast<int32_t *>(reinterpret_cast<const int32_t *>(axis_tensor->GetData().GetData()));77 int32_t *axis = const_cast<int32_t *>(reinterpret_cast<const int32_t *>(axis_tensor->GetData().GetData()));
78 GE_CHECK_NOTNULL(axis);78 GE_CHECK_NOTNULL(axis);
79 if (static_cast<size_t>(*axis) >= data_dim_size) {79 if (static_cast<size_t>(*axis) >= data_dim_size) {
80- GELOGW("axis is out of rank of data_dims, axis is %d.", *axis);80+ GELOGW("axis is out of rank of data_dims, axis is %d, valid range is [0, %zu).", *axis, data_dim_size);
81 return PARAM_INVALID;81 return PARAM_INVALID;
82 }82 }
83 axis_dim_ = data_dims[static_cast<size_t>(*axis)];83 axis_dim_ = data_dims[static_cast<size_t>(*axis)];
@@ -92,13 +92,13 @@ Status ReduceProdKernel::AxisCal(const std::vector<ge::ConstGeTensorPtr> &input)
92 // data_dims is the vector of dims, element in data_dims isn't negative.92 // data_dims is the vector of dims, element in data_dims isn't negative.
93 if (axis_appear) {93 if (axis_appear) {
94 if (data_dims[i] != 0 && end_dim_ > (INT64_MAX / data_dims[i])) {94 if (data_dims[i] != 0 && end_dim_ > (INT64_MAX / data_dims[i])) {
95- GELOGW("Product is overflow. multiplier 1: %ld. multiplier 2: %ld.", end_dim_, data_dims[i]);95+ GELOGW("Product overflows. multiplier 1: %ld. multiplier 2: %ld.", end_dim_, data_dims[i]);
96 return INTERNAL_ERROR;96 return INTERNAL_ERROR;
97 }97 }
98 end_dim_ *= data_dims[i];98 end_dim_ *= data_dims[i];
99 } else {99 } else {
100 if (data_dims[i] != 0 && head_dim_ > (INT64_MAX / data_dims[i])) {100 if (data_dims[i] != 0 && head_dim_ > (INT64_MAX / data_dims[i])) {
101- GELOGW("Product is overflow. multiplier 1: %ld. multiplier 2: %ld.", head_dim_, data_dims[i]);101+ GELOGW("Product overflows. multiplier 1: %ld. multiplier 2: %ld.", head_dim_, data_dims[i]);
102 return INTERNAL_ERROR;102 return INTERNAL_ERROR;
103 }103 }
104 head_dim_ *= data_dims[i];104 head_dim_ *= data_dims[i];
@@ -129,7 +129,7 @@ Status ReduceProdKernel::DataCal(const std::vector<ge::ConstGeTensorPtr> &input,
129 for (int64_t k = 1; k < axis_dim_; ++k) {129 for (int64_t k = 1; k < axis_dim_; ++k) {
130 tmp_y = input_data[static_cast<size_t>(i * end_dim_ * axis_dim_ + j + k * end_dim_)];130 tmp_y = input_data[static_cast<size_t>(i * end_dim_ * axis_dim_ + j + k * end_dim_)];
131 if (ge::CheckInt32MulOverflow(tmp_x, tmp_y) != SUCCESS) {131 if (ge::CheckInt32MulOverflow(tmp_x, tmp_y) != SUCCESS) {
132- GELOGW("Product is overflow. multiplier 1: %d. multiplier 2: %d.", tmp_x, tmp_y);132+ GELOGW("Product overflows. multiplier 1: %d. multiplier 2: %d.", tmp_x, tmp_y);
133 return INTERNAL_ERROR;133 return INTERNAL_ERROR;
134 }134 }
135 tmp_x *= tmp_y;135 tmp_x *= tmp_y;
@@ -209,7 +209,7 @@ Status ReduceProdKernel::ComputeNoAxis(const ge::OpDescPtr &op_desc_ptr, const s
209 for (size_t k = 1; k < data_num; ++k) {209 for (size_t k = 1; k < data_num; ++k) {
210 tmp_y = input_data[k];210 tmp_y = input_data[k];
211 if (ge::CheckInt32MulOverflow(tmp_x, tmp_y) != SUCCESS) {211 if (ge::CheckInt32MulOverflow(tmp_x, tmp_y) != SUCCESS) {
212- GELOGW("Product is overflow. multiplier 1: %d. multiplier 2: %d.", tmp_x, tmp_y);212+ GELOGW("Product overflows. multiplier 1: %d. multiplier 2: %d.", tmp_x, tmp_y);
213 return INTERNAL_ERROR;213 return INTERNAL_ERROR;
214 }214 }
215 tmp_x *= tmp_y;215 tmp_x *= tmp_y;
@@ -395,7 +395,7 @@ Status GatherV2Kernel::Compute(const OpDescPtr op_desc_ptr, const std::vector<Co
395 auto indices_data_type = tensor1->GetTensorDesc().GetDataType();395 auto indices_data_type = tensor1->GetTensorDesc().GetDataType();
396 ret = SaveIndicesByDataType(tensor1, x_shape, indices_shape, indices_data_type, static_cast<size_t>(axis));396 ret = SaveIndicesByDataType(tensor1, x_shape, indices_shape, indices_data_type, static_cast<size_t>(axis));
397 if (ret != SUCCESS) {397 if (ret != SUCCESS) {
398- GELOGW("Save indeices by data type failed!");398+ GELOGW("Save indices by data type failed!");
399 return ret;399 return ret;
400 }400 }
401 401 
@@ -57,11 +57,11 @@ bool IsFlattenV2ParamsValid(const OpDescPtr &op_desc_ptr) {
57 GetAndConvertAxis(op_desc_ptr, axis, end_axis);57 GetAndConvertAxis(op_desc_ptr, axis, end_axis);
58 const int64_t dim_num = static_cast<int64_t>(x_desc.GetShape().GetDimNum());58 const int64_t dim_num = static_cast<int64_t>(x_desc.GetShape().GetDimNum());
59 if (axis < 0 || axis >= dim_num) {59 if (axis < 0 || axis >= dim_num) {
60- GELOGE(PARAM_INVALID, "axis out of range! axis is %ld", axis);60+ GELOGE(PARAM_INVALID, "axis out of range! axis is %ld, valid range is [0, %ld].", axis, dim_num - 1);
61 return false;61 return false;
62 }62 }
63 if (end_axis < 0 || end_axis >= dim_num) {63 if (end_axis < 0 || end_axis >= dim_num) {
64- GELOGE(PARAM_INVALID, "end_axis out of range! end_axis is %ld", end_axis);64+ GELOGE(PARAM_INVALID, "end_axis out of range! end_axis is %ld, valid range is [0, %ld].", end_axis, dim_num - 1);
65 return false;65 return false;
66 }66 }
67 if (axis > end_axis) {67 if (axis > end_axis) {
@@ -81,7 +81,7 @@ bool ParseCheckOpSupportedInfo(std::string &jsonStr, CheckSupportedInfo &checkSu
81 }81 }
82 checkSupportedInfo.allImplChecked = true;82 checkSupportedInfo.allImplChecked = true;
83 } catch (std::exception &e) {83 } catch (std::exception &e) {
84- REPORT_TE_INNER_ERROR("Failed to parser jsonStr: %s, reason is %s", jsonStr.c_str(), e.what());84+ REPORT_TE_INNER_ERROR("Failed to parse jsonStr: %s, reason is %s", jsonStr.c_str(), e.what());
85 return false;85 return false;
86 }86 }
87 87 
@@ -595,7 +595,7 @@ extern "C" LX_QUERY_STATUS GetOpInfo(const TbeOpInfo &tbeOpInfo, std::string &re
595 (void)opinfo.GetName(opName);595 (void)opinfo.GetName(opName);
596 (void)opinfo.GetModuleName(opModule);596 (void)opinfo.GetModuleName(opModule);
597 597 
598- TE_DBGLOG("Query LxFusion info begin. Name=[%s], Module=[%s].", opName.c_str(), opModule.c_str());598+ TE_DBGLOG("Query L1/L2 fusion info begin. Name=[%s], Module=[%s].", opName.c_str(), opModule.c_str());
599 599 
600 res = IsOpParameterValid(opModule, opFuncName);600 res = IsOpParameterValid(opModule, opFuncName);
601 TE_FUSION_CHECK(!res, {601 TE_FUSION_CHECK(!res, {
@@ -1742,7 +1742,7 @@ void TeJsonAssemble::AssembleComipleParams(const std::vector<ge::Node *> &fusion
1742 1742 
1743void TeJsonAssemble::FillOptionalOutputWithNull(const std::vector<ge::Node *> &teGraphNode, nlohmann::json &jsonData) {1743void TeJsonAssemble::FillOptionalOutputWithNull(const std::vector<ge::Node *> &teGraphNode, nlohmann::json &jsonData) {
1744 if (jsonData.find("op_list") == jsonData.end()) {1744 if (jsonData.find("op_list") == jsonData.end()) {
1745- TE_WARNLOG("Json data does not contains [op_list].");1745+ TE_WARNLOG("Json data does not contain [op_list].");
1746 return;1746 return;
1747 }1747 }
1748 1748 
@@ -1793,7 +1793,7 @@ void TeJsonAssemble::GetPrebuildOutput(const std::string &nodeName, nlohmann::js
1793 try {1793 try {
1794 jsonStr = json::parse(opParamStr);1794 jsonStr = json::parse(opParamStr);
1795 } catch (std::exception &e) {1795 } catch (std::exception &e) {
1796- REPORT_TE_INNER_ERROR("Failed to parser json_str, the json_str is %s and the reason is %s", opParamStr.c_str(),1796+ REPORT_TE_INNER_ERROR("Failed to parse json_str, the json_str is %s and the reason is %s", opParamStr.c_str(),
1797 e.what());1797 e.what());
1798 return;1798 return;
1799 }1799 }
@@ -1814,7 +1814,7 @@ void TeJsonAssemble::RefreshSgtSliceShape(nlohmann::json &outputDesc, nlohmann::
1814void TeJsonAssemble::FilterOutputMultipleReference(nlohmann::json &jsonData) {1814void TeJsonAssemble::FilterOutputMultipleReference(nlohmann::json &jsonData) {
1815 TE_DBGLOG("Begin to FilterOutputMultipleReference");1815 TE_DBGLOG("Begin to FilterOutputMultipleReference");
1816 if (jsonData.find("op_list") == jsonData.end()) {1816 if (jsonData.find("op_list") == jsonData.end()) {
1817- TE_WARNLOG("Json data does not contains [op_list].");1817+ TE_WARNLOG("Json data does not contain [op_list].");
1818 return;1818 return;
1819 }1819 }
1820 1820 
@@ -206,7 +206,7 @@ void BinaryManager::GetBinaryOppPath(const std::map<std::string, std::string> &o
206 206 
207 std::string oppLatestPath = RealPath(TeConfigInfo::Instance().GetEnvHomePath() + OPP_LATEST_PATH);207 std::string oppLatestPath = RealPath(TeConfigInfo::Instance().GetEnvHomePath() + OPP_LATEST_PATH);
208 if (!oppLatestPath.empty()) {208 if (!oppLatestPath.empty()) {
209- TE_INFOLOGF("ASCEND_HOME_PATH/opp_latest is valid, ready to get binary info from this dictionary[%s]",209+ TE_INFOLOGF("ASCEND_HOME_PATH/opp_latest is valid, ready to get binary info from this directory[%s]",
210 oppLatestPath.c_str());210 oppLatestPath.c_str());
211 oppParentPath = std::move(oppLatestPath);211 oppParentPath = std::move(oppLatestPath);
212 SetBuiltInOppLatestFlag(true);212 SetBuiltInOppLatestFlag(true);
@@ -1387,12 +1387,12 @@ bool BinaryManager::MatchSimplifiedKey(const OpBuildTaskPtr &opTask, string &jso
1387 if (isSuperKernel) {1387 if (isSuperKernel) {
1388 iter = relocatableBinaryInfoPtrMap_.find(implType);1388 iter = relocatableBinaryInfoPtrMap_.find(implType);
1389 if (iter == relocatableBinaryInfoPtrMap_.end()) {1389 if (iter == relocatableBinaryInfoPtrMap_.end()) {
1390- TE_WARNLOG("Node[%s] binaryInfo is null, whose implye_type is %lu.", opNode->GetName().c_str(), implType);1390+ TE_WARNLOG("Node[%s] binaryInfo is null, whose imply_type is %lu.", opNode->GetName().c_str(), implType);
1391 return false;1391 return false;
1392 }1392 }
1393 } else {1393 } else {
1394 if (iter == binaryInfoPtrMap_.end()) {1394 if (iter == binaryInfoPtrMap_.end()) {
1395- TE_WARNLOG("Node[%s] binaryInfo is null, whose implye_type is %lu.", opNode->GetName().c_str(), implType);1395+ TE_WARNLOG("Node[%s] binaryInfo is null, whose imply_type is %lu.", opNode->GetName().c_str(), implType);
1396 return false;1396 return false;
1397 }1397 }
1398 }1398 }
@@ -1623,9 +1623,9 @@ bool BinaryManager::CheckIsCanReuseOmBinaryCompileRes(const OpBuildTaskPtr &opTa
1623}1623}
1624 1624 
1625bool BinaryManager::ReuseOmBinaryCompileRes(const OpBuildTaskPtr &opTask, bool &hasOmKeyId) {1625bool BinaryManager::ReuseOmBinaryCompileRes(const OpBuildTaskPtr &opTask, bool &hasOmKeyId) {
1626- TE_DBGLOG("Process binary om file resuse. (Node = %s).", GetTaskNodeName(opTask).c_str());1626+ TE_DBGLOG("Process binary om file reuse. (Node = %s).", GetTaskNodeName(opTask).c_str());
1627 if (!CheckIsCanReuseOmBinaryCompileRes(opTask)) {1627 if (!CheckIsCanReuseOmBinaryCompileRes(opTask)) {
1628- TE_DBGLOG("Node(%s) cat not reuse om BinaryCompileRes. Need to compile.", GetTaskNodeName(opTask).c_str());1628+ TE_DBGLOG("Node(%s) cannot reuse om BinaryCompileRes. Need to compile.", GetTaskNodeName(opTask).c_str());
1629 return false;1629 return false;
1630 }1630 }
1631 1631 
@@ -1667,7 +1667,7 @@ bool BinaryManager::MatchAndReuseBinRes(const OpBuildTaskPtr &opTask) {
1667 TE_DBGLOG("Binary om not matched. Continue to match binary kernel files. (Node = %s)",1667 TE_DBGLOG("Binary om not matched. Continue to match binary kernel files. (Node = %s)",
1668 GetTaskNodeName(opTask).c_str());1668 GetTaskNodeName(opTask).c_str());
1669 1669 
1670- TE_DBGLOG("Process binary kernel file resuse. (Node = %s)", GetTaskNodeName(opTask).c_str());1670+ TE_DBGLOG("Process binary kernel file reuse. (Node = %s)", GetTaskNodeName(opTask).c_str());
1671 if (!CheckReuseBinaryCondition(opTask)) {1671 if (!CheckReuseBinaryCondition(opTask)) {
1672 DfxInfoManager::Instance().RecordStatistics(StatisticsType::BINARY_REUSE, RecordEventType::RESUE_CHECK_FAIL);1672 DfxInfoManager::Instance().RecordStatistics(StatisticsType::BINARY_REUSE, RecordEventType::RESUE_CHECK_FAIL);
1673 return false;1673 return false;
@@ -1675,7 +1675,7 @@ bool BinaryManager::MatchAndReuseBinRes(const OpBuildTaskPtr &opTask) {
1675 1675 
1676 bool res = ReuseBinKernelBySimpleKey(opTask);1676 bool res = ReuseBinKernelBySimpleKey(opTask);
1677 if (res) {1677 if (res) {
1678- TE_INFOLOG("Node(%s) reuse kernel binary by simpliedKey.", GetTaskNodeName(opTask).c_str());1678+ TE_INFOLOG("Node(%s) reuse kernel binary by simplifiedKey.", GetTaskNodeName(opTask).c_str());
1679 DfxInfoManager::Instance().RecordStatistics(StatisticsType::BINARY_REUSE, RecordEventType::REUSE_SUCC);1679 DfxInfoManager::Instance().RecordStatistics(StatisticsType::BINARY_REUSE, RecordEventType::REUSE_SUCC);
1680 return res;1680 return res;
1681 }1681 }
@@ -1712,7 +1712,7 @@ bool BinaryManager::BackToSingleCheck(const OpBuildTaskPtr &opTask) {
1712}1712}
1713 1713 
1714bool BinaryManager::CanReuseBinaryKernel(const OpBuildTaskPtr &opTask) {1714bool BinaryManager::CanReuseBinaryKernel(const OpBuildTaskPtr &opTask) {
1715- TE_DBGLOG("Start to process binary file resuse. (Node = %s).", GetTaskNodeName(opTask).c_str());1715+ TE_DBGLOG("Start to process binary file reuse. (Node = %s).", GetTaskNodeName(opTask).c_str());
1716 TE_FUSION_TIMECOST_START(CanReuseBinaryKernel);1716 TE_FUSION_TIMECOST_START(CanReuseBinaryKernel);
1717 DfxInfoManager::Instance().RecordStatistics(StatisticsType::BINARY_REUSE, RecordEventType::MATCH);1717 DfxInfoManager::Instance().RecordStatistics(StatisticsType::BINARY_REUSE, RecordEventType::MATCH);
1718 if (!CheckConditionsForReuse(opTask)) {1718 if (!CheckConditionsForReuse(opTask)) {
@@ -1819,7 +1819,7 @@ void BinaryManager::GetBinaryVersion(const OpBuildTaskPtr &opTask, bool isOm, st
1819 return;1819 return;
1820 }1820 }
1821 oppVersion = iter1->second;1821 oppVersion = iter1->second;
1822- TE_DBGLOG("Node[%s] impltype[%ld] get adkVrsion[%s] oppVersion[%s]", currentNode->GetName().c_str(), implType,1822+ TE_DBGLOG("Node[%s] impltype[%ld] get adkVersion[%s] oppVersion[%s]", currentNode->GetName().c_str(), implType,
1823 adkVrsion.c_str(), oppVersion.c_str());1823 adkVrsion.c_str(), oppVersion.c_str());
1824 return;1824 return;
1825 }1825 }
@@ -253,7 +253,7 @@ bool BinaryInfoBase::GenerateInOutPutMode(const std::string opType, const std::s
253 }253 }
254 }254 }
255 if (FROMAT_MODE_SET.find(formatModeStr) == FROMAT_MODE_SET.end()) {255 if (FROMAT_MODE_SET.find(formatModeStr) == FROMAT_MODE_SET.end()) {
256- TE_ERRLOG("opType [%s], formatModeStr [%s] is not in FROMAT_MODE_SET.", opType.c_str(), formatModeStr.c_str());256+ TE_ERRLOG("opType [%s], formatModeStr [%s] is not in FORMAT_MODE_SET.", opType.c_str(), formatModeStr.c_str());
257 return false;257 return false;
258 }258 }
259 TE_DBGLOG("Op [%s] [%s] formatMode [%s].", opType.c_str(), type.c_str(), formatModeStr.c_str());259 TE_DBGLOG("Op [%s] [%s] formatMode [%s].", opType.c_str(), type.c_str(), formatModeStr.c_str());
@@ -274,7 +274,7 @@ bool BinaryInfoBase::GenerateSimpleKeyList(const std::string &opType, const nloh
274 }274 }
275 for (auto binInfo : binaryList) {275 for (auto binInfo : binaryList) {
276 if (binInfo.find(SIMPLIFIED_KEY) == binInfo.end()) {276 if (binInfo.find(SIMPLIFIED_KEY) == binInfo.end()) {
277- TE_WARNLOG("opType [%s] is not contain simplifiedKey", opType.c_str());277+ TE_WARNLOG("opType [%s] does not contain simplifiedKey", opType.c_str());
278 return false;278 return false;
279 }279 }
280 auto simplifiedKeyList = binInfo[SIMPLIFIED_KEY];280 auto simplifiedKeyList = binInfo[SIMPLIFIED_KEY];
@@ -379,7 +379,9 @@ bool BinaryInfoBase::GenerateBinaryInfo(nlohmann::json &binaryInfoConfig) {
379 std::vector<SimpleKeyModeType> vecMode = {SimpleKeyModeType::SIMPLE_MODE, SimpleKeyModeType::COMPATIBLE_MODE,379 std::vector<SimpleKeyModeType> vecMode = {SimpleKeyModeType::SIMPLE_MODE, SimpleKeyModeType::COMPATIBLE_MODE,
380 SimpleKeyModeType::CUSTOM_MODE};380 SimpleKeyModeType::CUSTOM_MODE};
381 if (std::find(vecMode.begin(), vecMode.end(), simpleKeyMode) == vecMode.end()) {381 if (std::find(vecMode.begin(), vecMode.end(), simpleKeyMode) == vecMode.end()) {
382- TE_ERRLOG("simpleKeyMode value [%d] is out of range.", simpleKeyMode);382+ TE_ERRLOG(
383+ "simpleKeyMode value [%d] is out of range, valid value should be SIMPLE_MODE/COMPATIBLE_MODE/CUSTOM_MODE.",
384+ simpleKeyMode);
383 return false;385 return false;
384 }386 }
385 std::string optionalInputMode = NO_PLACEHOLDER;387 std::string optionalInputMode = NO_PLACEHOLDER;
@@ -397,7 +397,9 @@ bool GenerateSimpleKey::CheckParamSetDefaultVal() {
397 397 
398 if (simpleKeyMode_ != SimpleKeyModeType::SIMPLE_MODE && simpleKeyMode_ != SimpleKeyModeType::COMPATIBLE_MODE &&398 if (simpleKeyMode_ != SimpleKeyModeType::SIMPLE_MODE && simpleKeyMode_ != SimpleKeyModeType::COMPATIBLE_MODE &&
399 simpleKeyMode_ != SimpleKeyModeType::CUSTOM_MODE) {399 simpleKeyMode_ != SimpleKeyModeType::CUSTOM_MODE) {
400- TE_ERRLOG("opType [%s] simpleKeyMode [%d] is not supported.", opType_.c_str(), simpleKeyMode_);400+ TE_ERRLOG(
401+ "opType [%s] simpleKeyMode [%d] is not supported, valid values are SIMPLE_MODE/COMPATIBLE_MODE/CUSTOM_MODE.",
402+ opType_.c_str(), simpleKeyMode_);
401 return false;403 return false;
402 }404 }
403 if (implMode_.empty()) {405 if (implMode_.empty()) {
@@ -146,14 +146,14 @@ CompileResultPtr TeCacheManager::MatchCompileCache(const std::string &kernelName
146 146 
147 compileRetPtr = CompileResultUtils::ParseCompileResult(jsonFilePath);147 compileRetPtr = CompileResultUtils::ParseCompileResult(jsonFilePath);
148 if (compileRetPtr == nullptr) {148 if (compileRetPtr == nullptr) {
149- TE_INFOLOG("Parsing compile result from json file path [%s] was not successfully.", jsonFilePath.c_str());149+ TE_INFOLOG("Failed to parse compile result from json file path [%s].", jsonFilePath.c_str());
150 DfxInfoManager::Instance().RecordStatistics(StatisticsType::DISK_CACHE, RecordEventType::JSON_INVALID);150 DfxInfoManager::Instance().RecordStatistics(StatisticsType::DISK_CACHE, RecordEventType::JSON_INVALID);
151 return compileRetPtr;151 return compileRetPtr;
152 }152 }
153 153 
154 // verify sha256 of bin file154 // verify sha256 of bin file
155 if (!VerifyBinFileSha256(compileRetPtr)) {155 if (!VerifyBinFileSha256(compileRetPtr)) {
156- TE_INFOLOGF("Verify sha256 of json file[%s] and bin file[%s] not success.", compileRetPtr->jsonPath.c_str(),156+ TE_INFOLOGF("Failed to verify sha256 of json file[%s] and bin file[%s].", compileRetPtr->jsonPath.c_str(),
157 compileRetPtr->binPath.c_str());157 compileRetPtr->binPath.c_str());
158 DfxInfoManager::Instance().RecordStatistics(StatisticsType::DISK_CACHE, RecordEventType::SHA256_FAIL);158 DfxInfoManager::Instance().RecordStatistics(StatisticsType::DISK_CACHE, RecordEventType::SHA256_FAIL);
159 return nullptr;159 return nullptr;
@@ -163,7 +163,7 @@ CompileResultPtr TeCacheManager::MatchCompileCache(const std::string &kernelName
163 if (TeCacheSpaceManager::Instance().GetMaxOpCacheSize() != CACHE_AGING_FUCNTION_SWITCH) {163 if (TeCacheSpaceManager::Instance().GetMaxOpCacheSize() != CACHE_AGING_FUCNTION_SWITCH) {
164 if (!TeFileUtils::UpdateFileAccessTime(compileRetPtr->jsonPath) ||164 if (!TeFileUtils::UpdateFileAccessTime(compileRetPtr->jsonPath) ||
165 !TeFileUtils::UpdateFileAccessTime(compileRetPtr->binPath)) {165 !TeFileUtils::UpdateFileAccessTime(compileRetPtr->binPath)) {
166- TE_INFOLOGF("Update access time for json file[%s] or bin file[%s] not success.", compileRetPtr->jsonPath.c_str(),166+ TE_INFOLOGF("Failed to update access time for json file[%s] or bin file[%s].", compileRetPtr->jsonPath.c_str(),
167 compileRetPtr->binPath.c_str());167 compileRetPtr->binPath.c_str());
168 DfxInfoManager::Instance().RecordStatistics(StatisticsType::DISK_CACHE, RecordEventType::UPDATE_ACCESS_FAIL);168 DfxInfoManager::Instance().RecordStatistics(StatisticsType::DISK_CACHE, RecordEventType::UPDATE_ACCESS_FAIL);
169 return nullptr;169 return nullptr;
@@ -247,8 +247,7 @@ bool TeCacheManager::CopyCompileRetIntoCacheDir(const CompileResultPtr &compileR
247 }247 }
248 // copy bin file to cache dir248 // copy bin file to cache dir
249 if (!TeFileUtils::CopyFileToCacheDir(compileResultPtr->binPath, cacheBinFilePath)) {249 if (!TeFileUtils::CopyFileToCacheDir(compileResultPtr->binPath, cacheBinFilePath)) {
250- TE_INFOLOGF("Cannot to copy bin file from[%s] to [%s].", compileResultPtr->binPath.c_str(),250+ TE_INFOLOGF("Cannot copy bin file from [%s] to [%s].", compileResultPtr->binPath.c_str(), cacheBinFilePath.c_str());
251- cacheBinFilePath.c_str());
252 return false;251 return false;
253 }252 }
254 253 
@@ -261,7 +260,7 @@ bool TeCacheManager::CopyCompileRetIntoCacheDir(const CompileResultPtr &compileR
261 TE_DBGLOGF("Begin to copy head file from [%s] to [%s].", compileResultPtr->headerPath.c_str(),260 TE_DBGLOGF("Begin to copy head file from [%s] to [%s].", compileResultPtr->headerPath.c_str(),
262 cacheHeaderFilePath.c_str());261 cacheHeaderFilePath.c_str());
263 if (!TeFileUtils::CopyFileToCacheDir(compileResultPtr->headerPath, cacheHeaderFilePath)) {262 if (!TeFileUtils::CopyFileToCacheDir(compileResultPtr->headerPath, cacheHeaderFilePath)) {
264- TE_INFOLOGF("Cannot to copy header file from [%s] to [%s] .", compileResultPtr->headerPath.c_str(),263+ TE_INFOLOGF("Cannot copy header file from [%s] to [%s].", compileResultPtr->headerPath.c_str(),
265 cacheHeaderFilePath.c_str());264 cacheHeaderFilePath.c_str());
266 return false;265 return false;
267 }266 }
@@ -129,7 +129,7 @@ bool TeCacheSpaceManager::GetCacheInitFileCfg(const std::string &cacheFileRealPa
129 std::map<std::string, std::multimap<std::string, std::string>>::iterator iter;129 std::map<std::string, std::multimap<std::string, std::string>>::iterator iter;
130 for (iter = contentInfoMap.begin(); iter != contentInfoMap.end(); ++iter) {130 for (iter = contentInfoMap.begin(); iter != contentInfoMap.end(); ++iter) {
131 if (iter->first != OP_CACHE_INI_SECTION) {131 if (iter->first != OP_CACHE_INI_SECTION) {
132- TE_WARNLOGF("It is not contains op_compiler_cache in ini file.");132+ TE_WARNLOGF("The ini file does not contain op_compiler_cache.");
133 return false;133 return false;
134 }134 }
135 std::multimap<std::string, std::string>::iterator multimapIter;135 std::multimap<std::string, std::string>::iterator multimapIter;
@@ -221,7 +221,7 @@ void TeCacheSpaceManager::UpdateOpCacheSizeCfg(std::string &opMaxCacheSize, std:
221 }221 }
222 222 
223 if (remainCacheRadio <= 0 || remainCacheRadio > MAX_REMAIN_CACHE_RADIO) {223 if (remainCacheRadio <= 0 || remainCacheRadio > MAX_REMAIN_CACHE_RADIO) {
224- TE_WARNLOG("max_op_cache_size[%s] is invalid; it should be between in [1, 100].", opRemainCacheRadio.c_str());224+ TE_WARNLOG("remain_cache_size_ratio[%s] is invalid; it should be in [1, 100].", opRemainCacheRadio.c_str());
225 std::map<std::string, std::string> maxSizeMap = {{"invalid_value", opRemainCacheRadio},225 std::map<std::string, std::string> maxSizeMap = {{"invalid_value", opRemainCacheRadio},
226 {"argument", "remain_cache_size_ratio"}};226 {"argument", "remain_cache_size_ratio"}};
227 maxSizeMap["valid_range"] = "[1, 100]";227 maxSizeMap["valid_range"] = "[1, 100]";
@@ -290,7 +290,7 @@ void TeCacheSpaceManager::CreatOpCacheIniFile(const std::string &cacheFileRealPa
290 TE_DBGLOG("Create op_cache.ini detail is [%s, %s, %s].", str_section.c_str(), str_adk.c_str(), str_opp.c_str());290 TE_DBGLOG("Create op_cache.ini detail is [%s, %s, %s].", str_section.c_str(), str_adk.c_str(), str_opp.c_str());
291 fd = open(cacheFileRealPath.c_str(), O_CREAT | O_RDWR, FILE_AUTHORITY);291 fd = open(cacheFileRealPath.c_str(), O_CREAT | O_RDWR, FILE_AUTHORITY);
292 if (fd < 0) {292 if (fd < 0) {
293- TE_WARNLOGF("Creat op_cache.ini with path[%s] failed, %s.", cacheFileRealPath.c_str(), strerror(errno));293+ TE_WARNLOGF("Create op_cache.ini with path[%s] failed, %s.", cacheFileRealPath.c_str(), strerror(errno));
294 return;294 return;
295 }295 }
296 296 
@@ -325,8 +325,7 @@ void TeCacheSpaceManager::DelCachedFiles(const std::string &cacheDir, const Comp
325 if (curAdkVersion.empty() || curOppVersion.empty()) {325 if (curAdkVersion.empty() || curOppVersion.empty()) {
326 TeFileUtils::DeleteFilesInDir(cacheDir, false);326 TeFileUtils::DeleteFilesInDir(cacheDir, false);
327 REPORT_TE_INNER_WARN("Failed to get current version info; skipping delete cache directory %s.", cacheDir.c_str());327 REPORT_TE_INNER_WARN("Failed to get current version info; skipping delete cache directory %s.", cacheDir.c_str());
328- TE_INFOLOG("Get current version info not successfully. Skipping deletion of cache directory: %s.",328+ TE_INFOLOG("Failed to get current version info. Skipping deletion of cache directory: %s.", cacheDir.c_str());
329- cacheDir.c_str());
330 return;329 return;
331 }330 }
332 TE_DBGLOG("Start to check ini version in path %s with cache mode %d.", cacheDir.c_str(),331 TE_DBGLOG("Start to check ini version in path %s with cache mode %d.", cacheDir.c_str(),
@@ -386,7 +385,7 @@ bool TeCacheSpaceManager::GetFileSizeInfo(const std::string &filePath, FileInfo
386void TeCacheSpaceManager::AddBinFileInfoFromJson(const std::string jsonFileDirPath, const nlohmann::json &jsonInfo,385void TeCacheSpaceManager::AddBinFileInfoFromJson(const std::string jsonFileDirPath, const nlohmann::json &jsonInfo,
387 CacheFileSizeInfo &cacheFileInfo) {386 CacheFileSizeInfo &cacheFileInfo) {
388 if (jsonInfo.find("binFileName") == jsonInfo.end() || jsonInfo.find("binFileSuffix") == jsonInfo.end()) {387 if (jsonInfo.find("binFileName") == jsonInfo.end() || jsonInfo.find("binFileSuffix") == jsonInfo.end()) {
389- TE_WARNLOGF("The json does not have no binFileName or binFileSuffix.");388+ TE_WARNLOGF("The json does not contain binFileName or binFileSuffix.");
390 return;389 return;
391 }390 }
392 std::string binFileName = jsonInfo.at("binFileName").get<std::string>();391 std::string binFileName = jsonInfo.at("binFileName").get<std::string>();
@@ -468,7 +467,7 @@ void TeCacheSpaceManager::AgingCacheFileByAccessTime(std::multimap<uint64_t, Cac
468 std::time_t currTime = std::time(nullptr);467 std::time_t currTime = std::time(nullptr);
469 double diffTime = difftime(currTime, mapIter->first);468 double diffTime = difftime(currTime, mapIter->first);
470 if (diffTime < MIN_CACHE_AGING_TIME) {469 if (diffTime < MIN_CACHE_AGING_TIME) {
471- TE_INFOLOG("currTime is [%ld], accessTime is [%ld], diffTime is [%f]", currTime, mapIter->first, diffTime);470+ TE_INFOLOG("currTime [%ld] s, accessTime [%ld] s, diffTime [%f] s", currTime, mapIter->first, diffTime);
472 break;471 break;
473 }472 }
474 auto fileInfo = mapIter->second.totalFileSizeInfos[0];473 auto fileInfo = mapIter->second.totalFileSizeInfos[0];
@@ -487,7 +486,7 @@ void TeCacheSpaceManager::AgingCacheFileByAccessTime(std::multimap<uint64_t, Cac
487 }486 }
488 }487 }
489 if (totalDelSize >= sizeToDel) {488 if (totalDelSize >= sizeToDel) {
490- TE_DBGLOG("totalDelSize [%ld] sizeToDel is [%ld].", totalDelSize, sizeToDel);489+ TE_DBGLOG("totalDelSize [%ld] bytes, sizeToDel [%ld] bytes.", totalDelSize, sizeToDel);
491 return;490 return;
492 }491 }
493 }492 }
@@ -564,7 +563,8 @@ int64_t TeCacheSpaceManager::GetCacheSpaceMaxSizeCfg() {
564 try {563 try {
565 maxSizeIntCfg = std::stoi(maxCacheSizeCfg);564 maxSizeIntCfg = std::stoi(maxCacheSizeCfg);
566 } catch (...) {565 } catch (...) {
567- TE_WARNLOGF("ASCEND_MAX_OP_CACHE_SIZE[%s] is invalid.", maxCacheSizeCfg.c_str());566+ TE_WARNLOGF("ASCEND_MAX_OP_CACHE_SIZE[%s] is invalid, it should be -1 or [1, %ld).", maxCacheSizeCfg.c_str(),
567+ INT_MAX);
568 std::map<std::string, std::string> maxSizeMap = {{"invalid_value", maxCacheSizeCfg},568 std::map<std::string, std::string> maxSizeMap = {{"invalid_value", maxCacheSizeCfg},
569 {"argument", "ASCEND_MAX_OP_CACHE_SIZE"}};569 {"argument", "ASCEND_MAX_OP_CACHE_SIZE"}};
570 maxSizeMap["valid_range"] = "[1, " + std::to_string(DEFAULT_MAX_OP_CACHE_SIZE) + ") or -1";570 maxSizeMap["valid_range"] = "[1, " + std::to_string(DEFAULT_MAX_OP_CACHE_SIZE) + ") or -1";
@@ -606,7 +606,8 @@ int64_t TeCacheSpaceManager::GetCacheRemainSizeRadio() const {
606 try {606 try {
607 sizeRatio = std::atoi(remainCacheSizeRatioStr.c_str());607 sizeRatio = std::atoi(remainCacheSizeRatioStr.c_str());
608 } catch (...) {608 } catch (...) {
609- TE_WARNLOGF("ASCEND_REMAIN_CACHE_SIZE_RATIO[%s] is invalid.", remainCacheSizeRatioStr.c_str());609+ TE_WARNLOGF("ASCEND_REMAIN_CACHE_SIZE_RATIO[%s] is invalid, it should be in [0, 100].",
610+ remainCacheSizeRatioStr.c_str());
610 TeErrMessageReport(EM_PARAMETER_INVALID_WARNING, cacheSizeRatioMap);611 TeErrMessageReport(EM_PARAMETER_INVALID_WARNING, cacheSizeRatioMap);
611 sizeRatio = DEFAULT_REMAIN_CACHE_SIZE_RATIO;612 sizeRatio = DEFAULT_REMAIN_CACHE_SIZE_RATIO;
612 }613 }
@@ -47,7 +47,7 @@ void TeCacheUtils::UnlockAndCloseCacheFile(FILE *fp) {
47 return;47 return;
48 }48 }
49 if (!TeFileUtils::FcntlLockFileSet(fileno(fp), F_UNLCK, 0)) {49 if (!TeFileUtils::FcntlLockFileSet(fileno(fp), F_UNLCK, 0)) {
50- TE_INFOLOG("Release file lock not successfully.")50+ TE_INFOLOG("Failed to release file lock.")
51 }51 }
52 fclose(fp);52 fclose(fp);
53 fp = nullptr;53 fp = nullptr;
@@ -156,7 +156,7 @@ bool CompileResultUtils::SetKernelBin(const CompileResultPtr &compileRetPtr) {
156 std::vector<char> buffer;156 std::vector<char> buffer;
157 // read bin file157 // read bin file
158 if (!TeFileUtils::GetBufferFromBinFile(compileRetPtr->binPath, buffer)) {158 if (!TeFileUtils::GetBufferFromBinFile(compileRetPtr->binPath, buffer)) {
159- TE_INFOLOG("Read buffer from bin file[%s] not successfully, need to compile.", compileRetPtr->binPath.c_str());159+ TE_INFOLOG("Failed to read buffer from bin file[%s], need to compile.", compileRetPtr->binPath.c_str());
160 return false;160 return false;
161 }161 }
162 162 
@@ -682,7 +682,10 @@ ge::Node *GetPreviousNode(const ge::Node *node, const uint32_t index) {
682 682 
683bool GetSubOpLoc(int64_t skCount, int64_t skSubId, std::string &locStr) {683bool GetSubOpLoc(int64_t skCount, int64_t skSubId, std::string &locStr) {
684 if (skCount <= 0 || skSubId < 0 || skSubId >= skCount) {684 if (skCount <= 0 || skSubId < 0 || skSubId >= skCount) {
685- TE_WARNLOG("Invalid parameters: skCount=%ld, skSubId=%ld", skCount, skSubId);685+ TE_WARNLOG(
686+ "Invalid parameters: skCount=%ld, skSubId=%ld. skCount should be greater than 0, skSubId should be in [0, "
687+ "skCount).",
688+ skCount, skSubId);
686 return false;689 return false;
687 }690 }
688 if (skSubId == 0) {691 if (skSubId == 0) {
@@ -78,7 +78,7 @@ void ClearTEResource(int signo) {
78 size_t signoIdx = static_cast<size_t>(iter->second);78 size_t signoIdx = static_cast<size_t>(iter->second);
79 if (signoIdx < SignalManager::Instance().GetOldHandlesSize() && SignalManager::Instance().HasTERegistered(signoIdx)) {79 if (signoIdx < SignalManager::Instance().GetOldHandlesSize() && SignalManager::Instance().HasTERegistered(signoIdx)) {
80 if (sigaction(signo, &SignalManager::Instance().GetOldHandleByIdx(signoIdx), nullptr) < 0) {80 if (sigaction(signo, &SignalManager::Instance().GetOldHandleByIdx(signoIdx), nullptr) < 0) {
81- TE_INFOLOG("Signo[%d] has not register signal handle.", signo);81+ TE_INFOLOG("Signo[%d] has not registered a signal handler.", signo);
82 return;82 return;
83 }83 }
84 SignalManager::Instance().UnRegTEHandle(signoIdx);84 SignalManager::Instance().UnRegTEHandle(signoIdx);
@@ -52,7 +52,7 @@ bool TeFileUtils::CreateMultiLevelDir(const std::string &directoryPath) {
52 if (path.empty()) {52 if (path.empty()) {
53 ret = mkdir(directoryPath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP); // 75053 ret = mkdir(directoryPath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP); // 750
54 if (ret != 0 && errno != EEXIST) {54 if (ret != 0 && errno != EEXIST) {
55- REPORT_TE_INNER_WARN("Creat dir[%s] failed, reason is: %s", directoryPath.c_str(), strerror(errno));55+ REPORT_TE_INNER_WARN("Create dir[%s] failed, reason is: %s", directoryPath.c_str(), strerror(errno));
56 return false;56 return false;
57 }57 }
58 }58 }
@@ -67,7 +67,7 @@ bool TeFileUtils::JudgeEmptyAndCreateDir(char tmpDirPath[], const std::string &d
67 int32_t ret = 0;67 int32_t ret = 0;
68 ret = mkdir(tmpDirPath, S_IRWXU | S_IRGRP | S_IXGRP); // 75068 ret = mkdir(tmpDirPath, S_IRWXU | S_IRGRP | S_IXGRP); // 750
69 if (ret != 0 && errno != EEXIST) {69 if (ret != 0 && errno != EEXIST) {
70- TE_WARNLOGF("Creat dir[%s] failed, %s.", directoryPath.c_str(), strerror(errno));70+ TE_WARNLOGF("Create dir[%s] failed, %s.", directoryPath.c_str(), strerror(errno));
71 return false;71 return false;
72 }72 }
73 }73 }
@@ -1266,11 +1266,10 @@ bool TeFusionManager::BuildFusionOp(OpBuildTaskPtr &opTask, const std::string &o
1266 1266 
1267 // fusion op reuse bin res failed, back to single op bin reuse.1267 // fusion op reuse bin res failed, back to single op bin reuse.
1268 TE_FUSION_CHECK(opTask->opRes != nullptr, {1268 TE_FUSION_CHECK(opTask->opRes != nullptr, {
1269- TE_FUSION_CHECK(1269+ TE_FUSION_CHECK(opTask->opRes->backToSingleOpBinReuse,
1270- opTask->opRes->backToSingleOpBinReuse,1270+ TE_INFOLOG("Fusion op[taskId:%d] failed to reuse bin res, will fall back to single op bin reuse.",
1271- TE_INFOLOG("Fusion op[taskId:%d] try to reuse bin res not successfully, would back to single op bin reuse.",1271+ opTask->taskId);
1272- opTask->taskId);1272+ return false);
1273- return false);
1274 });1273 });
1275 }1274 }
1276 1275 
@@ -1341,7 +1340,7 @@ bool TeFusionManager::BuildFusionOp(OpBuildTaskPtr &opTask, const std::string &o
1341 // auto tune failed, do single op building if these's only one op1340 // auto tune failed, do single op building if these's only one op
1342 if (!opTask->attrKernelName.empty()) {1341 if (!opTask->attrKernelName.empty()) {
1343 opTask->kernel = opTask->attrKernelName;1342 opTask->kernel = opTask->attrKernelName;
1344- TE_DBGLOG("Update kernel name of task[%lu] to [%s].", opTask->attrKernelName.c_str());1343+ TE_DBGLOG("Update kernel name of task[%lu] to [%s].", opTask->taskId, opTask->attrKernelName.c_str());
1345 }1344 }
1346 return BuildSingleOp(opTask);1345 return BuildSingleOp(opTask);
1347 }1346 }
@@ -1444,8 +1443,7 @@ bool TeFusionManager::IsTimeToPrintProgressHint() {
1444 1443 
1445void TeFusionManager::PrintProgressHint() {1444void TeFusionManager::PrintProgressHint() {
1446 if (IsTimeToPrintProgressHint()) {1445 if (IsTimeToPrintProgressHint()) {
1447- printf(".");1446+ TE_INFOLOG("Compiling, please wait.");
1448- fflush(stdout);
1449 }1447 }
1450}1448}
1451 1449 
@@ -174,14 +174,14 @@ void RecordPidTimeIdInfo() {
174 TE_FUSION_LOG_EXEC(TE_FUSION_LOG_DEBUG, "pidFile path[%s] does not exist, try to create one.", pidFilePath.c_str());174 TE_FUSION_LOG_EXEC(TE_FUSION_LOG_DEBUG, "pidFile path[%s] does not exist, try to create one.", pidFilePath.c_str());
175 bool ret = mkdir(pidFilePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP);175 bool ret = mkdir(pidFilePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP);
176 if (ret != 0) {176 if (ret != 0) {
177- TE_WARNLOGF("Creat dir[%s] did not succeed, number: %d.", pidFilePath.c_str(), errno);177+ TE_WARNLOGF("Create dir[%s] did not succeed, number: %d.", pidFilePath.c_str(), errno);
178 }178 }
179 return;179 return;
180 }180 }
181 181 
182 std::string jsonFilePath = pidFilePath + "/" + PID_FILE_NAME;182 std::string jsonFilePath = pidFilePath + "/" + PID_FILE_NAME;
183 if (!CreateFile(jsonFilePath)) {183 if (!CreateFile(jsonFilePath)) {
184- TE_WARNLOGF("Creat file[%s] failed.", jsonFilePath.c_str());184+ TE_WARNLOGF("Create file[%s] failed.", jsonFilePath.c_str());
185 return;185 return;
186 }186 }
187 187 
@@ -1163,13 +1163,13 @@ bool GetPyAttr(const TbeAttrValue &attr, PyObject *&pyAttr) {
1163 if (isNum) {1163 if (isNum) {
1164 bres = GetPyAttrSimple(attr, pyAttr);1164 bres = GetPyAttrSimple(attr, pyAttr);
1165 TE_FUSION_CHECK(!bres, {1165 TE_FUSION_CHECK(!bres, {
1166- TE_FUSION_LOG_EXEC(TE_FUSION_LOG_ERROR, "Failed to get pyoject simple attr, attrDtype=[%d].", attrDtype);1166+ TE_FUSION_LOG_EXEC(TE_FUSION_LOG_ERROR, "Failed to get pyobject simple attr, attrDtype=[%d].", attrDtype);
1167 return false;1167 return false;
1168 });1168 });
1169 } else if (isList) {1169 } else if (isList) {
1170 bres = GetPyAttrComplex(attr, pyAttr);1170 bres = GetPyAttrComplex(attr, pyAttr);
1171 TE_FUSION_CHECK(!bres, {1171 TE_FUSION_CHECK(!bres, {
1172- TE_FUSION_LOG_EXEC(TE_FUSION_LOG_ERROR, "Failed to get pyoject complex attr, attrDtype=[%d].", attrDtype);1172+ TE_FUSION_LOG_EXEC(TE_FUSION_LOG_ERROR, "Failed to get pyobject complex attr, attrDtype=[%d].", attrDtype);
1173 return false;1173 return false;
1174 });1174 });
1175 } else {1175 } else {
@@ -109,9 +109,9 @@ bool PythonApiCall::CallPyFuncWithTbeOpInfo(const TbeOpInfo &tbeOpInfo, PyObject
109 });109 });
110 110 
111 TE_FUSION_CHECK((pyRes == nullptr || pyRes.get() == pyNone), {111 TE_FUSION_CHECK((pyRes == nullptr || pyRes.get() == pyNone), {
112- TE_INFOLOGF("Call python func[%s] not success, need to check op info: op inputs: %s, outputs: %s, attrs: %s.",112+ TE_ERRLOGF("Call python func[%s] not success, need to check op info: op inputs: %s, outputs: %s, attrs: %s.",
113- pyFunc.c_str(), PyObjectToStr(pyInputs).c_str(), PyObjectToStr(pyOutputs).c_str(),113+ pyFunc.c_str(), PyObjectToStr(pyInputs).c_str(), PyObjectToStr(pyOutputs).c_str(),
114- PyObjectToStr(pyAttrs).c_str());114+ PyObjectToStr(pyAttrs).c_str());
115 return false;115 return false;
116 });116 });
117 TE_DBGLOGF("call python func[%s], op info: op inputs: %s, outputs: %s, attrs: %s.", pyFunc.c_str(),117 TE_DBGLOGF("call python func[%s], op info: op inputs: %s, outputs: %s, attrs: %s.", pyFunc.c_str(),
@@ -384,7 +384,7 @@ Status DeployPlannerBase::ValidateModelAndRelation(const std::map<std::string, P
384 const auto &model_instance_name = it.first;384 const auto &model_instance_name = it.first;
385 const auto &submodel = models.find(model_instance_name);385 const auto &submodel = models.find(model_instance_name);
386 if (submodel == models.end()) {386 if (submodel == models.end()) {
387- GELOGE(PARAM_INVALID, "model exists in ModelRelation bot not found in RootModel, name = %s",387+ GELOGE(PARAM_INVALID, "model exists in ModelRelation but not found in RootModel, name = %s",
388 model_instance_name.c_str());388 model_instance_name.c_str());
389 return PARAM_INVALID;389 return PARAM_INVALID;
390 }390 }
@@ -779,7 +779,7 @@ bool DeployPlannerBase::CheckSkipBinding(const std::string &src_model_instance_n
779 return false;779 return false;
780 }780 }
781 if (src_model_location.size() <= 1U) {781 if (src_model_location.size() <= 1U) {
782- GELOGI("Model is not muilti deployed, model name = %s.", src_model_name.c_str());782+ GELOGI("Model is not multi deployed, model name = %s.", src_model_name.c_str());
783 return false;783 return false;
784 }784 }
785 785 
@@ -2024,7 +2024,7 @@ void DeployPlannerBase::GenerateDynamicSchedModelId() {
2024 2024 
2025void DeployPlannerBase::UpdateRelationForDynamicSched() {2025void DeployPlannerBase::UpdateRelationForDynamicSched() {
2026 if (!GetIsDynamicSched() && (!deploy_plan_.IsEnableExceptionCatch())) {2026 if (!GetIsDynamicSched() && (!deploy_plan_.IsEnableExceptionCatch())) {
2027- GELOGI("DynamicSched flag close and exception catch is disable, don't add status queues.");2027+ GELOGI("DynamicSched flag is closed and exception catch is disabled, don't add status queues.");
2028 return;2028 return;
2029 }2029 }
2030 GELOGD("DynamicSched flag=%d, exception catch flag=%d.", static_cast<int32_t>(GetIsDynamicSched()),2030 GELOGD("DynamicSched flag=%d, exception catch flag=%d.", static_cast<int32_t>(GetIsDynamicSched()),
@@ -2288,7 +2288,7 @@ void DeployPlannerBase::BindDynamicSchedDevQueue(const int32_t src_endpoint_idx,
2288 ToEndpointDesc(src_endpoint_idx).c_str(), src_is_multi_connected, ToEndpointDesc(dst_endpoint_idx).c_str(),2288 ToEndpointDesc(src_endpoint_idx).c_str(), src_is_multi_connected, ToEndpointDesc(dst_endpoint_idx).c_str(),
2289 dst_is_multi_connected);2289 dst_is_multi_connected);
2290 if (src_is_multi_connected && dst_is_multi_connected) {2290 if (src_is_multi_connected && dst_is_multi_connected) {
2291- GELOGW("DynamicSched, shouldn't many to many relation.");2291+ GELOGW("DynamicSched, many-to-many relation is not allowed.");
2292 }2292 }
2293 // 动态调度直接添加绑定关系(host场景)2293 // 动态调度直接添加绑定关系(host场景)
2294 deploy_plan_.queue_bindings_.emplace_back(src_endpoint_idx, dst_endpoint_idx);2294 deploy_plan_.queue_bindings_.emplace_back(src_endpoint_idx, dst_endpoint_idx);
@@ -276,7 +276,7 @@ Status FlowModelOmLoader::LoadToFlowModel(const ge::ModelData &model_data, FlowM
276 276 
277Status FlowModelOmLoader::CheckModelPartitions(const std::vector<ModelPartition> &model_partitions) {277Status FlowModelOmLoader::CheckModelPartitions(const std::vector<ModelPartition> &model_partitions) {
278 if (model_partitions.size() < kFlowModelPartitionsFlowSubModelStartIdx) {278 if (model_partitions.size() < kFlowModelPartitionsFlowSubModelStartIdx) {
279- GELOGE(FAILED, "flow model partitions must has 2 partitions[MODEL_DEF, FLOW_MODEL], but size=%zu.",279+ GELOGE(FAILED, "flow model partitions must have 2 partitions[MODEL_DEF, FLOW_MODEL], but size=%zu.",
280 model_partitions.size());280 model_partitions.size());
281 return FAILED;281 return FAILED;
282 }282 }
@@ -105,14 +105,14 @@ Status AddFlowModelCompileResource(const FlowModelPtr &flow_model, flow_model::p
105 const auto &host_res_type = execution_runtime->GetCompileHostResourceType();105 const auto &host_res_type = execution_runtime->GetCompileHostResourceType();
106 const auto &logic_dev_id_to_res_type = execution_runtime->GetCompileDeviceInfo();106 const auto &logic_dev_id_to_res_type = execution_runtime->GetCompileDeviceInfo();
107 if (host_res_type.empty() && logic_dev_id_to_res_type.empty()) {107 if (host_res_type.empty() && logic_dev_id_to_res_type.empty()) {
108- GELOGI("Needn't to record resource info result of compile resource empty");108+ GELOGI("No need to record resource info because compile resource is empty");
109 } else if ((!host_res_type.empty()) && (!logic_dev_id_to_res_type.empty())) {109 } else if ((!host_res_type.empty()) && (!logic_dev_id_to_res_type.empty())) {
110 compile_res_info->set_host_resource_type(host_res_type);110 compile_res_info->set_host_resource_type(host_res_type);
111 auto *const proto_dev_to_type = compile_res_info->mutable_logic_device_id_to_resource_type();111 auto *const proto_dev_to_type = compile_res_info->mutable_logic_device_id_to_resource_type();
112 for (const auto &dev_to_type : logic_dev_id_to_res_type) {112 for (const auto &dev_to_type : logic_dev_id_to_res_type) {
113 // In load balance mode: logic device id is empty. Record all compile resource113 // In load balance mode: logic device id is empty. Record all compile resource
114 if ((!logic_dev_lists.empty()) && (logic_dev_lists.count(dev_to_type.first) == 0UL)) {114 if ((!logic_dev_lists.empty()) && (logic_dev_lists.count(dev_to_type.first) == 0UL)) {
115- GELOGD("Logic device id %s is not assign to any submodel.", dev_to_type.first.c_str());115+ GELOGD("Logic device id %s is not assigned to any submodel.", dev_to_type.first.c_str());
116 continue;116 continue;
117 }117 }
118 (*proto_dev_to_type)[dev_to_type.first] = dev_to_type.second;118 (*proto_dev_to_type)[dev_to_type.first] = dev_to_type.second;
@@ -361,7 +361,7 @@ Status ConfigParser::InitDeployerConfig(const std::vector<ClusterConfig> &cluste
361 361 
362Status ConfigParser::ParseServerInfo(const std::string &file_path, DeployerConfig &deployer_config) {362Status ConfigParser::ParseServerInfo(const std::string &file_path, DeployerConfig &deployer_config) {
363 GE_CHK_BOOL_RET_STATUS(!file_path.empty(), ACL_ERROR_GE_PARAM_INVALID, "File path is null.");363 GE_CHK_BOOL_RET_STATUS(!file_path.empty(), ACL_ERROR_GE_PARAM_INVALID, "File path is null.");
364- GELOGI("Get config json path[%s]successfully", file_path.c_str());364+ GELOGI("Get config json path[%s] successfully", file_path.c_str());
365 365 
366 nlohmann::json json_config;366 nlohmann::json json_config;
367 GE_CHK_STATUS_RET(JsonParser::ReadConfigFile(file_path, json_config), "Read config file:%s failed",367 GE_CHK_STATUS_RET(JsonParser::ReadConfigFile(file_path, json_config), "Read config file:%s failed",
@@ -539,7 +539,7 @@ Status ConfigParser::ParseItemDef(const nlohmann::json &json_config, std::vector
539 539 
540Status ConfigParser::InitNumaConfig(const std::string &file_path, NumaConfig &numa_config) {540Status ConfigParser::InitNumaConfig(const std::string &file_path, NumaConfig &numa_config) {
541 GE_CHK_BOOL_RET_STATUS(!file_path.empty(), ACL_ERROR_GE_PARAM_INVALID, "File path is null.");541 GE_CHK_BOOL_RET_STATUS(!file_path.empty(), ACL_ERROR_GE_PARAM_INVALID, "File path is null.");
542- GELOGI("Get config json path[%s]successfully", file_path.c_str());542+ GELOGI("Get config json path[%s] successfully", file_path.c_str());
543 543 
544 nlohmann::json json_config;544 nlohmann::json json_config;
545 GE_CHK_STATUS_RET(JsonParser::ReadConfigFile(file_path, json_config), "Read config file:%s failed",545 GE_CHK_STATUS_RET(JsonParser::ReadConfigFile(file_path, json_config), "Read config file:%s failed",
@@ -48,7 +48,7 @@ Status Configurations::GetWorkingDir(std::string &working_dir) const {
48 } else {48 } else {
49 working_dir = GetHostDirByEnv();49 working_dir = GetHostDirByEnv();
50 }50 }
51- GE_CHK_BOOL_RET_STATUS(!working_dir.empty(), ACL_ERROR_GE_PARAM_INVALID, "Env HOME don't exist.");51+ GE_CHK_BOOL_RET_STATUS(!working_dir.empty(), ACL_ERROR_GE_PARAM_INVALID, "Env HOME doesn't exist.");
52 GELOGI("Get working dir success, path = %s", working_dir.c_str());52 GELOGI("Get working dir success, path = %s", working_dir.c_str());
53 return SUCCESS;53 return SUCCESS;
54}54}
@@ -222,7 +222,7 @@ Status ProxyEventManager::FreeMbuf(int32_t device_id, rtMbufPtr_t mbuf) {
222 ack.bufLen = sizeof(rsp);222 ack.bufLen = sizeof(rsp);
223 GE_CHK_STATUS_RET(223 GE_CHK_STATUS_RET(
224 SubmitEventSync(device_id, kProxySubEventFreeMbuf, reinterpret_cast<char_t *>(&mbuf_msg), sizeof(mbuf_msg), &ack),224 SubmitEventSync(device_id, kProxySubEventFreeMbuf, reinterpret_cast<char_t *>(&mbuf_msg), sizeof(mbuf_msg), &ack),
225- "Failed to submit alloc mbuf event.");225+ "Failed to submit free mbuf event.");
226 GE_CHK_STATUS_RET(static_cast<uint32_t>(rsp.retCode), "Failed to process alloc mbuf event, ret = %d.", rsp.retCode);226 GE_CHK_STATUS_RET(static_cast<uint32_t>(rsp.retCode), "Failed to process alloc mbuf event, ret = %d.", rsp.retCode);
227 GELOGI("FreeMbuf success, device_id = %d.", device_id);227 GELOGI("FreeMbuf success, device_id = %d.", device_id);
228 return SUCCESS;228 return SUCCESS;
@@ -240,7 +240,7 @@ Status ProxyEventManager::CopyQMbuf(int32_t device_id, uint64_t dest_addr, uint3
240 ack.bufLen = sizeof(rsp);240 ack.bufLen = sizeof(rsp);
241 GE_CHK_STATUS_RET(SubmitEventSync(device_id, kProxySubEventCopyQMbuf, reinterpret_cast<char_t *>(&mbuf_msg),241 GE_CHK_STATUS_RET(SubmitEventSync(device_id, kProxySubEventCopyQMbuf, reinterpret_cast<char_t *>(&mbuf_msg),
242 sizeof(mbuf_msg), &ack),242 sizeof(mbuf_msg), &ack),
243- "Failed to submit alloc mbuf event.");243+ "Failed to submit copy qmbuf event.");
244 GE_CHK_STATUS_RET(static_cast<uint32_t>(rsp.retCode), "Failed to process alloc mbuf event, ret = %d.", rsp.retCode);244 GE_CHK_STATUS_RET(static_cast<uint32_t>(rsp.retCode), "Failed to process alloc mbuf event, ret = %d.", rsp.retCode);
245 GELOGI("CopyQMbuf success, device_id = %d.", device_id);245 GELOGI("CopyQMbuf success, device_id = %d.", device_id);
246 return SUCCESS;246 return SUCCESS;
@@ -173,7 +173,7 @@ void HeterogeneousExchangeService::WaitEvents(const int32_t device_id) {
173 GELOGD("Invoke rtEschedWaitEvent time out");173 GELOGD("Invoke rtEschedWaitEvent time out");
174 }174 }
175 }175 }
176- GELOGI("Event thread exist successfully, device id = %d", device_id);176+ GELOGI("Event thread exited successfully, device id = %d", device_id);
177}177}
178 178 
179Status HeterogeneousExchangeService::EnsureEnqueueSubscribed(const int32_t device_id, const uint32_t queue_id) {179Status HeterogeneousExchangeService::EnsureEnqueueSubscribed(const int32_t device_id, const uint32_t queue_id) {
@@ -274,8 +274,9 @@ bool HeterogeneousExchangeService::IsClientQueue(const uint32_t queue_id) {
274Status HeterogeneousExchangeService::CreateQueue(const int32_t device_id, const string &name,274Status HeterogeneousExchangeService::CreateQueue(const int32_t device_id, const string &name,
275 const MemQueueAttr &mem_queue_attr, uint32_t &queue_id) {275 const MemQueueAttr &mem_queue_attr, uint32_t &queue_id) {
276 if (name.size() > static_cast<size_t>(RT_MQ_MAX_NAME_LEN - 1)) {276 if (name.size() > static_cast<size_t>(RT_MQ_MAX_NAME_LEN - 1)) {
277- GELOGE(PARAM_INVALID, "[CreateQueue] [CheckParam] Length of queue name out of range, name = %s, length = %zu",277+ GELOGE(PARAM_INVALID,
278- name.c_str(), name.size());278+ "[CreateQueue] [CheckParam] Length of queue name out of range, name = %s, length = %zu, max length = %zu",
279+ name.c_str(), name.size(), static_cast<size_t>(RT_MQ_MAX_NAME_LEN - 1));
279 return PARAM_INVALID;280 return PARAM_INVALID;
280 }281 }
281 GELOGD("[CreateQueue] start, device id = %d, queue name = %s, depth = %u, work_mode = %u", device_id, name.c_str(),282 GELOGD("[CreateQueue] start, device id = %d, queue name = %s, depth = %u, work_mode = %u", device_id, name.c_str(),
@@ -502,7 +503,7 @@ Status HeterogeneousExchangeService::MultiThreadCopy(uint8_t *dst, size_t dst_si
502 return SUCCESS;503 return SUCCESS;
503 }504 }
504 GE_CHK_BOOL_RET_STATUS(dst_size >= src_size, PARAM_INVALID,505 GE_CHK_BOOL_RET_STATUS(dst_size >= src_size, PARAM_INVALID,
505- "Multi thread copy failed as dst_size=%zu is small than src_size=%zu", dst_size, src_size);506+ "Multi thread copy failed as dst_size=%zu is smaller than src_size=%zu", dst_size, src_size);
506 507 
507 size_t block_num = (src_size + kMinBatchSize - 1) / kMinBatchSize;508 size_t block_num = (src_size + kMinBatchSize - 1) / kMinBatchSize;
508 block_num = std::min(block_num, kCopyThreadNum + 1);509 block_num = std::min(block_num, kCopyThreadNum + 1);
@@ -1091,7 +1092,7 @@ Status HeterogeneousExchangeService::GenTransId(const int32_t device_id, const u
1091 }1092 }
1092 trans_id = ++last_trans_id_ref;1093 trans_id = ++last_trans_id_ref;
1093 }1094 }
1094- GELOGD("queue[%u] in device[%d] trans id=%lu.", trans_id);1095+ GELOGD("queue[%u] in device[%d] trans id=%lu.", queue_id, device_id, trans_id);
1095 return SUCCESS;1096 return SUCCESS;
1096}1097}
1097 1098 
@@ -100,9 +100,9 @@ Status MemoryGroupManager::ParseRemoteGroupCacheConfig(const std::string &remote
100 "parse pool_alloc_limit[%s] failed, remote_group_cache_config=%s.",100 "parse pool_alloc_limit[%s] failed, remote_group_cache_config=%s.",
101 pool_alloc_limit_str.c_str(), remote_group_cache_config.c_str());101 pool_alloc_limit_str.c_str(), remote_group_cache_config.c_str());
102 GE_CHK_BOOL_RET_STATUS(pool_alloc_limit <= pool_size, PARAM_INVALID,102 GE_CHK_BOOL_RET_STATUS(pool_alloc_limit <= pool_size, PARAM_INVALID,
103- "pool alloc limit[%d] must less than pool size[%ld]", pool_alloc_limit, pool_size);103+ "pool alloc limit[%d] must be less than pool size[%ld]", pool_alloc_limit, pool_size);
104 GE_CHK_BOOL_RET_STATUS((pool_alloc_limit == 0) || (pool_alloc_limit >= kLowerLimit), FAILED,104 GE_CHK_BOOL_RET_STATUS((pool_alloc_limit == 0) || (pool_alloc_limit >= kLowerLimit), FAILED,
105- "The value pool alloc limit[%d] in %s is must be 0 or great or equal %ld.",105+ "The value pool alloc limit[%d] in %s must be 0 or greater than or equal to %ld.",
106 pool_alloc_limit, OPTION_FLOW_GRAPH_MEMORY_MAX_SIZE, kLowerLimit);106 pool_alloc_limit, OPTION_FLOW_GRAPH_MEMORY_MAX_SIZE, kLowerLimit);
107 } else {107 } else {
108 GE_CHK_STATUS_RET(ConvertToInt64(pool_config, pool_size),108 GE_CHK_STATUS_RET(ConvertToInt64(pool_config, pool_size),
@@ -244,7 +244,7 @@ Status MessageClient<Request, Response>::WaitResponseWithMessageId(Response &res
244 int64_t timeout) {244 int64_t timeout) {
245 const int64_t rsp_timeout = (timeout == -1) ? kDefaultTimeout : timeout;245 const int64_t rsp_timeout = (timeout == -1) ? kDefaultTimeout : timeout;
246 std::unique_lock<std::mutex> lk(mu_);246 std::unique_lock<std::mutex> lk(mu_);
247- GE_CHK_STATUS_RET(get_stat_func_(), "Process already exit");247+ GE_CHK_STATUS_RET(get_stat_func_(), "Process already exited");
248 response_cv_.wait_for(lk, std::chrono::seconds(rsp_timeout), [this, message_id] {248 response_cv_.wait_for(lk, std::chrono::seconds(rsp_timeout), [this, message_id] {
249 return (!running_) || (responses_received_.find(message_id) != responses_received_.cend());249 return (!running_) || (responses_received_.find(message_id) != responses_received_.cend());
250 });250 });
@@ -263,7 +263,7 @@ Status MessageClient<Request, Response>::WaitResponse(Response &response, int64_
263 std::shared_ptr<Response> rsp;263 std::shared_ptr<Response> rsp;
264 const int64_t retry_times = (timeout == -1) ? kDefaultRetryTimes : std::max(timeout / kDequeueTimeoutInSec, 1L);264 const int64_t retry_times = (timeout == -1) ? kDefaultRetryTimes : std::max(timeout / kDequeueTimeoutInSec, 1L);
265 for (int32_t i = 0; i < retry_times; ++i) {265 for (int32_t i = 0; i < retry_times; ++i) {
266- GE_CHK_STATUS_RET(get_stat_func_(), "Process already exit");266+ GE_CHK_STATUS_RET(get_stat_func_(), "Process already exited");
267 GE_CHK_BOOL_RET_STATUS(running_, FAILED, "Wait response failed as stopped");267 GE_CHK_BOOL_RET_STATUS(running_, FAILED, "Wait response failed as stopped");
268 auto ret = DequeueMessage(rsp);268 auto ret = DequeueMessage(rsp);
269 if (ret == SUCCESS) {269 if (ret == SUCCESS) {
@@ -281,7 +281,7 @@ Status SubprocessManager::GetFlowGwBinDir(const std::string &bin_dir, std::strin
281 if (FileExist(bin_dir + "/host_queue_schedule")) {281 if (FileExist(bin_dir + "/host_queue_schedule")) {
282 flowgw_bin_dir = RealPath((bin_dir + "/host_queue_schedule").c_str());282 flowgw_bin_dir = RealPath((bin_dir + "/host_queue_schedule").c_str());
283 }283 }
284- GELOGI("flowgw bin dir = %s.", flowgw_bin_dir.c_str());284+ GELOGI("flow gateway bin dir = %s.", flowgw_bin_dir.c_str());
285 return SUCCESS;285 return SUCCESS;
286}286}
287 287 
@@ -134,7 +134,7 @@ void HeterogeneousProfiler::ProcessDetailTimeStamp() {
134 uint64_t input_end_timestamp = GetMinMaxStartTimestampByIndex(enqueue_end_total_record_, i, false);134 uint64_t input_end_timestamp = GetMinMaxStartTimestampByIndex(enqueue_end_total_record_, i, false);
135 if ((input_start_timestamp != std::numeric_limits<uint64_t>::max()) && (input_end_timestamp != 0UL) &&135 if ((input_start_timestamp != std::numeric_limits<uint64_t>::max()) && (input_end_timestamp != 0UL) &&
136 (input_start_timestamp <= input_end_timestamp)) {136 (input_start_timestamp <= input_end_timestamp)) {
137- GEEVENT("[HeterogeneousProfiler] [Iterator]:%zu [Input prepare duration]:%lu", i,137+ GEEVENT("[HeterogeneousProfiler] [Iterator]:%zu [Input prepare duration]:%lu us", i,
138 (input_end_timestamp - input_start_timestamp));138 (input_end_timestamp - input_start_timestamp));
139 } else {139 } else {
140 GEEVENT("[HeterogeneousProfiler] [Iterator]:%zu Invalid timestamp: input start:%lu end:%lu", i,140 GEEVENT("[HeterogeneousProfiler] [Iterator]:%zu Invalid timestamp: input start:%lu end:%lu", i,
@@ -157,8 +157,8 @@ void HeterogeneousProfiler::PrintAvgHeterogeneousProfilerData(const Heterogeneou
157 ss << "[Event type]:Invalid" << static_cast<int32_t>(key.profiler_event) << ", ";157 ss << "[Event type]:Invalid" << static_cast<int32_t>(key.profiler_event) << ", ";
158 }158 }
159 if (recordNum != 0U) {159 if (recordNum != 0U) {
160- ss << "[PerDuration]:" << totalDuration / recordNum << ", [Times]:" << recordNum << ", ";160+ ss << "[PerDuration]:" << totalDuration / recordNum << " us, [Times]:" << recordNum << ", ";
161- ss << "[MaxDuration]:" << maxDuration;161+ ss << "[MaxDuration]:" << maxDuration << " us";
162 }162 }
163 GEEVENT("[PerHeterogeneousProfiler] %s", ss.str().c_str());163 GEEVENT("[PerHeterogeneousProfiler] %s", ss.str().c_str());
164}164}
@@ -79,7 +79,8 @@ Status DaemonClientManager::CreateAndInitClient(const std::string &peer_uri,
79 std::lock_guard<std::mutex> lk(mu_);79 std::lock_guard<std::mutex> lk(mu_);
80 if (clients_.size() == kMaxClientSize) {80 if (clients_.size() == kMaxClientSize) {
81 REPORT_INNER_ERR_MSG("E19999", "Client size has reached the upper limit[%zu]", kMaxClientSize);81 REPORT_INNER_ERR_MSG("E19999", "Client size has reached the upper limit[%zu]", kMaxClientSize);
82- GELOGE(FAILED, "[Create][Client]Client size has reached the upper limit[%zu]", kMaxClientSize);82+ GELOGE(FAILED, "[Create][Client]Client size [%zu] has reached the upper limit[%zu]", clients_.size(),
83+ kMaxClientSize);
83 return FAILED;84 return FAILED;
84 }85 }
85 int64_t new_client_id = client_id_gen_;86 int64_t new_client_id = client_id_gen_;
@@ -131,7 +131,7 @@ Status DeployerDaemonClient::ProcessHeartbeatRequest(const deployer::DeployerReq
131 deployer::DeployerResponse &response) {131 deployer::DeployerResponse &response) {
132 GE_CHECK_NOTNULL(deployer_msg_client_);132 GE_CHECK_NOTNULL(deployer_msg_client_);
133 if (sub_deployer_proc_stat_ == ProcStatus::NORMAL) {133 if (sub_deployer_proc_stat_ == ProcStatus::NORMAL) {
134- GELOGI("[Process][Request] client heartbeat dose not expired, client_id = %ld.", client_id_);134+ GELOGI("[Process][Request] client heartbeat does not expired, client_id = %ld.", client_id_);
135 GE_CHK_STATUS_RET(deployer_msg_client_->SendRequest(request, response, kHeartbeatTimeoutSec));135 GE_CHK_STATUS_RET(deployer_msg_client_->SendRequest(request, response, kHeartbeatTimeoutSec));
136 } else if (sub_deployer_proc_stat_ == ProcStatus::EXITED) {136 } else if (sub_deployer_proc_stat_ == ProcStatus::EXITED) {
137 response.set_error_code(FAILED);137 response.set_error_code(FAILED);
@@ -106,7 +106,7 @@ Status AbnormalStatusHandler::ParseDeviceStateList(const std::string &file_path,
106 GELOGI("AbnormalStatusMonitor, show new node info on server");106 GELOGI("AbnormalStatusMonitor, show new node info on server");
107 ShowNodeInfo(information_new);107 ShowNodeInfo(information_new);
108 GE_CHK_STATUS_RET(FindAbnormalDeviceOnServer(device_state_list, information_new, information_old),108 GE_CHK_STATUS_RET(FindAbnormalDeviceOnServer(device_state_list, information_new, information_old),
109- "AbnormalStatusMonitor, failed to do FindAbnormalDevice if is on server");109+ "AbnormalStatusMonitor, failed to do FindAbnormalDevice if it is on server");
110 return SUCCESS;110 return SUCCESS;
111}111}
112 112 
@@ -212,7 +212,7 @@ bool AbnormalStatusHandler::IsModelMulInstance(std::map<const std::string, bool>
212 212 
213bool AbnormalStatusHandler::IsSupportDynamicSchedRecover(const uint32_t &root_model_id) {213bool AbnormalStatusHandler::IsSupportDynamicSchedRecover(const uint32_t &root_model_id) {
214 if (!is_dynamic_sched_) {214 if (!is_dynamic_sched_) {
215- GELOGI("AbnormalStatusMonitor, is_dynamic_sched_ is unenable");215+ GELOGI("AbnormalStatusMonitor, is_dynamic_sched_ is not enabled");
216 return false;216 return false;
217 }217 }
218 218 
@@ -236,7 +236,7 @@ Status AbnormalStatusHandler::GenerateFile(const std::string &file_path, const c
236 file_path.c_str());236 file_path.c_str());
237 std::string new_file_path = file_path.substr(0, pos + 1) + file_name;237 std::string new_file_path = file_path.substr(0, pos + 1) + file_name;
238 std::ofstream file(new_file_path);238 std::ofstream file(new_file_path);
239- GE_CHK_BOOL_RET_STATUS(file.is_open(), FAILED, "AbnormalStatusMonitor, failed generate path[%s]",239+ GE_CHK_BOOL_RET_STATUS(file.is_open(), FAILED, "AbnormalStatusMonitor, failed to generate path[%s]",
240 new_file_path.c_str());240 new_file_path.c_str());
241 file.close();241 file.close();
242 GEEVENT("AbnormalStatusMonitor, the path[%s] has generated", new_file_path.c_str());242 GEEVENT("AbnormalStatusMonitor, the path[%s] has generated", new_file_path.c_str());
@@ -322,7 +322,7 @@ void AbnormalStatusHandler::AbnormalDiffDevices2ModelInstances(
322 model_instance_info.first.c_str());322 model_instance_info.first.c_str());
323 continue;323 continue;
324 } else {324 } else {
325- GELOGI("AbnormalStatusMonitor, model instance[%s] is add to abnormal list", model_instance_info.first.c_str());325+ GELOGI("AbnormalStatusMonitor, model instance[%s] is added to abnormal list", model_instance_info.first.c_str());
326 Add2ModelInstanceList(root_model_id, model_instance_info.first, abnormal_submodel_instances_name_);326 Add2ModelInstanceList(root_model_id, model_instance_info.first, abnormal_submodel_instances_name_);
327 is_new_abnormal = true;327 is_new_abnormal = true;
328 }328 }
@@ -435,7 +435,7 @@ Status AbnormalStatusHandler::FileMonitorProc(const std::string &file_path) {
435 // host异常,无法恢复业务, 写redeploy.error文件435 // host异常,无法恢复业务, 写redeploy.error文件
436 GE_CHK_STATUS_RET(AfterHandleAbnormalInfo(file_path, kRedeployErrorFileName),436 GE_CHK_STATUS_RET(AfterHandleAbnormalInfo(file_path, kRedeployErrorFileName),
437 "AbnormalStatusMonitor, failed to do AfterHandleAbnormalInfo, kRedeployErrorFileName");437 "AbnormalStatusMonitor, failed to do AfterHandleAbnormalInfo, kRedeployErrorFileName");
438- GELOGE(FAILED, "AbnormalStatusMonitor, it(cause by abnormal device) can't recover by redeploying");438+ GELOGE(FAILED, "AbnormalStatusMonitor, it(caused by abnormal device) can't recover by redeploying");
439 }439 }
440 if (ParallelAbnormalStatusHandle(check_devices_flag) == SUCCESS) {440 if (ParallelAbnormalStatusHandle(check_devices_flag) == SUCCESS) {
441 GE_CHK_STATUS_RET(AfterHandleAbnormalInfo(file_path, kRedeployDoneFileName),441 GE_CHK_STATUS_RET(AfterHandleAbnormalInfo(file_path, kRedeployDoneFileName),
@@ -518,7 +518,7 @@ void AbnormalStatusHandler::MonitorFileAndHeartbeatProc(const std::string &file_
518 }518 }
519 continue;519 continue;
520 }520 }
521- GELOGI("AbnormalStatusMonitor, The path[%s] is different, parser the different type", file_path.c_str());521+ GELOGI("AbnormalStatusMonitor, The path[%s] is different, parse the different type", file_path.c_str());
522 char_t *event_buf = buf;522 char_t *event_buf = buf;
523 bool resource_config_modify = false;523 bool resource_config_modify = false;
524 while (event_buf < buf + len) {524 while (event_buf < buf + len) {
@@ -660,7 +660,7 @@ Status AbnormalStatusHandler::HeartbeatMonitorProc() {
660 PreHandleAbnormalInfo();660 PreHandleAbnormalInfo();
661 auto check_devices_flag = CheckAbnormalDevices(device_state_list);661 auto check_devices_flag = CheckAbnormalDevices(device_state_list);
662 if (check_devices_flag == kNotSupportRedeploy) {662 if (check_devices_flag == kNotSupportRedeploy) {
663- GELOGE(FAILED, "AbnormalStatusMonitor, it(cause by abnormal process) can't recover by redeploying");663+ GELOGE(FAILED, "AbnormalStatusMonitor, it(caused by abnormal process) can't recover by redeploying");
664 }664 }
665 GE_CHK_STATUS_RET(ParallelAbnormalStatusHandle(check_devices_flag),665 GE_CHK_STATUS_RET(ParallelAbnormalStatusHandle(check_devices_flag),
666 "AbnormalStatusMonitor, failed to do ParallelAbnormalStatusHandle");666 "AbnormalStatusMonitor, failed to do ParallelAbnormalStatusHandle");
Mdflow/deployer/deploy/deployer/deploy_context.cc+1-1文件内容审核中,请稍后刷新重试
@@ -173,7 +173,8 @@ bool DeployState::GetDynamicProxyControlledFlag(const uint32_t submodel_id) cons
173 static_cast<int32_t>(iter->second), root_model_id_, submodel_id);173 static_cast<int32_t>(iter->second), root_model_id_, submodel_id);
174 return iter->second;174 return iter->second;
175 }175 }
176- GEEVENT("Not find dynamic proxy controlled flag, root_model_id = %u, submodel_id = %u.", root_model_id_, submodel_id);176+ GEEVENT("Failed to find dynamic proxy controlled flag, root_model_id = %u, submodel_id = %u.", root_model_id_,
177+ submodel_id);
177 return false;178 return false;
178}179}
179 180 
@@ -30,7 +30,7 @@ constexpr uint32_t kInitTryWaitInterval = 1000; // millisconds
30} // namespace30} // namespace
31 31 
32void Deployer::FormatAndAddAbnormalDeviceInfo(int32_t node_id, int32_t device_id, int32_t device_type) {32void Deployer::FormatAndAddAbnormalDeviceInfo(int32_t node_id, int32_t device_id, int32_t device_type) {
33- GELOGI("ParseRsponse: node_id=%d, device id=%d, device type=%d", node_id, device_id, device_type);33+ GELOGI("ParseResponse: node_id=%d, device id=%d, device type=%d", node_id, device_id, device_type);
34 auto &deploy_context = DeployContext::LocalContext();34 auto &deploy_context = DeployContext::LocalContext();
35 std::lock_guard<std::mutex> lk(deploy_context.GetAbnormalHeartbeatInfoMu());35 std::lock_guard<std::mutex> lk(deploy_context.GetAbnormalHeartbeatInfoMu());
36 DeployPlan::DeviceInfo device_info = DeployPlan::DeviceInfo(device_type, node_id, device_id);36 DeployPlan::DeviceInfo device_info = DeployPlan::DeviceInfo(device_type, node_id, device_id);
@@ -86,7 +86,7 @@ void Deployer::ParseRsponse(deployer::DeployerResponse &response) {
86 for (auto &submodel_instance : submodel_instances.second.submodel_instance_name()) {86 for (auto &submodel_instance : submodel_instances.second.submodel_instance_name()) {
87 std::lock_guard<std::mutex> lk(deploy_context.GetAbnormalHeartbeatInfoMu());87 std::lock_guard<std::mutex> lk(deploy_context.GetAbnormalHeartbeatInfoMu());
88 deploy_context.AddAbnormalSubmodelInstanceName(submodel_instances.first, submodel_instance.first);88 deploy_context.AddAbnormalSubmodelInstanceName(submodel_instances.first, submodel_instance.first);
89- GELOGI("ParseRsponse: root model id=%u, abnormal model instance is %s", submodel_instances.first,89+ GELOGI("ParseResponse: root model id=%u, abnormal model instance is %s", submodel_instances.first,
90 submodel_instance.first.c_str());90 submodel_instance.first.c_str());
91 }91 }
92 }92 }
@@ -177,7 +177,7 @@ Status LocalDeployer::Finalize() {
177}177}
178 178 
179void LocalDeployer::AddAbnormalDeviceInfo(int32_t device_id, int32_t device_type) {179void LocalDeployer::AddAbnormalDeviceInfo(int32_t device_id, int32_t device_type) {
180- GELOGI("LocalDeployer ParseRsponse: device id=%d, device type=%d", device_id, device_type);180+ GELOGI("LocalDeployer ParseResponse: device id=%d, device type=%d", device_id, device_type);
181 FormatAndAddAbnormalDeviceInfo(0, device_id, device_type);181 FormatAndAddAbnormalDeviceInfo(0, device_id, device_type);
182}182}
183 183 
@@ -231,7 +231,7 @@ Status RemoteDeployer::InitNodeInfoByDeviceList() {
231 231 
232Status RemoteDeployer::InitNodeInfoByChipCount() {232Status RemoteDeployer::InitNodeInfoByChipCount() {
233 if ((node_info_.GetDeviceList().size() != 0UL) && (node_config_.chip_count != 0U)) {233 if ((node_info_.GetDeviceList().size() != 0UL) && (node_config_.chip_count != 0U)) {
234- GELOGE(FAILED, "It is not supported to set chip count when device list detail info is existed.");234+ GELOGE(FAILED, "It is not supported to set chip count when device list detail info exists.");
235 return FAILED;235 return FAILED;
236 }236 }
237 for (uint32_t i = 0U; i < node_config_.chip_count; ++i) {237 for (uint32_t i = 0U; i < node_config_.chip_count; ++i) {
@@ -466,12 +466,12 @@ Status RemoteDeployer::Process(deployer::DeployerRequest &request, deployer::Dep
466}466}
467 467 
468void RemoteDeployer::AddAbnormalDeviceInfo(int32_t device_id, int32_t device_type) {468void RemoteDeployer::AddAbnormalDeviceInfo(int32_t device_id, int32_t device_type) {
469- GELOGI("RemoteDeployer ParseRsponse: device id=%d, device type=%d", device_id, device_type);469+ GELOGI("RemoteDeployer ParseResponse: device id=%d, device type=%d", device_id, device_type);
470 FormatAndAddAbnormalDeviceInfo(node_config_.node_id, device_id, device_type);470 FormatAndAddAbnormalDeviceInfo(node_config_.node_id, device_id, device_type);
471}471}
472 472 
473void RemoteDeployer::AddAbnormalNodeConfig() {473void RemoteDeployer::AddAbnormalNodeConfig() {
474- GELOGI("RemoteDeployer ParseRsponse: node id=%d", node_config_.node_id);474+ GELOGI("RemoteDeployer ParseResponse: node id=%d", node_config_.node_id);
475 auto &deploy_context = DeployContext::LocalContext();475 auto &deploy_context = DeployContext::LocalContext();
476 std::lock_guard<std::mutex> lk(deploy_context.GetAbnormalHeartbeatInfoMu());476 std::lock_guard<std::mutex> lk(deploy_context.GetAbnormalHeartbeatInfoMu());
477 deploy_context.AddAbnormalNodeConfig(node_config_);477 deploy_context.AddAbnormalNodeConfig(node_config_);
@@ -61,10 +61,10 @@ Status HeterogeneousModelDeployer::DoDeployModelWithFlow(DeployContext &deploy_c
61 // 4_1. distribute flow route plan61 // 4_1. distribute flow route plan
62 GE_TIMESTAMP_START(TransferPlan);62 GE_TIMESTAMP_START(TransferPlan);
63 GE_CHK_BOOL_RET_STATUS(FlowModelSender::TransferFlowRoutePlan(deploy_state) == SUCCESS, FAILED,63 GE_CHK_BOOL_RET_STATUS(FlowModelSender::TransferFlowRoutePlan(deploy_state) == SUCCESS, FAILED,
64- "Failed to dispatched FlowRoutePlan");64+ "Failed to dispatch FlowRoutePlan");
65 // 4_2. distribute deploy plan65 // 4_2. distribute deploy plan
66 GE_CHK_BOOL_RET_STATUS(FlowModelSender::TransferDeployPlan(deploy_state) == SUCCESS, FAILED,66 GE_CHK_BOOL_RET_STATUS(FlowModelSender::TransferDeployPlan(deploy_state) == SUCCESS, FAILED,
67- "Failed to dispatched DeployPlan");67+ "Failed to dispatch DeployPlan");
68 GE_TIMESTAMP_EVENT_END(TransferPlan, "deploying in TransferPlan stage");68 GE_TIMESTAMP_EVENT_END(TransferPlan, "deploying in TransferPlan stage");
69 69 
70 // pre-deploy local flow route70 // pre-deploy local flow route
@@ -151,7 +151,7 @@ Status HeterogeneousModelDeployer::BuildDeployPlan(DeployState &deploy_state) {
151 if (pne_model->GetModelType().empty()) {151 if (pne_model->GetModelType().empty()) {
152 pne_model->SetModelType(is_host_cpu ? PNE_ID_CPU : PNE_ID_NPU);152 pne_model->SetModelType(is_host_cpu ? PNE_ID_CPU : PNE_ID_NPU);
153 }153 }
154- GELOGI("Model [%s] will deployed on engine [%s]", it.first.c_str(), pne_model->GetModelType().c_str());154+ GELOGI("Model [%s] will be deployed on engine [%s]", it.first.c_str(), pne_model->GetModelType().c_str());
155 }155 }
156 156 
157 // build deploy plan157 // build deploy plan
@@ -177,7 +177,7 @@ Status HeterogeneousModelDeployer::LoadSubmodels(DeployContext &deploy_context,
177 unique_node_ids.emplace(target_device.GetNodeId());177 unique_node_ids.emplace(target_device.GetNodeId());
178 int32_t device_id = it.second.device_info.GetDeviceId();178 int32_t device_id = it.second.device_info.GetDeviceId();
179 it.second.model->SetDeviceId(device_id);179 it.second.model->SetDeviceId(device_id);
180- GELOGI("Success to set device id:%d, submodel:%s", device_id, it.second.model->GetModelName().c_str());180+ GELOGI("Successfully set device id:%d, submodel:%s", device_id, it.second.model->GetModelName().c_str());
181 }181 }
182 if (!deploy_state.local_submodel_descs_.empty()) {182 if (!deploy_state.local_submodel_descs_.empty()) {
183 unique_node_ids.emplace(local_node_id);183 unique_node_ids.emplace(local_node_id);
@@ -231,7 +231,7 @@ int32_t MasterModelDeployer::GetRankTableOrder() {
231 std::lock_guard<std::mutex> lk(mu_);231 std::lock_guard<std::mutex> lk(mu_);
232 static int32_t creat_rank_table_cnt = 0;232 static int32_t creat_rank_table_cnt = 0;
233 creat_rank_table_cnt++;233 creat_rank_table_cnt++;
234- GELOGD("[CreateRankTable] begin, creat_rank_table_cnt is %d.", creat_rank_table_cnt);234+ GELOGD("[CreateRankTable] begin, create_rank_table_cnt is %d.", creat_rank_table_cnt);
235 return creat_rank_table_cnt;235 return creat_rank_table_cnt;
236}236}
237 237 
@@ -416,9 +416,9 @@ Status MasterModelDeployer::UpdateProfilingInfo(const bool is_prof_start) {
416 }416 }
417 }417 }
418 GE_CHK_STATUS(DeployContext::LocalContext().UpdateLocalProfiling(is_prof_start, config_data, model_ids),418 GE_CHK_STATUS(DeployContext::LocalContext().UpdateLocalProfiling(is_prof_start, config_data, model_ids),
419- "Filed to UpdateLocalProfilingInfo");419+ "Failed to UpdateLocalProfilingInfo");
420 GE_CHK_STATUS(HeterogeneousModelDeployer::UpdateRemoteProfiling(is_prof_start, config_data, model_id_to_nodes),420 GE_CHK_STATUS(HeterogeneousModelDeployer::UpdateRemoteProfiling(is_prof_start, config_data, model_id_to_nodes),
421- "Filed to UpdateRemoteProfiling");421+ "Failed to UpdateRemoteProfiling");
422 return SUCCESS;422 return SUCCESS;
423}423}
424 424 
@@ -303,7 +303,8 @@ Status UdfExecutorClient::NotifyUdfContinue(const std::shared_ptr<ExecutorMessag
303Status UdfExecutorClient::GrantAndGetUdfAicpuPid(int32_t phy_device_id, pid_t udf_pid, pid_t &aicpu_pid) {303Status UdfExecutorClient::GrantAndGetUdfAicpuPid(int32_t phy_device_id, pid_t udf_pid, pid_t &aicpu_pid) {
304 GE_CHK_STATUS_RET(RtsApiUtils::GetAicpuSchedulePid(phy_device_id, udf_pid, aicpu_pid),304 GE_CHK_STATUS_RET(RtsApiUtils::GetAicpuSchedulePid(phy_device_id, udf_pid, aicpu_pid),
305 "Query aicpu schedule failed, device_id=%d, udf_pid=%d.", phy_device_id, udf_pid);305 "Query aicpu schedule failed, device_id=%d, udf_pid=%d.", phy_device_id, udf_pid);
306- GELOGI("io will take by aicpu schedule, device_id=%d, udf_pid=%d, aicpu_pid=%d.", phy_device_id, udf_pid, aicpu_pid);306+ GELOGI("io will be taken over by aicpu schedule, device_id=%d, udf_pid=%d, aicpu_pid=%d.", phy_device_id, udf_pid,
307+ aicpu_pid);
307 308 
308 const auto &remote_group_name = MemoryGroupManager::GetInstance().GetRemoteMemGroupName(phy_device_id);309 const auto &remote_group_name = MemoryGroupManager::GetInstance().GetRemoteMemGroupName(phy_device_id);
309 GE_CHK_STATUS_RET(310 GE_CHK_STATUS_RET(
@@ -793,7 +794,7 @@ Status UdfExecutorClient::ForkChildProcess(const deployer::ExecutorRequest_LoadM
793 }794 }
794 // only LD_LIBRARY_PATH need set, other env can be inherited by subprocess795 // only LD_LIBRARY_PATH need set, other env can be inherited by subprocess
795 config.envs.emplace("LD_LIBRARY_PATH", new_ld_library_path);796 config.envs.emplace("LD_LIBRARY_PATH", new_ld_library_path);
796- GELOGD("LD_LIBRARY_PATH is been set to %s", new_ld_library_path.c_str());797+ GELOGD("LD_LIBRARY_PATH has been set to %s", new_ld_library_path.c_str());
797 config.unset_envs = Configurations::GetHeterogeneousEnvs();798 config.unset_envs = Configurations::GetHeterogeneousEnvs();
798 799 
799 GE_CHK_STATUS_RET(SubprocessManager::GetInstance().ForkSubprocess(config, child_pid), "Failed to fork %s.",800 GE_CHK_STATUS_RET(SubprocessManager::GetInstance().ForkSubprocess(config, child_pid), "Failed to fork %s.",
@@ -63,7 +63,7 @@ Status UdfProxyClient::LoadModel(deployer::ExecutorRequest_BatchLoadModelMessage
63 const auto &msg_file_path = msg_file_paths[i];63 const auto &msg_file_path = msg_file_paths[i];
64 GE_CHK_STATUS_RET(LoadProcess(model_desc, msg_file_path, group_name), "Failed to load model.");64 GE_CHK_STATUS_RET(LoadProcess(model_desc, msg_file_path, group_name), "Failed to load model.");
65 }65 }
66- GE_TIMESTAMP_EVENT_END(LoadProcess, "starting poxy udf and loading models during deploying");66+ GE_TIMESTAMP_EVENT_END(LoadProcess, "starting proxy udf and loading models during deploying");
67 GEEVENT("[Load][Model] success.");67 GEEVENT("[Load][Model] success.");
68 return SUCCESS;68 return SUCCESS;
69}69}
@@ -179,7 +179,7 @@ Status UdfProxyClient::ForkChildProcess(const deployer::ExecutorRequest_LoadMode
179 } else {179 } else {
180 config.process_type = PNE_ID_UDF;180 config.process_type = PNE_ID_UDF;
181 ld_library_path = model_path + "_dir";181 ld_library_path = model_path + "_dir";
182- GELOGD("LD_LIBRARY_PATH is been set to %s", ld_library_path.c_str());182+ GELOGD("LD_LIBRARY_PATH has been set to %s", ld_library_path.c_str());
183 }183 }
184 config.args = {"udf_executor"};184 config.args = {"udf_executor"};
185 config.kv_args = {{"--load_path", file_path},185 config.kv_args = {{"--load_path", file_path},
@@ -206,7 +206,7 @@ Status UdfProxyClient::ForkChildProcess(const deployer::ExecutorRequest_LoadMode
206 GE_CHK_STATUS_RET(TsdClient::GetInstance().ForkSubprocess(GetDeviceId(), config, ld_library_path, child_pid),206 GE_CHK_STATUS_RET(TsdClient::GetInstance().ForkSubprocess(GetDeviceId(), config, ld_library_path, child_pid),
207 "Failed to fork udf_executor on device[%d], model_path=%s, is_builtin=%d.", GetDeviceId(),207 "Failed to fork udf_executor on device[%d], model_path=%s, is_builtin=%d.", GetDeviceId(),
208 model_path.c_str(), static_cast<int32_t>(params.is_builtin));208 model_path.c_str(), static_cast<int32_t>(params.is_builtin));
209- GELOGI("for child process success, model_path=%s, is_builtin=%d", model_path.c_str(),209+ GELOGI("fork child process success, model_path=%s, is_builtin=%d", model_path.c_str(),
210 static_cast<int32_t>(params.is_builtin));210 static_cast<int32_t>(params.is_builtin));
211 return SUCCESS;211 return SUCCESS;
212}212}
@@ -650,8 +650,8 @@ Status FlowGwClient::ConfigSchedInfoToDataGw(const uint32_t device_id, const int
650 "DynamicSched Grant src queue failed, device id=%u, input queue id=%d, datagw pid=%d", device_id,650 "DynamicSched Grant src queue failed, device id=%u, input queue id=%d, datagw pid=%d", device_id,
651 input, pid_);651 input, pid_);
652 GE_CHK_STATUS_RET(GrantQueue(device_id, output, pid_, GrantType::kWriteOnly),652 GE_CHK_STATUS_RET(GrantQueue(device_id, output, pid_, GrantType::kWriteOnly),
653- "DynamicSched Grant src queue failed, device id=%u, output queue id=%d, datagw pid=%d", device_id,653+ "DynamicSched Grant output queue failed, device id=%u, output queue id=%d, datagw pid=%d",
654- output, pid_);654+ device_id, output, pid_);
655 GELOGI("DynamicSched Grant src queue succ, device id=%u, input queue id=%d, output queue id=%d, datagw pid=%d",655 GELOGI("DynamicSched Grant src queue succ, device id=%u, input queue id=%d, output queue id=%d, datagw pid=%d",
656 device_id, input, output, pid_);656 device_id, input, output, pid_);
657 657 
@@ -150,7 +150,7 @@ Status HeterogeneousExchangeDeployer::PreDeploy() {
150 if (!pre_deployed_) {150 if (!pre_deployed_) {
151 GE_CHK_STATUS_RET(CreateHcomHandles(), "Failed to create hcom handles");151 GE_CHK_STATUS_RET(CreateHcomHandles(), "Failed to create hcom handles");
152 GE_CHK_STATUS_RET(CreateExchangeEndpoints(), "Failed to create endpoints");152 GE_CHK_STATUS_RET(CreateExchangeEndpoints(), "Failed to create endpoints");
153- GE_CHK_STATUS_RET(BindEndpoints(GetBindingsBeforeLoad()), "Failed to create endpoints");153+ GE_CHK_STATUS_RET(BindEndpoints(GetBindingsBeforeLoad()), "Failed to bind endpoints");
154 pre_deployed_ = true;154 pre_deployed_ = true;
155 }155 }
156 return SUCCESS;156 return SUCCESS;
@@ -269,7 +269,7 @@ Status TsdClient::ForkSubprocess(int32_t device_id, const SubprocessManager::Sub
269 args.pathLen = file_path.length();269 args.pathLen = file_path.length();
270 }270 }
271 GE_CHK_STATUS_RET(proc(static_cast<uint32_t>(device_id), &args),271 GE_CHK_STATUS_RET(proc(static_cast<uint32_t>(device_id), &args),
272- "Failed to open subprocess, device_id = %d, type = %d", device_id, config.process_type.c_str());272+ "Failed to open subprocess, device_id = %d, type = %s", device_id, config.process_type.c_str());
273 GELOGI("Fork process success, process_type = %s, device_id = %d.", subprocess_config.process_type.c_str(), device_id);273 GELOGI("Fork process success, process_type = %s, device_id = %d.", subprocess_config.process_type.c_str(), device_id);
274 return SUCCESS;274 return SUCCESS;
275}275}
Mdflow/deployer/deploy/model_send/flow_model_sender.cc+2-2文件内容审核中,请稍后刷新重试
@@ -95,7 +95,7 @@ Status HeterogeneousDeployPlanner::PrepareModelsAndRelation(ModelRelation &model
95 GELOGD("start to build deploy plan for single model");95 GELOGD("start to build deploy plan for single model");
96 GE_CHK_STATUS_RET(PrepareForSingleFlowModel(name_to_models, model_relation), "Failed to init for single model");96 GE_CHK_STATUS_RET(PrepareForSingleFlowModel(name_to_models, model_relation), "Failed to init for single model");
97 } else {97 } else {
98- GELOGD("start to build deploy plan for multiply models");98+ GELOGD("start to build deploy plan for multiple models");
99 GE_CHK_STATUS_RET(MergeModels(name_to_models, model_relation), "Failed to merge models by relation");99 GE_CHK_STATUS_RET(MergeModels(name_to_models, model_relation), "Failed to merge models by relation");
100 GE_CHK_STATUS_RET(ValidateModelAndRelation(name_to_models, model_relation),100 GE_CHK_STATUS_RET(ValidateModelAndRelation(name_to_models, model_relation),
101 "Failed to validate model and relation after merging submodels");101 "Failed to validate model and relation after merging submodels");
@@ -57,7 +57,7 @@ void ResourceAllocator::SetCheckCompileResource(const FlowModelPtr &flow_model)
57 if (compile_resource_ == nullptr ||57 if (compile_resource_ == nullptr ||
58 ((compile_resource_ != nullptr) && compile_resource_->host_resource_type.empty() &&58 ((compile_resource_ != nullptr) && compile_resource_->host_resource_type.empty() &&
59 compile_resource_->logic_dev_id_to_res_type.empty())) {59 compile_resource_->logic_dev_id_to_res_type.empty())) {
60- GELOGI("Need't to check compile resource info");60+ GELOGI("No need to check compile resource info");
61 return;61 return;
62 }62 }
63 std::map<std::string, std::string> valid_dev_to_res_type;63 std::map<std::string, std::string> valid_dev_to_res_type;
@@ -952,7 +952,7 @@ Status DynamicModelExecutor::ReportStatus() {
952 rtMemQueueInfo_t info;952 rtMemQueueInfo_t info;
953 const auto ret = rtMemQueueQueryInfo(device_id_, input_queue_id, &info);953 const auto ret = rtMemQueueQueryInfo(device_id_, input_queue_id, &info);
954 if (ret != RT_ERROR_NONE) {954 if (ret != RT_ERROR_NONE) {
955- GELOGI("Queue info query returned %d for queue %u, device %d.", input_queue_id, device_id_, ret);955+ GELOGI("Queue %u info query failed on device %d, ret = %d.", input_queue_id, device_id_, ret);
956 } else {956 } else {
957 queue_depth = info.size;957 queue_depth = info.size;
958 }958 }
@@ -1006,7 +1006,7 @@ void DynamicModelExecutor::Stop() {
1006 (void)aclrtFree(new_allocated_global_step_);1006 (void)aclrtFree(new_allocated_global_step_);
1007 }1007 }
1008 new_allocated_global_step_ = nullptr;1008 new_allocated_global_step_ = nullptr;
1009- GELOGI("Global step is allocated in dynamic model executor which need to be deallocated when executor stopping");1009+ GELOGI("Global step is allocated in dynamic model executor which needs to be deallocated when executor stopping");
1010}1010}
1011 1011 
1012Status DynamicModelExecutor::CreateFakeAicpuModelAndStream() {1012Status DynamicModelExecutor::CreateFakeAicpuModelAndStream() {
@@ -1038,7 +1038,7 @@ Status DynamicModelExecutor::DoLoadModel(const ModelData &model_data, const Comp
1038 GE_ASSERT_TRUE(ret == ACL_SUCCESS, "ACL set device id failed.");1038 GE_ASSERT_TRUE(ret == ACL_SUCCESS, "ACL set device id failed.");
1039 aclrtSetCurrentContext(rt_context_);1039 aclrtSetCurrentContext(rt_context_);
1040 GE_CHK_STATUS_RET(InitExternalWeightMem(root_graph, external_weight_mem_data_),1040 GE_CHK_STATUS_RET(InitExternalWeightMem(root_graph, external_weight_mem_data_),
1041- "Failed to init external weright mem.");1041+ "Failed to init external weight mem.");
1042 handle_ = aclmdlCreateConfigHandle();1042 handle_ = aclmdlCreateConfigHandle();
1043 GE_CHECK_NOTNULL(handle_, "Create acl load config handle failed.");1043 GE_CHECK_NOTNULL(handle_, "Create acl load config handle failed.");
1044 GE_CHK_STATUS_RET(GenerateLoadConfig(model_data, external_weight_mem_data_, handle_));1044 GE_CHK_STATUS_RET(GenerateLoadConfig(model_data, external_weight_mem_data_, handle_));
@@ -1078,7 +1078,7 @@ Status DynamicModelExecutor::GenerateLoadConfig(const ModelData &model_data,
1078 1078 
1079Status DynamicModelExecutor::InitExternalWeightMem(const ComputeGraphPtr &root_graph,1079Status DynamicModelExecutor::InitExternalWeightMem(const ComputeGraphPtr &root_graph,
1080 std::vector<FileConstantMem> &external_weight_mem_data) {1080 std::vector<FileConstantMem> &external_weight_mem_data) {
1081- GELOGD("[InitExternalWeightMem] Start to init extrnal weight mem.");1081+ GELOGD("[InitExternalWeightMem] Start to init external weight mem.");
1082 // load external weight1082 // load external weight
1083 for (const auto &node : root_graph->GetAllNodes()) {1083 for (const auto &node : root_graph->GetAllNodes()) {
1084 const auto &op_desc = node->GetOpDesc();1084 const auto &op_desc = node->GetOpDesc();
@@ -1103,7 +1103,7 @@ Status DynamicModelExecutor::InitExternalWeightMem(const ComputeGraphPtr &root_g
1103 1103 
1104 auto file_name = RealPath(fileconstant_name.c_str());1104 auto file_name = RealPath(fileconstant_name.c_str());
1105 if (file_name.empty()) {1105 if (file_name.empty()) {
1106- GELOGE(ACL_ERROR_GE_PARAM_INVALID, "The path[%s]is invalid", fileconstant_name.c_str());1106+ GELOGE(ACL_ERROR_GE_PARAM_INVALID, "The path[%s] is invalid", fileconstant_name.c_str());
1107 return ACL_ERROR_GE_PARAM_INVALID;1107 return ACL_ERROR_GE_PARAM_INVALID;
1108 }1108 }
1109 external_weight.file_name = file_name;1109 external_weight.file_name = file_name;
@@ -1129,7 +1129,7 @@ Status DynamicModelExecutor::InitExternalWeightMem(const ComputeGraphPtr &root_g
1129 external_weight_mem_data.emplace_back(external_weight);1129 external_weight_mem_data.emplace_back(external_weight);
1130 GELOGD("Success initialize external weight mem from file[%s], length[%lu]", file_name.c_str(), attr_length);1130 GELOGD("Success initialize external weight mem from file[%s], length[%lu]", file_name.c_str(), attr_length);
1131 }1131 }
1132- GELOGD("[InitExternalWeightMem] Succeed to init extrnal weight mem.");1132+ GELOGD("[InitExternalWeightMem] Succeed to init external weight mem.");
1133 return SUCCESS;1133 return SUCCESS;
1134}1134}
1135 1135 
@@ -127,7 +127,7 @@ void EventHandler::HandleSyncVarManagerRequest(deployer::ExecutorRequest &reques
127 GELOGD("[Handle][Init VarManager] begin.");127 GELOGD("[Handle][Init VarManager] begin.");
128 if (context_->SyncSharedVarManager(request) != SUCCESS) {128 if (context_->SyncSharedVarManager(request) != SUCCESS) {
129 response.set_error_code(FAILED);129 response.set_error_code(FAILED);
130- response.set_error_message("Failed to init VarManger");130+ response.set_error_message("Failed to init VarManager");
131 return;131 return;
132 }132 }
133 response.set_error_code(SUCCESS);133 response.set_error_code(SUCCESS);
@@ -358,13 +358,13 @@ Status EventHandler::DoDataFlowExceptionNotify(const std::vector<uint32_t> &davi
358}358}
359 359 
360void EventHandler::HandleProfInfo(deployer::ExecutorRequest &request, deployer::ExecutorResponse &response) {360void EventHandler::HandleProfInfo(deployer::ExecutorRequest &request, deployer::ExecutorResponse &response) {
361- GELOGI("[Handle][Set Proiling Info] begin.");361+ GELOGI("[Handle][Set Profiling Info] begin.");
362 if (context_->UpdateProfInfo(request) != SUCCESS) {362 if (context_->UpdateProfInfo(request) != SUCCESS) {
363 response.set_error_code(FAILED);363 response.set_error_code(FAILED);
364 response.set_error_message("Failed to set prof");364 response.set_error_message("Failed to set prof");
365 return;365 return;
366 }366 }
367 response.set_error_code(SUCCESS);367 response.set_error_code(SUCCESS);
368- GELOGI("[Handle][Set Proiling Info] end.");368+ GELOGI("[Handle][Set Profiling Info] end.");
369}369}
370} // namespace ge370} // namespace ge
@@ -88,7 +88,7 @@ class SharedMemoryManager : public MemManager {
88 std::lock_guard<std::mutex> lk(mu_);88 std::lock_guard<std::mutex> lk(mu_);
89 auto it = var_mem_bases_.find(memory_key);89 auto it = var_mem_bases_.find(memory_key);
90 if (it == var_mem_bases_.cend()) {90 if (it == var_mem_bases_.cend()) {
91- GELOGW("MemoryAllocator::GetMemoryAddr failed, memory_key[%s] was does not exist", memory_key.c_str());91+ GELOGW("MemoryAllocator::GetMemoryAddr failed, memory_key[%s] does not exist", memory_key.c_str());
92 return nullptr;92 return nullptr;
93 }93 }
94 return it->second;94 return it->second;
@@ -656,7 +656,7 @@ Status ExecutorContext::ModelHandle::DoLoadModelWithQ(const ModelData &model_dat
656 static_cast<int32_t>(is_dynamic_proxy_controlled_));656 static_cast<int32_t>(is_dynamic_proxy_controlled_));
657 std::vector<FileConstantMem> external_weight_mem_data{};657 std::vector<FileConstantMem> external_weight_mem_data{};
658 GE_CHK_STATUS_RET(DynamicModelExecutor::InitExternalWeightMem(root_graph, external_weight_mem_data),658 GE_CHK_STATUS_RET(DynamicModelExecutor::InitExternalWeightMem(root_graph, external_weight_mem_data),
659- "Failed to init external weright mem.");659+ "Failed to init external weight mem.");
660 if (params.input_queues.empty() && params.output_queues.empty()) {660 if (params.input_queues.empty() && params.output_queues.empty()) {
661 handle_ = aclmdlCreateConfigHandle();661 handle_ = aclmdlCreateConfigHandle();
662 GE_CHECK_NOTNULL(handle_, "Create acl load config handle failed.");662 GE_CHECK_NOTNULL(handle_, "Create acl load config handle failed.");
@@ -142,7 +142,7 @@ Status NpuSchedModelLoader::EnsureQueueResourceInitialized(const int32_t device_
142Status NpuSchedModelLoader::LoadModel(const ModelQueueParam &model_queue_param, uint32_t &runtime_model_id) {142Status NpuSchedModelLoader::LoadModel(const ModelQueueParam &model_queue_param, uint32_t &runtime_model_id) {
143 GELOGD("Begin to load model, model_id = %u.", model_id_);143 GELOGD("Begin to load model, model_id = %u.", model_id_);
144 GE_CHK_BOOL_RET_STATUS(!model_queue_param.input_queues.empty() || !model_queue_param.output_queues.empty(),144 GE_CHK_BOOL_RET_STATUS(!model_queue_param.input_queues.empty() || !model_queue_param.output_queues.empty(),
145- UNSUPPORTED, "Not exist input queue and output queue.");145+ UNSUPPORTED, "Neither input queue nor output queue exists.");
146 model_queue_param_ = model_queue_param;146 model_queue_param_ = model_queue_param;
147 if (model_queue_param_.input_fusion_offsets.empty()) {147 if (model_queue_param_.input_fusion_offsets.empty()) {
148 model_queue_param_.input_fusion_offsets.resize(model_queue_param_.input_queues.size());148 model_queue_param_.input_fusion_offsets.resize(model_queue_param_.input_queues.size());
@@ -398,7 +398,7 @@ Status NpuSchedModelLoader::BindOutputQueue(const aclrtStream stream) {
398 GE_CHK_RT_RET(rtModelBindQueue(rt_model_handle_, queue_id, RT_MODEL_OUTPUT_QUEUE));398 GE_CHK_RT_RET(rtModelBindQueue(rt_model_handle_, queue_id, RT_MODEL_OUTPUT_QUEUE));
399 }399 }
400 GE_CHK_STATUS_RET(CreateModelBatchEnqueueTask(stream, output_queue_ids_, postproc_output_mbuf_addrs_),400 GE_CHK_STATUS_RET(CreateModelBatchEnqueueTask(stream, output_queue_ids_, postproc_output_mbuf_addrs_),
401- "Fail to add model batch dequeue task, model_id:%u.", model_id_);401+ "Fail to add model batch enqueue task, model_id:%u.", model_id_);
402 return SUCCESS;402 return SUCCESS;
403}403}
404 404 
@@ -58,7 +58,7 @@ Status ProxyDynamicModelExecutor::SetNpuModelLoaderOutputInfo() {
58 bool post_v2_support = false;58 bool post_v2_support = false;
59 if (is_need_check) {59 if (is_need_check) {
60 if (CpuTasks::ExecuteCheckSupported(kPostProcessV2, post_v2_support) != SUCCESS) {60 if (CpuTasks::ExecuteCheckSupported(kPostProcessV2, post_v2_support) != SUCCESS) {
61- GELOGW("CheckKernelSupported kernel fail maybe result of kernel not supported.");61+ GELOGW("CheckKernelSupported failed, maybe the kernel is not supported.");
62 } else {62 } else {
63 GELOGI("Current version support postprocessDynamicOutputV2 flag is [%d].", static_cast<int32_t>(post_v2_support));63 GELOGI("Current version support postprocessDynamicOutputV2 flag is [%d].", static_cast<int32_t>(post_v2_support));
64 }64 }
@@ -76,7 +76,7 @@ Status ProxyDynamicModelExecutor::SetNpuModelLoaderOutputInfo() {
76 // aicpu kernel support v276 // aicpu kernel support v2
77 filtered_tensor_sizes.emplace_back(kDynamicTensorSize);77 filtered_tensor_sizes.emplace_back(kDynamicTensorSize);
78 filtered_output_dynamic_flags.emplace_back(kDynamicFlag);78 filtered_output_dynamic_flags.emplace_back(kDynamicFlag);
79- GELOGD("Set output[%zu] tesor size[%d] and dynamic flag[%u] while current version support aicpu post V2 task.",79+ GELOGD("Set output[%zu] tensor size[%d] and dynamic flag[%u] while current version support aicpu post V2 task.",
80 i, kDynamicTensorSize, kDynamicFlag);80 i, kDynamicTensorSize, kDynamicFlag);
81 } else {81 } else {
82 filtered_tensor_sizes.emplace_back(output_tensor_sizes_[i]);82 filtered_tensor_sizes.emplace_back(output_tensor_sizes_[i]);
@@ -31,13 +31,13 @@ bool FlowAttrUtil::CheckAttrsIsSupport(const std::vector<DataFlowInputAttr> &att
31 if (attrs[i].attr_type == DataFlowAttrType::COUNT_BATCH) {31 if (attrs[i].attr_type == DataFlowAttrType::COUNT_BATCH) {
32 count_batch = true;32 count_batch = true;
33 if (time_batch) {33 if (time_batch) {
34- GELOGE(ge::FAILED, "[Check]COUNT_BATCH attr and TIME_BATCH attr cannot be config at the same time.");34+ GELOGE(ge::FAILED, "[Check]COUNT_BATCH attr and TIME_BATCH attr cannot be configured at the same time.");
35 return false;35 return false;
36 }36 }
37 } else if (attrs[i].attr_type == DataFlowAttrType::TIME_BATCH) {37 } else if (attrs[i].attr_type == DataFlowAttrType::TIME_BATCH) {
38 time_batch = true;38 time_batch = true;
39 if (count_batch) {39 if (count_batch) {
40- GELOGE(ge::FAILED, "[Check]COUNT_BATCH attr and TIME_BATCH attr cannot be config at the same time.");40+ GELOGE(ge::FAILED, "[Check]COUNT_BATCH attr and TIME_BATCH attr cannot be configured at the same time.");
41 return false;41 return false;
42 }42 }
43 } else {43 } else {
@@ -60,7 +60,7 @@ graphStatus FlowAttrUtil::SetCountBatchAttr(const void *const attr_value, GeTens
60 }60 }
61 61 
62 if ((count_batch->slide_stride < 0) || (count_batch->slide_stride > count_batch->batch_size)) {62 if ((count_batch->slide_stride < 0) || (count_batch->slide_stride > count_batch->batch_size)) {
63- GELOGE(FAILED, "CountBatch.slide_stride should in [0, %lld], but got %lld", count_batch->batch_size,63+ GELOGE(FAILED, "CountBatch.slide_stride should be in [0, %lld], but got %lld", count_batch->batch_size,
64 count_batch->slide_stride);64 count_batch->slide_stride);
65 return ge::GRAPH_FAILED;65 return ge::GRAPH_FAILED;
66 }66 }
@@ -124,7 +124,7 @@ graphStatus FlowAttrUtil::SetAttrsToTensorDesc(const std::vector<DataFlowInputAt
124 for (auto &attr : attrs) {124 for (auto &attr : attrs) {
125 auto attr_type = attr.attr_type;125 auto attr_type = attr.attr_type;
126 const auto iter = set_attr_funcs_.find(attr_type);126 const auto iter = set_attr_funcs_.find(attr_type);
127- GE_ASSERT_TRUE(iter != set_attr_funcs_.cend(), "Data flow input attr type(%u) does not has process function..",127+ GE_ASSERT_TRUE(iter != set_attr_funcs_.cend(), "Data flow input attr type(%u) does not have a process function.",
128 static_cast<uint32_t>(attr_type));128 static_cast<uint32_t>(attr_type));
129 GE_ASSERT_SUCCESS(iter->second(attr.attr_value, tensor_desc));129 GE_ASSERT_SUCCESS(iter->second(attr.attr_value, tensor_desc));
130 }130 }
@@ -235,7 +235,7 @@ graphStatus FlowNodeImpl::SetBalanceScatter() {
235 bool is_gather_node = false;235 bool is_gather_node = false;
236 (void)ge::AttrUtils::GetBool(op_desc_, ATTR_NAME_BALANCE_GATHER, is_gather_node);236 (void)ge::AttrUtils::GetBool(op_desc_, ATTR_NAME_BALANCE_GATHER, is_gather_node);
237 if (is_gather_node) {237 if (is_gather_node) {
238- GELOGE(GRAPH_FAILED, "op[%s] is set balance gather, can't set balance sactter", op_desc_->GetNamePtr());238+ GELOGE(GRAPH_FAILED, "op[%s] is set balance gather, can't set balance scatter", op_desc_->GetNamePtr());
239 return GRAPH_FAILED;239 return GRAPH_FAILED;
240 }240 }
241 GE_ASSERT_TRUE(ge::AttrUtils::SetBool(op_desc_, ATTR_NAME_BALANCE_SCATTER, true),241 GE_ASSERT_TRUE(ge::AttrUtils::SetBool(op_desc_, ATTR_NAME_BALANCE_SCATTER, true),
@@ -554,7 +554,7 @@ FlowGraph &FlowGraph::SetOutputs(const std::vector<FlowOperator> &outputs) {
554 impl_->SetOutputs(outputs);554 impl_->SetOutputs(outputs);
555 const std::string err_msg = std::string(error_message::GetErrMgrErrorMessage().get());555 const std::string err_msg = std::string(error_message::GetErrMgrErrorMessage().get());
556 if (!err_msg.empty()) {556 if (!err_msg.empty()) {
557- std::cout << err_msg << std::endl;557+ GELOGE(GRAPH_FAILED, "%s", err_msg.c_str());
558 }558 }
559 return *this;559 return *this;
560}560}
@@ -413,7 +413,8 @@ Status LlmDataDist::LlmDataDistImpl::CopyKvBlocks(const Cache &src_cache, const
413 }413 }
414 LLM_CHK_STATUS_RET(llm_data_dist_->CopyCache(src_cache_entry, dst_cache_entry, copy_cache_param, device_ids_),414 LLM_CHK_STATUS_RET(llm_data_dist_->CopyCache(src_cache_entry, dst_cache_entry, copy_cache_param, device_ids_),
415 "[Copy][%ld->%ld] failed", src_cache.cache_id, dst_cache.cache_id);415 "[Copy][%ld->%ld] failed", src_cache.cache_id, dst_cache.cache_id);
416- LLMLOGI("dst_block_index = %zu copy blocks success", src_cache.cache_id, dst_cache.cache_id, i);416+ LLMLOGI("src_cache_id = %ld, dst_cache_id = %ld, dst_block_index = %zu copy blocks success", src_cache.cache_id,
417+ dst_cache.cache_id, i);
417 }418 }
418 } else {419 } else {
419 LLM_CHK_STATUS_RET(SwapKvBlocks(src_cache, dst_cache, src_blocks, dst_blocks_list, src_cache_entry.stride),420 LLM_CHK_STATUS_RET(SwapKvBlocks(src_cache, dst_cache, src_blocks, dst_blocks_list, src_cache_entry.stride),
@@ -464,7 +465,7 @@ Status LlmDataDist::LlmDataDistImpl::CopyKvCache(const Cache &src_cache, const C
464 llm::CacheEntry src_cache_entry{};465 llm::CacheEntry src_cache_entry{};
465 llm::CacheEntry dst_cache_entry{};466 llm::CacheEntry dst_cache_entry{};
466 LLM_CHK_BOOL_RET_STATUS(src_cache.cache_desc.placement != CachePlacement::kHost, LLM_PARAM_INVALID,467 LLM_CHK_BOOL_RET_STATUS(src_cache.cache_desc.placement != CachePlacement::kHost, LLM_PARAM_INVALID,
467- "[Copy][%ld->%ld] failed, neither H2D nor H2H copy is not supported", src_cache.cache_id,468+ "[Copy][%ld->%ld] failed, neither H2D nor H2H copy is supported", src_cache.cache_id,
468 dst_cache.cache_id);469 dst_cache.cache_id);
469 LLM_CHK_STATUS_RET(ToCacheEntry(src_cache, src_cache_entry, device_ids_.size()), "Failed to check src cache");470 LLM_CHK_STATUS_RET(ToCacheEntry(src_cache, src_cache_entry, device_ids_.size()), "Failed to check src cache");
470 LLM_CHK_STATUS_RET(ToCacheEntry(dst_cache, dst_cache_entry, device_ids_.size()), "Failed to check dst cache");471 LLM_CHK_STATUS_RET(ToCacheEntry(dst_cache, dst_cache_entry, device_ids_.size()), "Failed to check dst cache");
@@ -223,7 +223,7 @@ ge::Status ProcessPointCompileConfig::CreateFuncPpCompileConfig(const std::strin
223ge::Status ProcessPointCompileConfig::CheckBufCfgValue(const BufCfg &buf_cfg) const {223ge::Status ProcessPointCompileConfig::CheckBufCfgValue(const BufCfg &buf_cfg) const {
224 LLM_ASSERT_TRUE(buf_cfg.total_size != 0U, "Total size cannot be zero or larger than UINT32_MAX");224 LLM_ASSERT_TRUE(buf_cfg.total_size != 0U, "Total size cannot be zero or larger than UINT32_MAX");
225 LLM_ASSERT_TRUE(buf_cfg.max_buf_size != 0U, "max buf size cannot be zero or larger than UINT32_MAX");225 LLM_ASSERT_TRUE(buf_cfg.max_buf_size != 0U, "max buf size cannot be zero or larger than UINT32_MAX");
226- LLM_ASSERT_TRUE(buf_cfg.blk_size != 0U, "blk size not be zero or larger than UINT32_MAX");226+ LLM_ASSERT_TRUE(buf_cfg.blk_size != 0U, "blk size should not be zero or larger than UINT32_MAX");
227 LLM_ASSERT_TRUE(227 LLM_ASSERT_TRUE(
228 (buf_cfg.total_size > buf_cfg.max_buf_size) && (buf_cfg.max_buf_size >= buf_cfg.blk_size),228 (buf_cfg.total_size > buf_cfg.max_buf_size) && (buf_cfg.max_buf_size >= buf_cfg.blk_size),
229 "The following three params not meet the requirement: total_size[%u] > max_buf_size[%u] >= blk_size[%u]",229 "The following three params not meet the requirement: total_size[%u] > max_buf_size[%u] >= blk_size[%u]",
@@ -231,7 +231,7 @@ ge::Status ProcessPointCompileConfig::CheckBufCfgValue(const BufCfg &buf_cfg) co
231 LLM_ASSERT_TRUE(buf_cfg.blk_size != 0, "The blk_size[%u] should not be 0.", buf_cfg.blk_size);231 LLM_ASSERT_TRUE(buf_cfg.blk_size != 0, "The blk_size[%u] should not be 0.", buf_cfg.blk_size);
232 LLM_ASSERT_TRUE((buf_cfg.blk_size & (buf_cfg.blk_size - 1U)) == 0U, "The blk_size[%u] should be 2^n.",232 LLM_ASSERT_TRUE((buf_cfg.blk_size & (buf_cfg.blk_size - 1U)) == 0U, "The blk_size[%u] should be 2^n.",
233 buf_cfg.blk_size);233 buf_cfg.blk_size);
234- LLM_ASSERT_TRUE(buf_cfg.blk_size <= kMaxBlkSize, "The blk_size[%u] should not greater than 2M.", buf_cfg.blk_size);234+ LLM_ASSERT_TRUE(buf_cfg.blk_size <= kMaxBlkSize, "The blk_size[%u] should not be greater than 2M.", buf_cfg.blk_size);
235 LLM_ASSERT_TRUE(buf_cfg.total_size % buf_cfg.blk_size == 0UL,235 LLM_ASSERT_TRUE(buf_cfg.total_size % buf_cfg.blk_size == 0UL,
236 "The buffer size[%u] should be multiple of blk_size[%u].", buf_cfg.total_size, buf_cfg.blk_size);236 "The buffer size[%u] should be multiple of blk_size[%u].", buf_cfg.total_size, buf_cfg.blk_size);
237 return ge::SUCCESS;237 return ge::SUCCESS;
@@ -597,7 +597,7 @@ ge::Status LlmFlowService::Allocate(const CacheDesc &cache_desc, const std::vect
597 for (size_t i = 0U; i < per_device_task_context.size(); ++i) {597 for (size_t i = 0U; i < per_device_task_context.size(); ++i) {
598 auto &result = per_device_task_context[i].output;598 auto &result = per_device_task_context[i].output;
599 LLM_CHK_BOOL_RET_STATUS(result.tensor_addrs.size() == static_cast<size_t>(cache_desc.num_tensors), ge::FAILED,599 LLM_CHK_BOOL_RET_STATUS(result.tensor_addrs.size() == static_cast<size_t>(cache_desc.num_tensors), ge::FAILED,
600- "[Check][Result] check tensor addresses failed, expect %u, bot got %zu, device_index = %zu",600+ "[Check][Result] check tensor addresses failed, expect %u, but got %zu, device_index = %zu",
601 cache_desc.num_tensors, result.tensor_addrs.size(), device_indices_[i]);601 cache_desc.num_tensors, result.tensor_addrs.size(), device_indices_[i]);
602 cache.per_device_tensor_addrs.emplace_back(std::move(result.tensor_addrs));602 cache.per_device_tensor_addrs.emplace_back(std::move(result.tensor_addrs));
603 }603 }
@@ -301,7 +301,7 @@ bool LLMUtils::GetDataTypeLength(const ge::DataType data_type, uint32_t &length)
301 length = static_cast<uint32_t>(size);301 length = static_cast<uint32_t>(size);
302 return true;302 return true;
303 }303 }
304- LLMLOGE(ge::LLM_PARAM_INVALID, "[Check][Param] data_type not support [%d]", static_cast<int32_t>(data_type));304+ LLMLOGE(ge::LLM_PARAM_INVALID, "[Check][Param] data_type [%d] is not supported", static_cast<int32_t>(data_type));
305 return false;305 return false;
306}306}
307 307 
@@ -310,7 +310,7 @@ ge::Status LLMUtils::GetSizeInBytes(int64_t element_count, ge::DataType data_typ
310 "GetSizeInBytes failed, element_count:%" PRId64 " less than 0.", element_count);310 "GetSizeInBytes failed, element_count:%" PRId64 " less than 0.", element_count);
311 uint32_t type_size = 0U;311 uint32_t type_size = 0U;
312 LLM_CHK_BOOL_RET_STATUS(GetDataTypeLength(data_type, type_size), ge::LLM_PARAM_INVALID,312 LLM_CHK_BOOL_RET_STATUS(GetDataTypeLength(data_type, type_size), ge::LLM_PARAM_INVALID,
313- "Failed to get type length, data_type:%d not support.", data_type);313+ "Failed to get type length, data_type:%d is not supported.", data_type);
314 if (type_size > ge::kDataTypeSizeBitOffset) {314 if (type_size > ge::kDataTypeSizeBitOffset) {
315 const auto bit_size = type_size - ge::kDataTypeSizeBitOffset;315 const auto bit_size = type_size - ge::kDataTypeSizeBitOffset;
316 LLM_CHK_BOOL_RET_STATUS(!CheckMultiplyOverflowInt64(element_count, static_cast<int64_t>(bit_size)),316 LLM_CHK_BOOL_RET_STATUS(!CheckMultiplyOverflowInt64(element_count, static_cast<int64_t>(bit_size)),
@@ -161,7 +161,7 @@ ge::Status SwapImpl::SwapBlocks(const std::vector<uintptr_t> &src_addrs, const s
161 const uint64_t copy_size = block_size * ordered_block.size();161 const uint64_t copy_size = block_size * ordered_block.size();
162 auto src = src_addr + src_index * block_size;162 auto src = src_addr + src_index * block_size;
163 auto dst = dst_addr + dst_index * block_size;163 auto dst = dst_addr + dst_index * block_size;
164- LLMLOGI("Begin mem copy, src index:%ld, dst index:%ld, copy size:%lu, contiguous block num:%lu", src_index,164+ LLMLOGI("Begin mem copy, src index:%ld, dst index:%ld, copy size:%lu B, contiguous block num:%lu", src_index,
165 dst_index, copy_size, ordered_block.size());165 dst_index, copy_size, ordered_block.size());
166 const auto copy_start = std::chrono::steady_clock::now();166 const auto copy_start = std::chrono::steady_clock::now();
167 if (copy_info.copy_type == CopyType::kMemcpyEx) {167 if (copy_info.copy_type == CopyType::kMemcpyEx) {
@@ -237,7 +237,7 @@ ge::Status SwapImpl::SwapBlocks(const Cache &src, const Cache &dst, const uint64
237 const auto &src_addrs = src.per_device_tensor_addrs;237 const auto &src_addrs = src.per_device_tensor_addrs;
238 const auto &dst_addrs = dst.per_device_tensor_addrs;238 const auto &dst_addrs = dst.per_device_tensor_addrs;
239 LLM_CHK_BOOL_RET_STATUS((src_addrs[device_index].size() == dst_addrs[device_index].size()), ge::LLM_PARAM_INVALID,239 LLM_CHK_BOOL_RET_STATUS((src_addrs[device_index].size() == dst_addrs[device_index].size()), ge::LLM_PARAM_INVALID,
240- "src adrrs size:%zu not equal dst addrs size:%zu", src_addrs[device_index].size(),240+ "src addrs size:%zu not equal dst addrs size:%zu", src_addrs[device_index].size(),
241 dst_addrs[device_index].size());241 dst_addrs[device_index].size());
242 LLMLOGI("Begin swap blocks, cache num:%zu, swap block num:%zu", src_addrs.front().size(), block_mapping.size());242 LLMLOGI("Begin swap blocks, cache num:%zu, swap block num:%zu", src_addrs.front().size(), block_mapping.size());
243 LLM_CHK_ACL_RET(aclrtSetDevice(device_id_));243 LLM_CHK_ACL_RET(aclrtSetDevice(device_id_));
@@ -55,7 +55,7 @@ endif ()
55if ("x${RESOURCE_TYPE}" STREQUAL "xAscend")55if ("x${RESOURCE_TYPE}" STREQUAL "xAscend")
56 message(STATUS "ascend compiler enter")56 message(STATUS "ascend compiler enter")
57 # if unsupport current resource type, please uncomment the next line.57 # if unsupport current resource type, please uncomment the next line.
58- message(FATAL_ERROR "Unsupport compile Ascend target!")58+ message(FATAL_ERROR "Unsupported compile Ascend target!")
59elseif ("x${RESOURCE_TYPE}" STREQUAL "xAarch")59elseif ("x${RESOURCE_TYPE}" STREQUAL "xAarch")
60 message(STATUS "Aarch compiler enter")60 message(STATUS "Aarch compiler enter")
61 set(LIB_FLOW_FUNC ${ASCEND_HOME_PATH}/devlib/linux/aarch64/libflow_func.so)61 set(LIB_FLOW_FUNC ${ASCEND_HOME_PATH}/devlib/linux/aarch64/libflow_func.so)
@@ -208,7 +208,7 @@ class {{clz_name}} : public MetaMultiFunc {
208 {208 {
209 {% for f_name in f_names %}209 {% for f_name in f_names %}
210 if (!py::hasattr(py_obj_, "{{f_name}}")) {210 if (!py::hasattr(py_obj_, "{{f_name}}")) {
211- FLOW_FUNC_LOG_ERROR("{{py_module_name}}.{{clz_name}} has not proc method {{f_name}}");211+ FLOW_FUNC_LOG_ERROR("{{py_module_name}}.{{clz_name}} has no proc method {{f_name}}");
212 return FLOW_FUNC_FAILED;212 return FLOW_FUNC_FAILED;
213 }213 }
214 {% endfor %}214 {% endfor %}
@@ -247,7 +247,7 @@ Status ConvertBatchAttrToUdfPass::Run(ge::ComputeGraphPtr graph) {
247 return FAILED;247 return FAILED;
248 }248 }
249 if (exception_catch && (input_has_time_batch_attr || input_has_count_batch_attr)) {249 if (exception_catch && (input_has_time_batch_attr || input_has_count_batch_attr)) {
250- GELOGE(FAILED, "TimeBatch or CountBatch can't be set in node[%s] input[%zu] while exception catch is enable.",250+ GELOGE(FAILED, "TimeBatch or CountBatch can't be set in node[%s] input[%zu] while exception catch is enabled.",
251 node->GetName().c_str(), i);251 node->GetName().c_str(), i);
252 return FAILED;252 return FAILED;
253 }253 }
@@ -27,7 +27,7 @@ static Status CheckFlowAttr(const T &obj) {
27 std::string policy(kDefaultEnqueuePolicy);27 std::string policy(kDefaultEnqueuePolicy);
28 (void)ge::AttrUtils::GetInt(obj, ATTR_NAME_FLOW_ATTR_DEPTH, depth);28 (void)ge::AttrUtils::GetInt(obj, ATTR_NAME_FLOW_ATTR_DEPTH, depth);
29 (void)ge::AttrUtils::GetStr(obj, ATTR_NAME_FLOW_ATTR_ENQUEUE_POLICY, policy);29 (void)ge::AttrUtils::GetStr(obj, ATTR_NAME_FLOW_ATTR_ENQUEUE_POLICY, policy);
30- GE_ASSERT_TRUE(depth > 0, "[Check][FlowAttr] failed, depth=%d is invalid.", depth);30+ GE_ASSERT_TRUE(depth > 0, "[Check][FlowAttr] failed, depth=%d is invalid, should be greater than 0.", depth);
31 GE_ASSERT_TRUE((policy == kDefaultEnqueuePolicy) || (policy == kOverwritePolicy),31 GE_ASSERT_TRUE((policy == kDefaultEnqueuePolicy) || (policy == kOverwritePolicy),
32 "[Check][FlowAttr] failed, policy must be OVERWRITE or FIFO, but is %s.", policy.c_str());32 "[Check][FlowAttr] failed, policy must be OVERWRITE or FIFO, but is %s.", policy.c_str());
33 return SUCCESS;33 return SUCCESS;
@@ -217,7 +217,7 @@ Status DataFlowAttrUtils::SupplementMismatchEdge(const DataAnchorPtr &peer_out_a
217 auto out_node = peer_out_anchor->GetOwnerNode();217 auto out_node = peer_out_anchor->GetOwnerNode();
218 auto out_tensor = out_node->GetOpDesc()->MutableOutputDesc(AnchorUtils::GetIdx(peer_out_anchor));218 auto out_tensor = out_node->GetOpDesc()->MutableOutputDesc(AnchorUtils::GetIdx(peer_out_anchor));
219 if (out_tensor == nullptr) {219 if (out_tensor == nullptr) {
220- GELOGD("Get out control anchor of node:%s is null.", node->GetName().c_str());220+ GELOGD("The out control anchor of node:%s is null.", node->GetName().c_str());
221 return SUCCESS;221 return SUCCESS;
222 }222 }
223 const bool has_out_attr = AttrUtils::GetBool(out_tensor, ATTR_NAME_FLOW_ATTR, has_out_tensor_attr);223 const bool has_out_attr = AttrUtils::GetBool(out_tensor, ATTR_NAME_FLOW_ATTR, has_out_tensor_attr);
@@ -235,13 +235,13 @@ Status DataFlowAttrUtils::SupplementMismatchEdge(const DataAnchorPtr &peer_out_a
235 }235 }
236 // 2) if op input/output has been set flow attr, the peer tensor should been set flow attr236 // 2) if op input/output has been set flow attr, the peer tensor should been set flow attr
237 if (has_in_tensor_attr && !has_out_tensor_attr) {237 if (has_in_tensor_attr && !has_out_tensor_attr) {
238- GELOGD("node = %s has input and do not has output attr, set input attr -> output", node->GetName().c_str());238+ GELOGD("node = %s has input attr and does not have output attr, set input attr -> output", node->GetName().c_str());
239 GE_ASSERT_SUCCESS(SetFlowAttr(in_tensor_attr, out_tensor, def_fifo_depth, def_enqueue_policy),239 GE_ASSERT_SUCCESS(SetFlowAttr(in_tensor_attr, out_tensor, def_fifo_depth, def_enqueue_policy),
240 "[Set][Attr] of node:%s out:%u failed.", node->GetName().c_str(),240 "[Set][Attr] of node:%s out:%u failed.", node->GetName().c_str(),
241 AnchorUtils::GetIdx(peer_out_anchor));241 AnchorUtils::GetIdx(peer_out_anchor));
242 }242 }
243 if (!has_in_tensor_attr && has_out_tensor_attr) {243 if (!has_in_tensor_attr && has_out_tensor_attr) {
244- GELOGD("node = %s has output and do not has input attr, set output attr -> input", node->GetName().c_str());244+ GELOGD("node = %s has output attr and does not have input attr, set output attr -> input", node->GetName().c_str());
245 GE_ASSERT_SUCCESS(SetFlowAttr(out_tensor_attr, in_tensor, def_fifo_depth, def_enqueue_policy),245 GE_ASSERT_SUCCESS(SetFlowAttr(out_tensor_attr, in_tensor, def_fifo_depth, def_enqueue_policy),
246 "[Set][Attr] of node:%s of in tensor failed.", node->GetName().c_str());246 "[Set][Attr] of node:%s of in tensor failed.", node->GetName().c_str());
247 }247 }
@@ -31,7 +31,7 @@ const std::vector<std::string> &DataFlowGraph::GetInvokeKeys(const std::string &
31 if (it != invokes_.cend()) {31 if (it != invokes_.cend()) {
32 return it->second;32 return it->second;
33 }33 }
34- GELOGW("The graph[%s] does not has invoke keys.", graph_name.c_str());34+ GELOGW("The graph[%s] does not have invoke keys.", graph_name.c_str());
35 static std::vector<std::string> empty_ret;35 static std::vector<std::string> empty_ret;
36 return empty_ret;36 return empty_ret;
37}37}
@@ -42,7 +42,7 @@ const std::map<std::string, std::string> &DataFlowGraph::GetGraphBuildOptions(co
42 if (it != graphs_build_options_.cend()) {42 if (it != graphs_build_options_.cend()) {
43 return it->second;43 return it->second;
44 }44 }
45- GELOGW("The graph[%s] does not has build options.", graph_name.c_str());45+ GELOGW("The graph[%s] does not have build options.", graph_name.c_str());
46 static std::map<std::string, std::string> empty_ret;46 static std::map<std::string, std::string> empty_ret;
47 return empty_ret;47 return empty_ret;
48}48}
@@ -52,7 +52,7 @@ const std::string &DataFlowGraph::GetInvokedGraphKey(const std::string &graph_na
52 if (it != invoked_keys_.cend()) {52 if (it != invoked_keys_.cend()) {
53 return it->second;53 return it->second;
54 }54 }
55- GELOGW("The graph[%s] does not has invoked key.", graph_name.c_str());55+ GELOGW("The graph[%s] does not have invoked key.", graph_name.c_str());
56 static std::string empty_ret;56 static std::string empty_ret;
57 return empty_ret;57 return empty_ret;
58}58}
@@ -62,7 +62,7 @@ const std::string &DataFlowGraph::GetInvokedKeyOriginName(const std::string &inv
62 if (it != invoke_origins_.cend()) {62 if (it != invoke_origins_.cend()) {
63 return it->second;63 return it->second;
64 }64 }
65- GELOGW("The invoke key with scope[%s] does not has original invoke key.", invoke_key.c_str());65+ GELOGW("The invoke key with scope[%s] does not have original invoke key.", invoke_key.c_str());
66 static std::string empty_ret;66 static std::string empty_ret;
67 return empty_ret;67 return empty_ret;
68}68}
@@ -106,7 +106,7 @@ Status DataFlowGraph::CheckAlignAttrs(bool &align_enable) const {
106 if (AttrUtils::GetInt(root_graph_, dflow::ATTR_NAME_DATA_FLOW_INPUTS_ALIGN_TIMEOUT, timeout)) {106 if (AttrUtils::GetInt(root_graph_, dflow::ATTR_NAME_DATA_FLOW_INPUTS_ALIGN_TIMEOUT, timeout)) {
107 // -1 means no time out, max value is 600 * 1000ms107 // -1 means no time out, max value is 600 * 1000ms
108 GE_CHK_BOOL_RET_STATUS((timeout == (-1)) || ((timeout > 0) && (timeout <= 600 * 1000)), PARAM_INVALID,108 GE_CHK_BOOL_RET_STATUS((timeout == (-1)) || ((timeout > 0) && (timeout <= 600 * 1000)), PARAM_INVALID,
109- "attr[%s]=%ld is invalid, must be -1 or in range(0, 600 * 1000]",109+ "attr[%s]=%ld is invalid, must be -1 or in range(0, 600 * 1000] ms",
110 dflow::ATTR_NAME_DATA_FLOW_INPUTS_ALIGN_TIMEOUT, timeout);110 dflow::ATTR_NAME_DATA_FLOW_INPUTS_ALIGN_TIMEOUT, timeout);
111 }111 }
112 return SUCCESS;112 return SUCCESS;
@@ -119,7 +119,7 @@ Status DataFlowGraph::CheckAndFixDataFlowAttrs() const {
119 GE_CHK_STATUS_RET(CheckAlignAttrs(align_enable), "Check align attr failed.");119 GE_CHK_STATUS_RET(CheckAlignAttrs(align_enable), "Check align attr failed.");
120 if (exception_catch) {120 if (exception_catch) {
121 if (!align_enable) {121 if (!align_enable) {
122- GELOGE(PARAM_INVALID, "It is not supported exception catch is enable while align is disable.");122+ GELOGE(PARAM_INVALID, "Exception catch is not supported while align is disabled.");
123 return PARAM_INVALID;123 return PARAM_INVALID;
124 }124 }
125 GE_CHK_STATUS_RET(DataFlowGraphUtils::EnsureNMappingAttr(root_graph_), "Failed to set n-mapping attr for graph[%s]",125 GE_CHK_STATUS_RET(DataFlowGraphUtils::EnsureNMappingAttr(root_graph_), "Failed to set n-mapping attr for graph[%s]",
@@ -260,7 +260,7 @@ Status DataFlowGraph::MapNodeInputs(const NodePtr &node, const dataflow::Process
260 "Can't find node[%s] of process point[%s] in edges[%d].", map_node_name.c_str(),260 "Can't find node[%s] of process point[%s] in edges[%d].", map_node_name.c_str(),
261 process_point_name.c_str(), i);261 process_point_name.c_str(), i);
262 GE_CHK_BOOL_RET_STATUS(map_node_index < nodes_inputs_[map_node_name].size(), FAILED,262 GE_CHK_BOOL_RET_STATUS(map_node_index < nodes_inputs_[map_node_name].size(), FAILED,
263- "The process point[%s] in edges[%d] index[%u] is out of rang node[%s] inputs num[%zu].",263+ "The process point[%s] in edges[%d] index[%u] is out of range node[%s] inputs num[%zu].",
264 process_point_name.c_str(), i, map_node_index, map_node_name.c_str(),264 process_point_name.c_str(), i, map_node_index, map_node_name.c_str(),
265 nodes_inputs_[map_node_name].size());265 nodes_inputs_[map_node_name].size());
266 GE_CHK_BOOL_RET_STATUS(nodes_inputs_[map_node_name][map_node_index].first == nullptr, FAILED,266 GE_CHK_BOOL_RET_STATUS(nodes_inputs_[map_node_name][map_node_index].first == nullptr, FAILED,
@@ -315,7 +315,7 @@ Status DataFlowGraph::MapNodeOutputs(const NodePtr &node, const dataflow::Proces
315 "Can't find node[%s] of process point[%s] out edges[%d].", map_node_name.c_str(),315 "Can't find node[%s] of process point[%s] out edges[%d].", map_node_name.c_str(),
316 process_point_name.c_str(), i);316 process_point_name.c_str(), i);
317 GE_CHK_BOOL_RET_STATUS((map_node_index < nodes_outputs_[map_node_name].size()), FAILED,317 GE_CHK_BOOL_RET_STATUS((map_node_index < nodes_outputs_[map_node_name].size()), FAILED,
318- "The process point[%s] out edges[%d] index[%u] is out of rang node[%s] outputs num[%zu].",318+ "The process point[%s] out edges[%d] index[%u] is out of range node[%s] outputs num[%zu].",
319 process_point_name.c_str(), i, map_node_index, map_node_name.c_str(),319 process_point_name.c_str(), i, map_node_index, map_node_name.c_str(),
320 nodes_outputs_[map_node_name].size());320 nodes_outputs_[map_node_name].size());
321 GE_CHK_BOOL_RET_STATUS(321 GE_CHK_BOOL_RET_STATUS(
@@ -443,7 +443,7 @@ Status DataFlowGraph::GetInvokedModelFusionAttrs(const std::vector<std::string>
443 (void)AttrUtils::GetStr(root_graph, kModelPpFusionInputs, fusion_inputs);443 (void)AttrUtils::GetStr(root_graph, kModelPpFusionInputs, fusion_inputs);
444 if (!fusion_inputs.empty()) {444 if (!fusion_inputs.empty()) {
445 invoked_and_attr[invoke_key] = fusion_inputs;445 invoked_and_attr[invoke_key] = fusion_inputs;
446- GELOGD("Find fusion attr[%s] for invokde key[%s]", fusion_inputs.c_str(), invoke_key.c_str());446+ GELOGD("Find fusion attr[%s] for invoked key[%s]", fusion_inputs.c_str(), invoke_key.c_str());
447 }447 }
448 }448 }
449 if (invoked_and_attr.empty()) {449 if (invoked_and_attr.empty()) {
@@ -337,7 +337,7 @@ Status DataFlowGraphAutoDeployer::ExpandToSingleLogicDevice(const std::string &l
337 }337 }
338 size_t expand_size = tmp_expand_list.size() * static_cast<size_t>(end + 1 - start);338 size_t expand_size = tmp_expand_list.size() * static_cast<size_t>(end + 1 - start);
339 if (expand_size > UINT16_MAX) {339 if (expand_size > UINT16_MAX) {
340- GELOGE(FAILED, "range[%s] config too many device, over %u", logic_device_id_range.c_str(), UINT16_MAX);340+ GELOGE(FAILED, "range[%s] config too many devices, over %u", logic_device_id_range.c_str(), UINT16_MAX);
341 return FAILED;341 return FAILED;
342 }342 }
343 std::vector<std::string> tmp_list;343 std::vector<std::string> tmp_list;
@@ -111,7 +111,7 @@ Status DataFlowGraphModelRelationBuilder::GetOrCreateModelQueueInfoForDataFlowGr
111 "Failed to get node[%s] from data flow graph[%s].", node_flow_info.name.c_str(),111 "Failed to get node[%s] from data flow graph[%s].", node_flow_info.name.c_str(),
112 data_flow_graph.GetName().c_str());112 data_flow_graph.GetName().c_str());
113 GE_CHK_BOOL_RET_STATUS(static_cast<size_t>(node_flow_info.index) < node_map_graphs_it->second.size(), FAILED,113 GE_CHK_BOOL_RET_STATUS(static_cast<size_t>(node_flow_info.index) < node_map_graphs_it->second.size(), FAILED,
114- "The index[%d] need less than node[%s] %s size[%zu].", node_flow_info.index,114+ "The index[%d] needs to be less than node[%s] %s size[%zu].", node_flow_info.index,
115 node_flow_info.name.c_str(), node_flow_info.type.c_str(), node_map_graphs_it->second.size());115 node_flow_info.name.c_str(), node_flow_info.type.c_str(), node_map_graphs_it->second.size());
116 const auto &graph = node_map_graphs_it->second[node_flow_info.index].first;116 const auto &graph = node_map_graphs_it->second[node_flow_info.index].first;
117 GE_CHECK_NOTNULL(graph);117 GE_CHECK_NOTNULL(graph);
@@ -31,7 +31,7 @@ Status DataFlowGraphPrunePass::Run(ge::ComputeGraphPtr graph) {
31 GELOGE(GE_GRAPH_ISNULL, "[Check][Param] input compute graph is NULL.");31 GELOGE(GE_GRAPH_ISNULL, "[Check][Param] input compute graph is NULL.");
32 return GE_GRAPH_ISNULL;32 return GE_GRAPH_ISNULL;
33 }33 }
34- GELOGD("DatatFlowPrunePass Start, graph is [%s]", graph->GetName().c_str());34+ GELOGD("DataFlowPrunePass Start, graph is [%s]", graph->GetName().c_str());
35 const auto out_nodes = graph->GetOutputNodes();35 const auto out_nodes = graph->GetOutputNodes();
36 if (out_nodes.empty()) {36 if (out_nodes.empty()) {
37 GELOGW("graph [%s] does not contain output node,no return value. Do nothing!", graph->GetName().c_str());37 GELOGW("graph [%s] does not contain output node,no return value. Do nothing!", graph->GetName().c_str());
@@ -198,7 +198,7 @@ Status ProcessPointLoader::CreateFlowFuncOpDescFromProcessPoint(const dataflow::
198 OpDescPtr &op_desc) {198 OpDescPtr &op_desc) {
199 GE_CHK_STATUS_RET(DataFlowGraphUtils::CreateFlowFuncOpDesc(process_point.name(), func_pp_cfg.input_num,199 GE_CHK_STATUS_RET(DataFlowGraphUtils::CreateFlowFuncOpDesc(process_point.name(), func_pp_cfg.input_num,
200 func_pp_cfg.output_num, op_desc),200 func_pp_cfg.output_num, op_desc),
201- "Failed create FlowFunc op desc for process point[%s], inputs num [%zu], outputs num [%zu].",201+ "Failed to create FlowFunc op desc for process point[%s], inputs num [%zu], outputs num [%zu].",
202 process_point.name().c_str(), func_pp_cfg.input_num, func_pp_cfg.output_num);202 process_point.name().c_str(), func_pp_cfg.input_num, func_pp_cfg.output_num);
203 GE_CHK_STATUS_RET_NOLOG(SetAttrBinPathForFlowFunc(func_pp_cfg, op_desc));203 GE_CHK_STATUS_RET_NOLOG(SetAttrBinPathForFlowFunc(func_pp_cfg, op_desc));
204 GE_CHK_STATUS_RET_NOLOG(SetAttrFuncsForFlowFunc(func_pp_cfg, op_desc));204 GE_CHK_STATUS_RET_NOLOG(SetAttrFuncsForFlowFunc(func_pp_cfg, op_desc));
@@ -692,7 +692,7 @@ Status ProcessPointLoader::LoadBuiltInFunctionProcessPoint(const dataflow::Proce
692 OpDescPtr flow_func_desc;692 OpDescPtr flow_func_desc;
693 GE_CHK_STATUS_RET(DataFlowGraphUtils::CreateFlowFuncOpDesc(pp_name, process_point.in_edges().size(),693 GE_CHK_STATUS_RET(DataFlowGraphUtils::CreateFlowFuncOpDesc(pp_name, process_point.in_edges().size(),
694 process_point.out_edges().size(), flow_func_desc),694 process_point.out_edges().size(), flow_func_desc),
695- "Failed create FlowFunc op desc for process point[%s], inputs num [%zu], outputs num [%zu].",695+ "Failed to create FlowFunc op desc for process point[%s], inputs num [%zu], outputs num [%zu].",
696 pp_name.c_str(), process_point.in_edges().size(), process_point.out_edges().size());696 pp_name.c_str(), process_point.in_edges().size(), process_point.out_edges().size());
697 GE_CHK_STATUS_RET_NOLOG(SetCustomizedAttrsForFlowFunc(process_point, flow_func_desc));697 GE_CHK_STATUS_RET_NOLOG(SetCustomizedAttrsForFlowFunc(process_point, flow_func_desc));
698 GE_CHK_STATUS_RET_NOLOG(SetAttrFuncsForFlowFunc(process_point, flow_func_desc));698 GE_CHK_STATUS_RET_NOLOG(SetAttrFuncsForFlowFunc(process_point, flow_func_desc));
@@ -711,7 +711,7 @@ Status ProcessPointLoader::LoadFunctionProcessPoint(const dataflow::ProcessPoint
711 DataFlowGraph &data_flow_graph, const NodePtr &node) {711 DataFlowGraph &data_flow_graph, const NodePtr &node) {
712 GE_TRACE_START(LoadFunctionProcessPoint);712 GE_TRACE_START(LoadFunctionProcessPoint);
713 if (data_flow_graph.subgraphs_.find(process_point.name()) != data_flow_graph.subgraphs_.cend()) {713 if (data_flow_graph.subgraphs_.find(process_point.name()) != data_flow_graph.subgraphs_.cend()) {
714- GELOGE(FAILED, "The process point [%s] is map more than one node.", process_point.name().c_str());714+ GELOGE(FAILED, "The process point [%s] is mapped to more than one node.", process_point.name().c_str());
715 return FAILED;715 return FAILED;
716 }716 }
717 if (process_point.is_built_in()) {717 if (process_point.is_built_in()) {
@@ -859,7 +859,7 @@ Status ProcessPointLoader::RemoveGraphFromParent(const ComputeGraphPtr &root_gra
859 GELOGI("Remove subgraph[%s] from node[%s] success.", sub_graph->GetName().c_str(), parent_node->GetNamePtr());859 GELOGI("Remove subgraph[%s] from node[%s] success.", sub_graph->GetName().c_str(), parent_node->GetNamePtr());
860 }860 }
861 root_graph->RemoveSubgraph(sub_graph->GetName());861 root_graph->RemoveSubgraph(sub_graph->GetName());
862- GE_CHK_STATUS_RET(PreProcessSubgraphAttrs(sub_graph), "Failed to PreProcessSubGraphAttrs failed, graph[%s].",862+ GE_CHK_STATUS_RET(PreProcessSubgraphAttrs(sub_graph), "Failed to PreProcessSubGraphAttrs, graph[%s].",
863 sub_graph->GetName().c_str());863 sub_graph->GetName().c_str());
864 return SUCCESS;864 return SUCCESS;
865}865}
@@ -887,7 +887,7 @@ Status ProcessPointLoader::LoadGraphProcessPoint(const dataflow::ProcessPoint &p
887 DataFlowGraph &data_flow_graph, const NodePtr &node) {887 DataFlowGraph &data_flow_graph, const NodePtr &node) {
888 GE_TRACE_START(LoadGraphProcessPoint);888 GE_TRACE_START(LoadGraphProcessPoint);
889 if (data_flow_graph.subgraphs_.find(process_point.name()) != data_flow_graph.subgraphs_.cend()) {889 if (data_flow_graph.subgraphs_.find(process_point.name()) != data_flow_graph.subgraphs_.cend()) {
890- GELOGE(FAILED, "The process point [%s] is map more than one node.", process_point.name().c_str());890+ GELOGE(FAILED, "The process point [%s] is mapped to more than one node.", process_point.name().c_str());
891 return FAILED;891 return FAILED;
892 }892 }
893 CompileConfigJson::GraphPpConfig graph_pp_cfg = {};893 CompileConfigJson::GraphPpConfig graph_pp_cfg = {};
@@ -899,7 +899,7 @@ Status ProcessPointLoader::LoadGraphProcessPoint(const dataflow::ProcessPoint &p
899 auto temp_graph = data_flow_graph.root_graph_->GetSubgraph(process_point.graphs(0));899 auto temp_graph = data_flow_graph.root_graph_->GetSubgraph(process_point.graphs(0));
900 GE_CHECK_NOTNULL(temp_graph);900 GE_CHECK_NOTNULL(temp_graph);
901 GE_CHK_STATUS_RET(RemoveGraphFromParent(data_flow_graph.root_graph_, temp_graph),901 GE_CHK_STATUS_RET(RemoveGraphFromParent(data_flow_graph.root_graph_, temp_graph),
902- "Failed to remove graph from parent failed, graph[%s], pp name[%s].", temp_graph->GetName().c_str(),902+ "Failed to remove graph from parent, graph[%s], pp name[%s].", temp_graph->GetName().c_str(),
903 process_point.name().c_str());903 process_point.name().c_str());
904 GELOGI("rename graph[%s] to pp name[%s]", temp_graph->GetName().c_str(), process_point.name().c_str());904 GELOGI("rename graph[%s] to pp name[%s]", temp_graph->GetName().c_str(), process_point.name().c_str());
905 // subgraph rename as process point name905 // subgraph rename as process point name
@@ -346,12 +346,12 @@ Status FlowModelBuilder::BuildFlowSubgraph(ComputeGraphPtr &graph, const std::ve
346Status FlowModelBuilder::BuildGraph(ComputeGraphPtr &graph, const vector<GeTensor> &input_tensors,346Status FlowModelBuilder::BuildGraph(ComputeGraphPtr &graph, const vector<GeTensor> &input_tensors,
347 const map<std::string, std::string> &options, bool is_sub_graph,347 const map<std::string, std::string> &options, bool is_sub_graph,
348 const FlowModelPtr &flow_model) const {348 const FlowModelPtr &flow_model) const {
349- GE_CHK_STATUS_RET(ProcessNetOutput(graph), "Failed to process net out put");349+ GE_CHK_STATUS_RET(ProcessNetOutput(graph), "Failed to process net output");
350 GE_CHK_STATUS_RET(DoBuildGraph(graph, options, input_tensors, is_sub_graph, flow_model),350 GE_CHK_STATUS_RET(DoBuildGraph(graph, options, input_tensors, is_sub_graph, flow_model),
351 "Failed to build graph, graph[%s].", graph->GetName().c_str());351 "Failed to build graph, graph[%s].", graph->GetName().c_str());
352 GE_CHK_STATUS_RET(FlowModelHelper::EnsureWithModelRelation(flow_model),352 GE_CHK_STATUS_RET(FlowModelHelper::EnsureWithModelRelation(flow_model),
353 "Graph[%s] ensure with model relation failed.", graph->GetName().c_str());353 "Graph[%s] ensure with model relation failed.", graph->GetName().c_str());
354- GELOGD("Graph[%s] was build success.", graph->GetName().c_str());354+ GELOGD("Graph[%s] was built successfully.", graph->GetName().c_str());
355 return SUCCESS;355 return SUCCESS;
356}356}
357 357 
@@ -685,8 +685,10 @@ Status FlowModelBuilder::GetOrAssignDefaultEngine(const ComputeGraphPtr &compute
685 (void)ge::AttrUtils::GetStr(compute_graph, ge::ATTR_NAME_PROCESS_NODE_ENGINE_ID, process_node_engine_id);685 (void)ge::AttrUtils::GetStr(compute_graph, ge::ATTR_NAME_PROCESS_NODE_ENGINE_ID, process_node_engine_id);
686 if (!process_node_engine_id.empty()) {686 if (!process_node_engine_id.empty()) {
687 if (GetContext().GetHostExecFlag()) {687 if (GetContext().GetHostExecFlag()) {
688- GE_CHK_BOOL_RET_STATUS(process_node_engine_id == PNE_ID_CPU, PARAM_INVALID, "option[%s] is HOST, but attr[%s] ",688+ GE_CHK_BOOL_RET_STATUS(process_node_engine_id == PNE_ID_CPU, PARAM_INVALID,
689- GE_OPTION_EXEC_PLACEMENT, ATTR_NAME_PROCESS_NODE_ENGINE_ID.c_str());689+ "option[%s] is HOST, but attr[%s] is [%s], engine id should be [%s]",
690+ GE_OPTION_EXEC_PLACEMENT, ATTR_NAME_PROCESS_NODE_ENGINE_ID.c_str(),
691+ process_node_engine_id.c_str(), PNE_ID_CPU.c_str());
690 }692 }
691 static const std::set<std::string> kSupportedEngines = {PNE_ID_CPU, PNE_ID_NPU, PNE_ID_UDF};693 static const std::set<std::string> kSupportedEngines = {PNE_ID_CPU, PNE_ID_NPU, PNE_ID_UDF};
692 GE_CHK_BOOL_RET_STATUS(694 GE_CHK_BOOL_RET_STATUS(
@@ -783,7 +785,7 @@ Status FlowModelBuilder::DoBuildGraph(ComputeGraphPtr &compute_graph, const std:
783Status FlowModelBuilder::GetEngine(const std::string &pne_id, ProcessNodeEnginePtr &engine) const {785Status FlowModelBuilder::GetEngine(const std::string &pne_id, ProcessNodeEnginePtr &engine) const {
784 const auto find_ret = process_node_engines_.find(pne_id);786 const auto find_ret = process_node_engines_.find(pne_id);
785 GE_CHK_BOOL_RET_STATUS(find_ret != process_node_engines_.cend(), GE_CLI_GE_NOT_INITIALIZED,787 GE_CHK_BOOL_RET_STATUS(find_ret != process_node_engines_.cend(), GE_CLI_GE_NOT_INITIALIZED,
786- "[Run][GetEngine] failed find process node engine for pne_id: [%s].", pne_id.c_str());788+ "[Run][GetEngine] failed to find process node engine for pne_id: [%s].", pne_id.c_str());
787 engine = find_ret->second;789 engine = find_ret->second;
788 GE_CHECK_NOTNULL(engine, "process node engine is null, pne_id=%s.", pne_id.c_str());790 GE_CHECK_NOTNULL(engine, "process node engine is null, pne_id=%s.", pne_id.c_str());
789 return SUCCESS;791 return SUCCESS;
@@ -148,7 +148,7 @@ Status FlowModelCache::Init(const ComputeGraphPtr &root_graph) {
148 cache_dir_.c_str(), cache_index_.graph_key.c_str());148 cache_dir_.c_str(), cache_index_.graph_key.c_str());
149 return SUCCESS;149 return SUCCESS;
150 }150 }
151- GELOGI("Cache is enable, cache_dir=%s, graph_key=%s.", cache_dir_.c_str(), cache_index_.graph_key.c_str());151+ GELOGI("Cache is enabled, cache_dir=%s, graph_key=%s.", cache_dir_.c_str(), cache_index_.graph_key.c_str());
152 if (!CheckFileExist(cache_dir_)) {152 if (!CheckFileExist(cache_dir_)) {
153 REPORT_PREDEFINED_ERR_MSG("E13026", std::vector<const char_t *>({"pathname", "reason"}),153 REPORT_PREDEFINED_ERR_MSG("E13026", std::vector<const char_t *>({"pathname", "reason"}),
154 std::vector<const char_t *>({cache_dir_.c_str(), "The cache directory does not exist."}));154 std::vector<const char_t *>({cache_dir_.c_str(), "The cache directory does not exist."}));
@@ -86,7 +86,7 @@ Status UdfModelBuilder::Build(UdfModel &udf_model) const {
86 }86 }
87 continue;87 continue;
88 }88 }
89- GE_CHK_BOOL_RET_STATUS(op_type == FLOWFUNC, FAILED, "Unsupport this op[%s], only support op[%s].", op_type.c_str(),89+ GE_CHK_BOOL_RET_STATUS(op_type == FLOWFUNC, FAILED, "Unsupported op[%s], only support op[%s].", op_type.c_str(),
90 FLOWFUNC);90 FLOWFUNC);
91 GE_CHK_BOOL_RET_STATUS(!has_udf, FAILED, "The graph[%s] has more than one udf op, only support one udf op.",91 GE_CHK_BOOL_RET_STATUS(!has_udf, FAILED, "The graph[%s] has more than one udf op, only support one udf op.",
92 graph->GetName().c_str());92 graph->GetName().c_str());
@@ -1193,7 +1193,7 @@ bool HeterogeneousModelExecutor::IsModelInstanceAbnormal(const std::string &subm
1193 submodel_instance_name.c_str());1193 submodel_instance_name.c_str());
1194 return true;1194 return true;
1195 }1195 }
1196- GELOGI("ModelIndexInfoUpdate, submodel instance[%s] is normals", submodel_instance_name.c_str());1196+ GELOGI("ModelIndexInfoUpdate, submodel instance[%s] is normal", submodel_instance_name.c_str());
1197 return false;1197 return false;
1198}1198}
1199 1199 
@@ -1429,7 +1429,7 @@ Status HeterogeneousModelExecutor::FeedRawData(const std::vector<RawData> &raw_d
1429 GE_CHK_STATUS_RET_NOLOG(FeedEmptyEosData(control_info));1429 GE_CHK_STATUS_RET_NOLOG(FeedEmptyEosData(control_info));
1430 } else {1430 } else {
1431 GE_CHK_STATUS_RET(io_helper_.FeedRawData(raw_data_list, index, control_info),1431 GE_CHK_STATUS_RET(io_helper_.FeedRawData(raw_data_list, index, control_info),
1432- "Failed to raw data for index %u failed.", index);1432+ "Failed to feed raw data for index %u.", index);
1433 }1433 }
1434 for (size_t i = 0UL; i < control_input_queue_attrs_.size(); ++i) {1434 for (size_t i = 0UL; i < control_input_queue_attrs_.size(); ++i) {
1435 const int32_t control_value = 0;1435 const int32_t control_value = 0;
@@ -1551,7 +1551,7 @@ Status HeterogeneousModelExecutor::FeedFlowMsg(const std::vector<uint32_t> &inde
1551void HeterogeneousModelExecutor::DynamicSchedInfoClear() {1551void HeterogeneousModelExecutor::DynamicSchedInfoClear() {
1552 const std::lock_guard<std::mutex> lk(queue_status_mu_);1552 const std::lock_guard<std::mutex> lk(queue_status_mu_);
1553 queue_status_info_.clear();1553 queue_status_info_.clear();
1554- GEEVENT("DynamicSched, scheding data: Total(us)=%" PRIu64 ", Cnt=%" PRIu64 ", Per duration(ns)=%" PRIu641554+ GEEVENT("DynamicSched, scheduling data: Total(us)=%" PRIu64 ", Cnt=%" PRIu64 ", Per duration(ns)=%" PRIu64
1555 ", "1555 ", "
1556 "Max duration(ns)=%" PRIu64 ", Greater 100us cnt=%" PRIu64,1556 "Max duration(ns)=%" PRIu64 ", Greater 100us cnt=%" PRIu64,
1557 duration_total_ / kMicrosecondToNanosecond, cnt_total_,1557 duration_total_ / kMicrosecondToNanosecond, cnt_total_,
@@ -151,7 +151,7 @@ DFlowSessionImpl::~DFlowSessionImpl() {
151 151 
152Status DFlowSessionImpl::Initialize(const std::map<std::string, std::string> &options) {152Status DFlowSessionImpl::Initialize(const std::map<std::string, std::string> &options) {
153 if (is_initialized_) {153 if (is_initialized_) {
154- GELOGI("[DFlowSessionImpl:%" PRIu64 "] session already initialize.", session_id_);154+ GELOGI("[DFlowSessionImpl:%" PRIu64 "] session already initialized.", session_id_);
155 return SUCCESS;155 return SUCCESS;
156 }156 }
157 157 
@@ -307,7 +307,7 @@ FlowModelPtr DFlowSessionImpl::CompileAndLoadGraph(uint32_t graph_id, const std:
307Status DFlowSessionImpl::CompileGraph(uint32_t graph_id, const std::vector<GeTensor> &ge_inputs) {307Status DFlowSessionImpl::CompileGraph(uint32_t graph_id, const std::vector<GeTensor> &ge_inputs) {
308 UpdateThreadContext(graph_id);308 UpdateThreadContext(graph_id);
309 GE_CHK_STATUS_RET(dflow_graph_manager_.CompileGraph(graph_id, ge_inputs),309 GE_CHK_STATUS_RET(dflow_graph_manager_.CompileGraph(graph_id, ge_inputs),
310- "[DFlowSessionImpl:%" PRIu64 "] compile graph failed, session_id_, graph_id=%u", graph_id);310+ "[DFlowSessionImpl:%" PRIu64 "] compile graph failed, graph_id=%u", session_id_, graph_id);
311 GELOGI("[DFlowSessionImpl:%" PRIu64 "] Compile graph success, graph_id=%u.", session_id_, graph_id);311 GELOGI("[DFlowSessionImpl:%" PRIu64 "] Compile graph success, graph_id=%u.", session_id_, graph_id);
312 return SUCCESS;312 return SUCCESS;
313}313}
@@ -349,7 +349,7 @@ Status DFlowSessionImpl::RunGraph(uint32_t graph_id, const std::vector<Tensor> &
349 GE_CHK_STATUS_RET(FlowModelManager::GetInstance().ExecuteFlowModel(flow_model->GetModelId(), ge_inputs, ge_outputs),349 GE_CHK_STATUS_RET(FlowModelManager::GetInstance().ExecuteFlowModel(flow_model->GetModelId(), ge_inputs, ge_outputs),
350 "execute flow model failed, graph_id=%u, model_id=%u", graph_id, flow_model->GetModelId());350 "execute flow model failed, graph_id=%u, model_id=%u", graph_id, flow_model->GetModelId());
351 outputs = ToTensors(ge_outputs);351 outputs = ToTensors(ge_outputs);
352- GELOGI("run graph success, graph_id=%u.", session_id_, graph_id);352+ GELOGI("run graph success, session_id:%" PRIu64 ", graph_id=%u.", session_id_, graph_id);
353 return SUCCESS;353 return SUCCESS;
354}354}
355 355 
@@ -465,11 +465,11 @@ Status DFlowSessionImpl::FeedRawData(uint32_t graph_id, const std::vector<RawDat
465 FlowModelPtr flow_model = dflow_graph_manager_.GetFlowModel(graph_id);465 FlowModelPtr flow_model = dflow_graph_manager_.GetFlowModel(graph_id);
466 if (flow_model == nullptr) {466 if (flow_model == nullptr) {
467 GELOGE(FAILED,467 GELOGE(FAILED,
468- "[Get][FlowModel] failed. Please make sure graph has been build before feed raw data, "468+ "[Get][FlowModel] failed. Please make sure graph has been built before feed raw data, "
469 "DFlowSessionImpl:%" PRIu64 " graph_id=%u.",469 "DFlowSessionImpl:%" PRIu64 " graph_id=%u.",
470 session_id_, graph_id);470 session_id_, graph_id);
471 REPORT_INNER_ERR_MSG("E19999",471 REPORT_INNER_ERR_MSG("E19999",
472- "[Get][FlowModel] failed. Please make sure graph has been build before feed raw data, "472+ "[Get][FlowModel] failed. Please make sure graph has been built before feed raw data, "
473 "DFlowSessionImpl:%" PRIu64 " graph_id=%u.",473 "DFlowSessionImpl:%" PRIu64 " graph_id=%u.",
474 session_id_, graph_id);474 session_id_, graph_id);
475 return FAILED;475 return FAILED;
@@ -127,7 +127,7 @@ int32_t CountBatchFlowFunc::GetBatchAttr() {
127 return get_ret;127 return get_ret;
128 }128 }
129 if ((timeout_ < 0L) || (timeout_ >= static_cast<int64_t>(UINT32_MAX))) {129 if ((timeout_ < 0L) || (timeout_ >= static_cast<int64_t>(UINT32_MAX))) {
130- UDF_LOG_ERROR("[CountBatch]Attr[timeout] is invalid[%ld], vaild range is[0, %u).", timeout_, UINT32_MAX);130+ UDF_LOG_ERROR("[CountBatch]Attr[timeout] is invalid[%ld], valid range is[0, %u).", timeout_, UINT32_MAX);
131 return FLOW_FUNC_ERR_PARAM_INVALID;131 return FLOW_FUNC_ERR_PARAM_INVALID;
132 }132 }
133 get_ret = context_->GetAttr("padding", padding_);133 get_ret = context_->GetAttr("padding", padding_);
@@ -1279,7 +1279,7 @@ FsmStatus LlmCommEntity::ProbeSync(uint64_t data_aize, uint64_t timeout, bool is
1279 return FsmStatus::kFsmFailed;1279 return FsmStatus::kFsmFailed;
1280 }1280 }
1281 if ((count == 0) || static_cast<uint64_t>(count) > data_aize) {1281 if ((count == 0) || static_cast<uint64_t>(count) > data_aize) {
1282- UDF_LOG_ERROR("Invalid req size%s, count:%d, expected req len:%lu, entity:%s.",1282+ UDF_LOG_ERROR("Invalid req size %s, count:%d, expected req len:%lu, entity:%s.",
1283 is_receive_meta ? kInvalidSyncCallMsg : "", count, data_aize, desc_.c_str());1283 is_receive_meta ? kInvalidSyncCallMsg : "", count, data_aize, desc_.c_str());
1284 return FsmStatus::kFsmFailed;1284 return FsmStatus::kFsmFailed;
1285 }1285 }
@@ -1292,7 +1292,7 @@ FsmStatus LlmCommEntity::ProbeSync(uint64_t data_aize, uint64_t timeout, bool is
1292 }1292 }
1293 }1293 }
1294 }1294 }
1295- UDF_LOG_DEBUG("Success to probe envelope, data_aize:%lu, entity:%s.", data_aize, desc_.c_str());1295+ UDF_LOG_DEBUG("Success to probe envelope, data_size:%lu, entity:%s.", data_aize, desc_.c_str());
1296 return FsmStatus::kFsmSuccess;1296 return FsmStatus::kFsmSuccess;
1297}1297}
1298 1298 
@@ -73,7 +73,7 @@ FsmStatus ReceiveState::Process(LlmCommEntity &entity) {
73 }73 }
74 LlmCommEntity::SyncKvAddrInfo &addr_info = entity.GetSyncKvAddrInfo();74 LlmCommEntity::SyncKvAddrInfo &addr_info = entity.GetSyncKvAddrInfo();
75 if (static_cast<uint64_t>(addr_info.req_info_count) < sizeof(SyncKvReqInfo)) {75 if (static_cast<uint64_t>(addr_info.req_info_count) < sizeof(SyncKvReqInfo)) {
76- UDF_RUN_LOG_INFO(76+ UDF_RUN_LOG_WARN(
77 "Invalid req size, probably caused by transfer cache failed, count:%d, expected req len:%zu, "77 "Invalid req size, probably caused by transfer cache failed, count:%d, expected req len:%zu, "
78 "entity:%s.",78 "entity:%s.",
79 addr_info.req_info_count, sizeof(SyncKvReqInfo), entity.GetDesc().c_str());79 addr_info.req_info_count, sizeof(SyncKvReqInfo), entity.GetDesc().c_str());
@@ -64,7 +64,7 @@ FsmStatus ReceiveTransferReqState::TestReq(LlmCommEntity &entity) {
64 }64 }
65 LlmCommEntity::TransferKvAddrInfo &addr_info = entity.GetTransferKvAddrInfo();65 LlmCommEntity::TransferKvAddrInfo &addr_info = entity.GetTransferKvAddrInfo();
66 if (static_cast<uint64_t>(addr_info.req_info_count) < sizeof(TransferToRemoteReq)) {66 if (static_cast<uint64_t>(addr_info.req_info_count) < sizeof(TransferToRemoteReq)) {
67- UDF_RUN_LOG_INFO(67+ UDF_RUN_LOG_WARN(
68 "Invalid req size, probably caused by pull cache failed, count:%d, expected req len:%zu, "68 "Invalid req size, probably caused by pull cache failed, count:%d, expected req len:%zu, "
69 "entity:%s.",69 "entity:%s.",
70 addr_info.req_info_count, sizeof(TransferToRemoteReq), entity.GetDesc().c_str());70 addr_info.req_info_count, sizeof(TransferToRemoteReq), entity.GetDesc().c_str());
@@ -95,7 +95,7 @@ FsmStatus SendState::GenerateSyncKvMetaInfo(LlmCommEntity &entity) {
95 uint64_t buffer_info_size = static_cast<uint64_t>(addr_info.req_info_count) - sizeof(SyncKvReqInfo);95 uint64_t buffer_info_size = static_cast<uint64_t>(addr_info.req_info_count) - sizeof(SyncKvReqInfo);
96 auto expect_count = req_info->buffer_count_per_layer + req_info->tensor_index_count;96 auto expect_count = req_info->buffer_count_per_layer + req_info->tensor_index_count;
97 if (expect_count > (buffer_info_size / sizeof(SyncBufferInfo))) {97 if (expect_count > (buffer_info_size / sizeof(SyncBufferInfo))) {
98- UDF_RUN_LOG_INFO("Invalid req size, expect_count:%u, real count:%lu, entity:%s.", expect_count,98+ UDF_RUN_LOG_WARN("Invalid req size, expect_count:%u, real count:%lu, entity:%s.", expect_count,
99 buffer_info_size / sizeof(SyncBufferInfo), entity.GetDesc().c_str());99 buffer_info_size / sizeof(SyncBufferInfo), entity.GetDesc().c_str());
100 return FsmStatus::kFsmParamInvalid;100 return FsmStatus::kFsmParamInvalid;
101 }101 }
@@ -136,7 +136,7 @@ FsmStatus CacheManager::DeallocateCache(int64_t cache_id) {
136 std::lock_guard<std::mutex> lk(mu_);136 std::lock_guard<std::mutex> lk(mu_);
137 const auto it = cache_id_to_entry_.find(cache_id);137 const auto it = cache_id_to_entry_.find(cache_id);
138 if (it == cache_id_to_entry_.cend()) {138 if (it == cache_id_to_entry_.cend()) {
139- UDF_LOG_INFO("[cache_id:%ld][Deallocate] failed, cache_id not exist", cache_id);139+ UDF_LOG_ERROR("[cache_id:%ld][Deallocate] failed, cache_id not exist", cache_id);
140 return FsmStatus::kFsmKvNotExist;140 return FsmStatus::kFsmKvNotExist;
141 }141 }
142 auto &cache_entry = it->second;142 auto &cache_entry = it->second;
@@ -472,7 +472,7 @@ int32_t FlowFuncExecutor::SetExecutorEschedPriority() const {
472 esched_process_priority_, static_cast<int32_t>(drv_ret));472 esched_process_priority_, static_cast<int32_t>(drv_ret));
473 return FLOW_FUNC_ERR_DRV_ERROR;473 return FLOW_FUNC_ERR_DRV_ERROR;
474 }474 }
475- UDF_LOG_INFO("[UdfModelEschedPriority] Succeed to set eshced process priority=%d.", esched_process_priority_);475+ UDF_LOG_INFO("[UdfModelEschedPriority] Succeed to set esched process priority=%d.", esched_process_priority_);
476 }476 }
477 if (esched_event_priority_ != kUserUnsetESchedPriority) {477 if (esched_event_priority_ != kUserUnsetESchedPriority) {
478 auto drv_ret = halEschedSetEventPriority(device_id, EVENT_QUEUE_EMPTY_TO_NOT_EMPTY,478 auto drv_ret = halEschedSetEventPriority(device_id, EVENT_QUEUE_EMPTY_TO_NOT_EMPTY,
@@ -491,7 +491,7 @@ int32_t FlowFuncExecutor::SetExecutorEschedPriority() const {
491 static_cast<int32_t>(drv_ret));491 static_cast<int32_t>(drv_ret));
492 return FLOW_FUNC_ERR_DRV_ERROR;492 return FLOW_FUNC_ERR_DRV_ERROR;
493 }493 }
494- UDF_LOG_INFO("[UdfModelEschedPriority] Succeed to set eshced event priority=%d.", esched_event_priority_);494+ UDF_LOG_INFO("[UdfModelEschedPriority] Succeed to set esched event priority=%d.", esched_event_priority_);
495 }495 }
496 return FLOW_FUNC_SUCCESS;496 return FLOW_FUNC_SUCCESS;
497}497}
@@ -1490,7 +1490,7 @@ int32_t FlowFuncExecutor::SerializeProtoToMbuf(const T &proto_msg, Mbuf *&mbuf_t
1490 1490 
1491int32_t FlowFuncExecutor::SendMessageByResponseQueue(const ControlMessageType &msg_type, const int32_t result) {1491int32_t FlowFuncExecutor::SendMessageByResponseQueue(const ControlMessageType &msg_type, const int32_t result) {
1492 if (GlobalConfig::Instance().GetRspQueueId() == UINT32_MAX) {1492 if (GlobalConfig::Instance().GetRspQueueId() == UINT32_MAX) {
1493- UDF_LOG_INFO("There is not message queue in current version. skip to send message.");1493+ UDF_LOG_INFO("There is no message queue in current version. Skip to send message.");
1494 return FLOW_FUNC_SUCCESS;1494 return FLOW_FUNC_SUCCESS;
1495 }1495 }
1496 std::string msg;1496 std::string msg;
@@ -292,11 +292,11 @@ int32_t FlowModelImpl::DequeueMbuf(size_t output_idx, Mbuf *&mbuf, int32_t timeo
292 } while (((wait_time < timeout) || (timeout == -1)) && (!GlobalConfig::Instance().GetAbnormalStatus()) &&292 } while (((wait_time < timeout) || (timeout == -1)) && (!GlobalConfig::Instance().GetAbnormalStatus()) &&
293 (!GlobalConfig::Instance().GetExitFlag()));293 (!GlobalConfig::Instance().GetExitFlag()));
294 if (GlobalConfig::Instance().GetAbnormalStatus()) {294 if (GlobalConfig::Instance().GetAbnormalStatus()) {
295- UDF_LOG_ERROR("Stop dequeue result of now system status is abnormal. Wait to redeploy.");295+ UDF_LOG_ERROR("Stop dequeue because system status is abnormal. Wait to redeploy.");
296 return FLOW_FUNC_STATUS_REDEPLOYING;296 return FLOW_FUNC_STATUS_REDEPLOYING;
297 }297 }
298 UDF_LOG_ERROR(298 UDF_LOG_ERROR(
299- "wait event timeout, wait_time=%ld, timeout=%d(ms), output_idx=%zu, inputQueueSize=%s, outputQueueSize=%s",299+ "wait event timeout, wait_time=%ld(ms), timeout=%d(ms), output_idx=%zu, inputQueueSize=%s, outputQueueSize=%s",
300 wait_time, timeout, output_idx, ToString(GetQueueSize(input_queue_wrappers_)).c_str(),300 wait_time, timeout, output_idx, ToString(GetQueueSize(input_queue_wrappers_)).c_str(),
301 ToString(GetQueueSize(output_queue_wrappers_)).c_str());301 ToString(GetQueueSize(output_queue_wrappers_)).c_str());
302 return FLOW_FUNC_ERR_TIME_OUT_ERROR;302 return FLOW_FUNC_ERR_TIME_OUT_ERROR;
@@ -360,7 +360,7 @@ void FlowModelImpl::GetMsgs(std::vector<Mbuf *> &data, std::vector<std::shared_p
360}360}
361 361 
362int32_t FlowModelImpl::AlignFetch(std::vector<std::shared_ptr<FlowMsg>> &output_msgs, int32_t timeout) {362int32_t FlowModelImpl::AlignFetch(std::vector<std::shared_ptr<FlowMsg>> &output_msgs, int32_t timeout) {
363- UDF_LOG_DEBUG("AlignFetch, timeout=%d, output size %u(ms).", timeout, output_queue_infos_.size());363+ UDF_LOG_DEBUG("AlignFetch, timeout=%d(ms), output size %u.", timeout, output_queue_infos_.size());
364 int32_t ret = FLOW_FUNC_SUCCESS;364 int32_t ret = FLOW_FUNC_SUCCESS;
365 std::vector<Mbuf *> tmp_data;365 std::vector<Mbuf *> tmp_data;
366 while (true) {366 while (true) {
@@ -401,7 +401,7 @@ int32_t FlowFuncTestMain(int32_t argc, char *argv[])
401 401 
402 auto models = FlowFunc::FlowFuncModel::ParseModels(start_param.base_dir + start_param.load_path);402 auto models = FlowFunc::FlowFuncModel::ParseModels(start_param.base_dir + start_param.load_path);
403 if (models.empty()) {403 if (models.empty()) {
404- UDF_LOG_ERROR("Failed to parse models failed.");404+ UDF_LOG_ERROR("Failed to parse models.");
405 return FLOW_FUNC_FAILED;405 return FLOW_FUNC_FAILED;
406 }406 }
407 int32_t ret = FlowFunc::FlowFuncDrvManager::Instance().Init();407 int32_t ret = FlowFunc::FlowFuncDrvManager::Instance().Init();
@@ -277,7 +277,7 @@ std::shared_ptr<FuncWrapper> FlowFuncManager::GetFlowFuncWrapper(const std::stri
277void FlowFuncManager::Register(const std::string &flow_func_name, const FLOW_FUNC_CREATOR_FUNC &func) {277void FlowFuncManager::Register(const std::string &flow_func_name, const FLOW_FUNC_CREATOR_FUNC &func) {
278 std::unique_lock<std::mutex> lock(guard_mutex_);278 std::unique_lock<std::mutex> lock(guard_mutex_);
279 if (creator_map_.count(flow_func_name) != 0U) {279 if (creator_map_.count(flow_func_name) != 0U) {
280- UDF_LOG_ERROR("%s FlowFunc creator is already exist", flow_func_name.c_str());280+ UDF_LOG_ERROR("%s FlowFunc creator already exists", flow_func_name.c_str());
281 return;281 return;
282 }282 }
283 creator_map_[flow_func_name] = func;283 creator_map_[flow_func_name] = func;
@@ -287,7 +287,7 @@ void FlowFuncManager::Register(const std::string &flow_func_name, const FLOW_FUN
287void FlowFuncManager::Register(const std::string &flow_func_name, const MULTI_FUNC_CREATOR_FUNC &multi_func_creator) {287void FlowFuncManager::Register(const std::string &flow_func_name, const MULTI_FUNC_CREATOR_FUNC &multi_func_creator) {
288 std::unique_lock<std::mutex> lock(guard_mutex_);288 std::unique_lock<std::mutex> lock(guard_mutex_);
289 if (multi_func_creator_map_.count(flow_func_name) != 0U) {289 if (multi_func_creator_map_.count(flow_func_name) != 0U) {
290- UDF_LOG_WARN("%s FlowFunc creator is already exist", flow_func_name.c_str());290+ UDF_LOG_WARN("%s FlowFunc creator already exists", flow_func_name.c_str());
291 return;291 return;
292 }292 }
293 multi_func_creator_map_[flow_func_name] = multi_func_creator;293 multi_func_creator_map_[flow_func_name] = multi_func_creator;
@@ -298,7 +298,7 @@ void FlowFuncManager::Register(const std::string &flow_func_name,
298 const MULTI_FUNC_WITH_Q_CREATOR_FUNC &multi_func_with_q_creator) {298 const MULTI_FUNC_WITH_Q_CREATOR_FUNC &multi_func_with_q_creator) {
299 std::unique_lock<std::mutex> lock(guard_mutex_);299 std::unique_lock<std::mutex> lock(guard_mutex_);
300 if (multi_func_with_q_creator_map_.count(flow_func_name) != 0U) {300 if (multi_func_with_q_creator_map_.count(flow_func_name) != 0U) {
301- UDF_LOG_WARN("%s FlowFunc with input queues creator is already exist", flow_func_name.c_str());301+ UDF_LOG_WARN("%s FlowFunc with input queues creator already exists", flow_func_name.c_str());
302 return;302 return;
303 }303 }
304 multi_func_with_q_creator_map_[flow_func_name] = multi_func_with_q_creator;304 multi_func_with_q_creator_map_[flow_func_name] = multi_func_with_q_creator;
@@ -28,7 +28,7 @@ bool CheckAlignSizeValid(const uint32_t align) {
28 return false;28 return false;
29 }29 }
30 if (kMaxAlignSize % align != 0) {30 if (kMaxAlignSize % align != 0) {
31- UDF_LOG_ERROR("alloc failed, as align=%u must can be divisible by %zu.", align, kMaxAlignSize);31+ UDF_LOG_ERROR("alloc failed, as align=%u must be divisible by %zu.", align, kMaxAlignSize);
32 return false;32 return false;
33 }33 }
34 return true;34 return true;
@@ -198,7 +198,7 @@ int32_t FlowFuncRunContext::CheckParamsForUserData(const void *data, size_t size
198 return FLOW_FUNC_ERR_PARAM_INVALID;198 return FLOW_FUNC_ERR_PARAM_INVALID;
199 }199 }
200 if (size == 0U) {200 if (size == 0U) {
201- UDF_LOG_ERROR("The size is 0, should in (0, 64].");201+ UDF_LOG_ERROR("The size is 0, should be in (0, 64].");
202 return FLOW_FUNC_ERR_PARAM_INVALID;202 return FLOW_FUNC_ERR_PARAM_INVALID;
203 }203 }
204 if ((offset >= kMaxUserDataSize) || ((kMaxUserDataSize - offset) < size)) {204 if ((offset >= kMaxUserDataSize) || ((kMaxUserDataSize - offset) < size)) {
@@ -282,7 +282,7 @@ int32_t FlowFuncRunContext::BalanceOptionFilter(const OutOptions &options,
282 std::vector<std::shared_ptr<FlowMsg>> &after_filter_out_msgs) const {282 std::vector<std::shared_ptr<FlowMsg>> &after_filter_out_msgs) const {
283 const auto *balance_config = options.GetBalanceConfig();283 const auto *balance_config = options.GetBalanceConfig();
284 if (balance_config == nullptr) {284 if (balance_config == nullptr) {
285- UDF_LOG_INFO("balance config is not exits, instance name[%s].", params_->GetName());285+ UDF_LOG_INFO("balance config does not exist, instance name[%s].", params_->GetName());
286 after_filter_out_msgs = out_msgs;286 after_filter_out_msgs = out_msgs;
287 return FLOW_FUNC_SUCCESS;287 return FLOW_FUNC_SUCCESS;
288 }288 }
@@ -346,7 +346,7 @@ int32_t MbufFlowMsg::InitMbufTensorList(const std::vector<std::vector<int64_t>>
346 // data_orig_size is not include RuntimeTensorDesc. data_align_size is include RunTimeTensorDesc size.346 // data_orig_size is not include RuntimeTensorDesc. data_align_size is include RunTimeTensorDesc size.
347 if ((shapes.size() != data_types.size()) || (shapes.size() != data_align_size.size()) ||347 if ((shapes.size() != data_types.size()) || (shapes.size() != data_align_size.size()) ||
348 (shapes.size() != data_orig_size.size())) {348 (shapes.size() != data_orig_size.size())) {
349- UDF_LOG_ERROR("Shape size=%zu datatype size=%zu data_orig_size size=%zu data_orig_size size=%zu should be same",349+ UDF_LOG_ERROR("Shape size=%zu datatype size=%zu data_align_size size=%zu data_orig_size size=%zu should be same",
350 shapes.size(), data_types.size(), data_align_size.size(), data_orig_size.size());350 shapes.size(), data_types.size(), data_align_size.size(), data_orig_size.size());
351 return FLOW_FUNC_FAILED;351 return FLOW_FUNC_FAILED;
352 }352 }
@@ -676,7 +676,7 @@ int32_t MbufFlowMsg::ParseMbuf() {
676 return FLOW_FUNC_ERR_MEM_BUF_ERROR;676 return FLOW_FUNC_ERR_MEM_BUF_ERROR;
677 }677 }
678 if (mbuf_info_.head_buf_len < sizeof(MbufHeadMsg)) {678 if (mbuf_info_.head_buf_len < sizeof(MbufHeadMsg)) {
679- UDF_LOG_ERROR("mbuf priv info len=%u can't be less than to sizeof(MbufHeadMsg)=%zu.", mbuf_info_.head_buf_len,679+ UDF_LOG_ERROR("mbuf priv info len=%u can't be less than sizeof(MbufHeadMsg)=%zu.", mbuf_info_.head_buf_len,
680 sizeof(MbufHeadMsg));680 sizeof(MbufHeadMsg));
681 return FLOW_FUNC_ERR_PARAM_INVALID;681 return FLOW_FUNC_ERR_PARAM_INVALID;
682 }682 }
@@ -172,7 +172,7 @@ int32_t MbufFlowMsgQueue::DequeueMbuf(Mbuf *&mbuf, int32_t timeout) {
172 } while (((wait_time < timeout) || (timeout == -1)) && (!FlowFuncConfigManager::GetConfig()->GetAbnormalStatus()) &&172 } while (((wait_time < timeout) || (timeout == -1)) && (!FlowFuncConfigManager::GetConfig()->GetAbnormalStatus()) &&
173 (!FlowFuncConfigManager::GetConfig()->GetExitFlag()));173 (!FlowFuncConfigManager::GetConfig()->GetExitFlag()));
174 if (FlowFuncConfigManager::GetConfig()->GetAbnormalStatus()) {174 if (FlowFuncConfigManager::GetConfig()->GetAbnormalStatus()) {
175- UDF_LOG_ERROR("Stop dequeue result of now system status is abnormal. Wait to redeploy.");175+ UDF_LOG_ERROR("Stop dequeue because system status is abnormal. Wait to redeploy.");
176 return FLOW_FUNC_STATUS_REDEPLOYING;176 return FLOW_FUNC_STATUS_REDEPLOYING;
177 }177 }
178 if (FlowFuncConfigManager::GetConfig()->GetExitFlag()) {178 if (FlowFuncConfigManager::GetConfig()->GetExitFlag()) {
@@ -24,7 +24,7 @@ int32_t AttrValueImpl::GetVal(AscendString &value) const {
24 24 
25int32_t AttrValueImpl::GetVal(std::vector<AscendString> &value) const {25int32_t AttrValueImpl::GetVal(std::vector<AscendString> &value) const {
26 if (!proto_attr_.has_array()) {26 if (!proto_attr_.has_array()) {
27- UDF_LOG_ERROR("proto is not has array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),27+ UDF_LOG_ERROR("proto does not have array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),
28 static_cast<int32_t>(ff::udf::AttrValue::kArray));28 static_cast<int32_t>(ff::udf::AttrValue::kArray));
29 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;29 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;
30 }30 }
@@ -48,7 +48,7 @@ int32_t AttrValueImpl::GetVal(int64_t &value) const {
48 48 
49int32_t AttrValueImpl::GetVal(std::vector<int64_t> &value) const {49int32_t AttrValueImpl::GetVal(std::vector<int64_t> &value) const {
50 if (!proto_attr_.has_array()) {50 if (!proto_attr_.has_array()) {
51- UDF_LOG_ERROR("proto is not has array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),51+ UDF_LOG_ERROR("proto does not have array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),
52 static_cast<int32_t>(ff::udf::AttrValue::kArray));52 static_cast<int32_t>(ff::udf::AttrValue::kArray));
53 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;53 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;
54 }54 }
@@ -62,7 +62,7 @@ int32_t AttrValueImpl::GetVal(std::vector<int64_t> &value) const {
62 62 
63int32_t AttrValueImpl::GetVal(std::vector<std::vector<int64_t>> &value) const {63int32_t AttrValueImpl::GetVal(std::vector<std::vector<int64_t>> &value) const {
64 if (!proto_attr_.has_list_list_i()) {64 if (!proto_attr_.has_list_list_i()) {
65- UDF_LOG_ERROR("proto is not has array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),65+ UDF_LOG_ERROR("proto does not have array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),
66 static_cast<int32_t>(ff::udf::AttrValue::kArray));66 static_cast<int32_t>(ff::udf::AttrValue::kArray));
67 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;67 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;
68 }68 }
@@ -91,7 +91,7 @@ int32_t AttrValueImpl::GetVal(float &value) const {
91 91 
92int32_t AttrValueImpl::GetVal(std::vector<float> &value) const {92int32_t AttrValueImpl::GetVal(std::vector<float> &value) const {
93 if (!proto_attr_.has_array()) {93 if (!proto_attr_.has_array()) {
94- UDF_LOG_ERROR("proto is not has array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),94+ UDF_LOG_ERROR("proto does not have array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),
95 static_cast<int32_t>(ff::udf::AttrValue::kArray));95 static_cast<int32_t>(ff::udf::AttrValue::kArray));
96 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;96 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;
97 }97 }
@@ -115,7 +115,7 @@ int32_t AttrValueImpl::GetVal(bool &value) const {
115 115 
116int32_t AttrValueImpl::GetVal(std::vector<bool> &value) const {116int32_t AttrValueImpl::GetVal(std::vector<bool> &value) const {
117 if (!proto_attr_.has_array()) {117 if (!proto_attr_.has_array()) {
118- UDF_LOG_ERROR("proto is not has array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),118+ UDF_LOG_ERROR("proto does not have array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),
119 static_cast<int32_t>(ff::udf::AttrValue::kArray));119 static_cast<int32_t>(ff::udf::AttrValue::kArray));
120 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;120 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;
121 }121 }
@@ -139,7 +139,7 @@ int32_t AttrValueImpl::GetVal(TensorDataType &value) const {
139 139 
140int32_t AttrValueImpl::GetVal(std::vector<TensorDataType> &value) const {140int32_t AttrValueImpl::GetVal(std::vector<TensorDataType> &value) const {
141 if (!proto_attr_.has_array()) {141 if (!proto_attr_.has_array()) {
142- UDF_LOG_ERROR("proto is not has array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),142+ UDF_LOG_ERROR("proto does not have array, value case=%d, kArray=%d", static_cast<int32_t>(proto_attr_.value_case()),
143 static_cast<int32_t>(ff::udf::AttrValue::kArray));143 static_cast<int32_t>(ff::udf::AttrValue::kArray));
144 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;144 return FLOW_FUNC_ERR_ATTR_TYPE_MISMATCH;
145 }145 }
@@ -424,7 +424,7 @@ std::vector<std::unique_ptr<FlowFuncModel>> FlowFuncModel::ParseModels(const std
424 424 
425 int32_t model_num = batch_load_model_req.models_size();425 int32_t model_num = batch_load_model_req.models_size();
426 if (model_num == 0) {426 if (model_num == 0) {
427- UDF_LOG_ERROR("models is not exits, file=%s.", batch_model_path.c_str());427+ UDF_LOG_ERROR("models is not exist, file=%s.", batch_model_path.c_str());
428 return {};428 return {};
429 }429 }
430 430 
@@ -116,7 +116,7 @@ int32_t DataAligner::GetTransIdAndDataLabel(Mbuf *mbuf, uint64_t &trans_id, uint
116 return HICAID_FAILED;116 return HICAID_FAILED;
117 }117 }
118 if (head_buf_len < sizeof(MbufHeadMsg)) {118 if (head_buf_len < sizeof(MbufHeadMsg)) {
119- HICAID_LOG_ERROR("mbuf priv info len=%u can't be less than to sizeof(MbufHeadMsg)=%zu.", head_buf_len,119+ HICAID_LOG_ERROR("mbuf priv info len=%u can't be less than sizeof(MbufHeadMsg)=%zu.", head_buf_len,
120 sizeof(MbufHeadMsg));120 sizeof(MbufHeadMsg));
121 return HICAID_FAILED;121 return HICAID_FAILED;
122 }122 }
@@ -91,7 +91,7 @@ void MbufReader::DumpReaderStatus() const {
91 queue_size_list.reserve(queue_wrappers_.size());91 queue_size_list.reserve(queue_wrappers_.size());
92 QueryQueueSize(queue_size_list, not_empty_queue_num);92 QueryQueueSize(queue_size_list, not_empty_queue_num);
93 if ((not_empty_queue_num > 0) || some_data_cached) {93 if ((not_empty_queue_num > 0) || some_data_cached) {
94- queue_status_info += ", may be miss data, current queue size=" + VecToStr(queue_size_list);94+ queue_status_info += ", data may be missing, current queue size=" + VecToStr(queue_size_list);
95 }95 }
96 }96 }
97 97 
@@ -122,7 +122,7 @@ int32_t QueueWrapper::DiscardMbuf() {
122 ++count;122 ++count;
123 continue;123 continue;
124 } else {124 } else {
125- HICAID_LOG_ERROR("Discard mbuff failed result of dequeue error.");125+ HICAID_LOG_ERROR("Discard mbuf as a result of dequeue error.");
126 return HICAID_ERR_QUEUE_FAILED;126 return HICAID_ERR_QUEUE_FAILED;
127 }127 }
128 }128 }
@@ -113,7 +113,7 @@ void UdfDumpManager::SetDumpStep(const std::string &step) {
113 step_range_.emplace_back(lower_range, higher_range);113 step_range_.emplace_back(lower_range, higher_range);
114 UDF_LOG_DEBUG("Insert step range from %u to %u", lower_range, higher_range);114 UDF_LOG_DEBUG("Insert step range from %u to %u", lower_range, higher_range);
115 } else {115 } else {
116- UDF_LOG_WARN("Invalid dump step %s, disenable dump.", step.c_str());116+ UDF_LOG_WARN("Invalid dump step %s, disable dump.", step.c_str());
117 enable_dump_ = false;117 enable_dump_ = false;
118 }118 }
119 }119 }
@@ -238,7 +238,7 @@ int32_t UdfDumpTaskHost::DumpOutputData(const dumpNS::DumpData &dump_data, const
238int32_t UdfDumpTaskHost::DoDumpTensorHost(const std::string &dump_file_path) {238int32_t UdfDumpTaskHost::DoDumpTensorHost(const std::string &dump_file_path) {
239 UDF_LOG_INFO("op name[%s], start to dump on host, path[%s]", op_name_.c_str(), dump_file_path.c_str());239 UDF_LOG_INFO("op name[%s], start to dump on host, path[%s]", op_name_.c_str(), dump_file_path.c_str());
240 if (CreateDir(dump_path_) != FLOW_FUNC_SUCCESS) {240 if (CreateDir(dump_path_) != FLOW_FUNC_SUCCESS) {
241- UDF_LOG_ERROR("op name[%s], create dir [%s]failed.", op_name_.c_str(), dump_path_.c_str());241+ UDF_LOG_ERROR("op name[%s], create dir [%s] failed.", op_name_.c_str(), dump_path_.c_str());
242 return FLOW_FUNC_FAILED;242 return FLOW_FUNC_FAILED;
243 }243 }
244 244 
@@ -78,7 +78,8 @@ bool IsVersionWithInRequiredRange(const uint32_t effective_version,
78 }78 }
79 }79 }
80 80 
81- GELOGW("[InvalidVersion] Effective version:%u not within the required range.", effective_version);81+ GELOGW("[InvalidVersion] Effective version:%u not within the required range[%s].", effective_version,
82+ TransRequiredOppAbiVersionToString(required_version).c_str());
82 return false;83 return false;
83}84}
84 85 
@@ -295,7 +296,7 @@ bool PluginManager::GetRequiredOppAbiVersion(std::vector<std::pair<uint32_t, uin
295 } else if (mmIsDir((model_path + kRuntimePath).c_str()) == EN_OK) {296 } else if (mmIsDir((model_path + kRuntimePath).c_str()) == EN_OK) {
296 version_path = model_path + kRuntimePath + kVersionInfo;297 version_path = model_path + kRuntimePath + kVersionInfo;
297 } else {298 } else {
298- GELOGW("compiler and runtime not exited");299+ GELOGW("compiler and runtime not exist");
299 return true;300 return true;
300 }301 }
301 GELOGI("extract required opp abi version info from %s", version_path.c_str());302 GELOGI("extract required opp abi version info from %s", version_path.c_str());
@@ -328,19 +329,19 @@ bool PluginManager::GetRequiredOppAbiVersion(std::vector<std::pair<uint32_t, uin
328 second = second.substr(kEffectiveVersionNum, second.size() - kEffectiveVersionNum);329 second = second.substr(kEffectiveVersionNum, second.size() - kEffectiveVersionNum);
329 uint32_t first_num = 0U;330 uint32_t first_num = 0U;
330 if (!GetEffectiveVersion(first, first_num)) {331 if (!GetEffectiveVersion(first, first_num)) {
331- GELOGW("[InvalidVersion] Format of required_opp_abi_version [%s] is not invalid", version.c_str());332+ GELOGW("[InvalidVersion] Format of required_opp_abi_version [%s] is invalid", version.c_str());
332 return false;333 return false;
333 }334 }
334 uint32_t second_num = 0U;335 uint32_t second_num = 0U;
335 if (!GetEffectiveVersion(second, second_num)) {336 if (!GetEffectiveVersion(second, second_num)) {
336- GELOGW("[InvalidVersion] Format of required_opp_abi_version [%s] is not invalid", version.c_str());337+ GELOGW("[InvalidVersion] Format of required_opp_abi_version [%s] is invalid", version.c_str());
337 return false;338 return false;
338 }339 }
339 (void)required_opp_abi_version.emplace_back(first_num, second_num);340 (void)required_opp_abi_version.emplace_back(first_num, second_num);
340 } else {341 } else {
341 uint32_t tmp_num = 0U;342 uint32_t tmp_num = 0U;
342 if (!GetEffectiveVersion(first, tmp_num)) {343 if (!GetEffectiveVersion(first, tmp_num)) {
343- GELOGW("[InvalidVersion] Format of required_opp_abi_version [%s] is not invalid", version.c_str());344+ GELOGW("[InvalidVersion] Format of required_opp_abi_version [%s] is invalid", version.c_str());
344 return false;345 return false;
345 }346 }
346 (void)required_opp_abi_version.emplace_back(tmp_num, tmp_num);347 (void)required_opp_abi_version.emplace_back(tmp_num, tmp_num);
@@ -431,7 +432,7 @@ bool PluginManager::CheckOppAndCompilerVersions(const std::string &opp_version,
431 return false;432 return false;
432 }433 }
433 if (!IsVersionWithInRequiredRange(effective_opp_version, required_version)) {434 if (!IsVersionWithInRequiredRange(effective_opp_version, required_version)) {
434- GELOGW("opp_version:%s is not with in required_opp_abi_version:%s", opp_version.c_str(),435+ GELOGW("opp_version:%s is not within required_opp_abi_version:%s", opp_version.c_str(),
435 TransRequiredOppAbiVersionToString(required_version).c_str());436 TransRequiredOppAbiVersionToString(required_version).c_str());
436 return false;437 return false;
437 }438 }
@@ -445,7 +446,7 @@ bool PluginManager::CheckOppAndCompilerVersions(const std::string &opp_version,
445 return false;446 return false;
446 }447 }
447 if (!IsVersionWithInRequiredRange(effective_compiler_version, required_version)) {448 if (!IsVersionWithInRequiredRange(effective_compiler_version, required_version)) {
448- GELOGW("compiler version:%s is not with in required_opp_abi_version:%s", opp_version.c_str(),449+ GELOGW("compiler version:%s is not within required_opp_abi_version:%s", opp_version.c_str(),
449 TransRequiredOppAbiVersionToString(required_version).c_str());450 TransRequiredOppAbiVersionToString(required_version).c_str());
450 return false;451 return false;
451 }452 }
@@ -1066,7 +1067,7 @@ void PluginManager::GetCurEnvPackageOsAndCpuType(std::string &host_env_os, std::
1066 } else if (mmAccess2((model_path + kRuntimePath + kScene).c_str(), M_R_OK) == EN_OK) {1067 } else if (mmAccess2((model_path + kRuntimePath + kScene).c_str(), M_R_OK) == EN_OK) {
1067 scene = model_path + kRuntimePath + kScene;1068 scene = model_path + kRuntimePath + kScene;
1068 } else {1069 } else {
1069- GELOGW("opp and runtime not exit");1070+ GELOGW("opp and runtime not exist");
1070 return;1071 return;
1071 }1072 }
1072 GELOGI("extract os and cpu info from %s", scene.c_str());1073 GELOGI("extract os and cpu info from %s", scene.c_str());
@@ -1177,7 +1178,7 @@ void PluginManager::GetFileListWithSuffix(const std::string &path, const std::st
1177 1178 
1178 const INT32 is_dir = mmIsDir(&(resolved_path[0U]));1179 const INT32 is_dir = mmIsDir(&(resolved_path[0U]));
1179 if (is_dir != EN_OK) {1180 if (is_dir != EN_OK) {
1180- GELOGW("[FindSo][Check] Open directory %s failed, maybe it is not exit or not a dir, errmsg:%s",1181+ GELOGW("[FindSo][Check] Open directory %s failed, maybe it does not exist or is not a dir, errmsg:%s",
1181 &(resolved_path[0U]), strerror(errno));1182 &(resolved_path[0U]), strerror(errno));
1182 return;1183 return;
1183 }1184 }
@@ -86,7 +86,7 @@ ge::graphStatus DataDependentInterpreter::IsDataDependentByImplOp(const int32_t
86 bool &is_data_dependent) const {86 bool &is_data_dependent) const {
87 const auto op_impl = GetOpImplFunctionsV2();87 const auto op_impl = GetOpImplFunctionsV2();
88 if (op_impl == nullptr) {88 if (op_impl == nullptr) {
89- GELOGW("The node %s type %s does not registered by `IMPL_OP`", op_desc_->GetNamePtr(), op_desc_->GetType().c_str());89+ GELOGW("The node %s type %s is not registered by `IMPL_OP`", op_desc_->GetNamePtr(), op_desc_->GetType().c_str());
90 is_data_dependent = false;90 is_data_dependent = false;
91 // 这里产生了变更,原有实现中,如果impl找不到,并且1.0标记了任意一个输入为数据依赖,那么整个节点所有输入都会被认为是数据依赖。91 // 这里产生了变更,原有实现中,如果impl找不到,并且1.0标记了任意一个输入为数据依赖,那么整个节点所有输入都会被认为是数据依赖。
92 // 变更后,如果impl找不到,那么仅会返回1.0标记的输入为数据依赖。这个变更影响应该不大,验证过后,本注释可以被删除92 // 变更后,如果impl找不到,那么仅会返回1.0标记的输入为数据依赖。这个变更影响应该不大,验证过后,本注释可以被删除
@@ -115,7 +115,7 @@ ge::graphStatus DataDependentInterpreter::IsTilingInputDataDependent(const int32
115 bool &is_tiling_dependent) const {115 bool &is_tiling_dependent) const {
116 const auto op_impl = GetOpImplFunctionsV2();116 const auto op_impl = GetOpImplFunctionsV2();
117 if (op_impl == nullptr) {117 if (op_impl == nullptr) {
118- GELOGW("The node %s type %s does not registered by `IMPL_OP`", op_desc_->GetNamePtr(), op_desc_->GetType().c_str());118+ GELOGW("The node %s type %s is not registered by `IMPL_OP`", op_desc_->GetNamePtr(), op_desc_->GetType().c_str());
119 is_tiling_dependent = false;119 is_tiling_dependent = false;
120 return ge::GRAPH_SUCCESS;120 return ge::GRAPH_SUCCESS;
121 }121 }
@@ -139,7 +139,7 @@ ge::graphStatus DataDependentInterpreter::IsSupportTilingDependPlacement(const u
139 bool &is_support) const {139 bool &is_support) const {
140 const auto op_impl = GetOpImplFunctionsV2();140 const auto op_impl = GetOpImplFunctionsV2();
141 if (op_impl == nullptr) {141 if (op_impl == nullptr) {
142- GELOGW("The node %s type %s does not registered by `IMPL_OP`", op_desc_->GetNamePtr(), op_desc_->GetType().c_str());142+ GELOGW("The node %s type %s is not registered by `IMPL_OP`", op_desc_->GetNamePtr(), op_desc_->GetType().c_str());
143 is_support = false;143 is_support = false;
144 return ge::GRAPH_SUCCESS;144 return ge::GRAPH_SUCCESS;
145 }145 }
@@ -178,7 +178,7 @@ bool DataDependentInterpreter::GetByIr(bool by_1_0, bool by_2_0, int32_t index_f
178 if (by_1_0) { // by_2_0 is false178 if (by_1_0) { // by_2_0 is false
179 GELOGW(179 GELOGW(
180 "The node %s type %s input index %d is interpreted data-dependent, because there is data dependent attr on the "180 "The node %s type %s input index %d is interpreted data-dependent, because there is data dependent attr on the "
181- "node. But the IMPL_OP does not registered as data-dependent",181+ "node. But the IMPL_OP is not registered as data-dependent",
182 op_desc_->GetNamePtr(), op_desc_->GetTypePtr(), index_for_log);182 op_desc_->GetNamePtr(), op_desc_->GetTypePtr(), index_for_log);
183 }183 }
184 return true;184 return true;
@@ -155,9 +155,8 @@ ge::EdgeSrcEndpoint ConnectFromParents(ge::FastNode *src, int32_t src_index, con
155 }155 }
156 156 
157 if (!full_path) {157 if (!full_path) {
158- GE_LOGE(158+ GE_LOGE("Failed to connect from %s index %d to node %s, the src node is not on the graph or on its parent graphs",
159- "Failed to connect from %s index %d to node %s, the src node does not on the graph or on its parent graphs",159+ src->GetNamePtr(), src_index, dst->GetNamePtr());
160- src->GetNamePtr(), src_index, dst->GetNamePtr());
161 return {nullptr, ge::kInvalidEdgeIndex};160 return {nullptr, ge::kInvalidEdgeIndex};
162 }161 }
163 162 
@@ -206,11 +205,11 @@ HyperStatus AddDependencyBetweenNodes(ge::FastNode *src, ge::FastNode *dst) {
206 auto src_graph = src->GetExtendInfo()->GetOwnerGraphBarePtr();205 auto src_graph = src->GetExtendInfo()->GetOwnerGraphBarePtr();
207 auto dst_graph = dst->GetExtendInfo()->GetOwnerGraphBarePtr();206 auto dst_graph = dst->GetExtendInfo()->GetOwnerGraphBarePtr();
208 if (src_graph != dst_graph) {207 if (src_graph != dst_graph) {
209- return HyperStatus::ErrorStatus("The source node %s(%s) and dst node %s(%s) does not on the same graph",208+ return HyperStatus::ErrorStatus("The source node %s(%s) and dst node %s(%s) are not on the same graph",
210 src->GetNamePtr(), src->GetTypePtr(), dst->GetNamePtr(), dst->GetTypePtr());209 src->GetNamePtr(), src->GetTypePtr(), dst->GetNamePtr(), dst->GetTypePtr());
211 }210 }
212 if (src_graph == nullptr) {211 if (src_graph == nullptr) {
213- return HyperStatus::ErrorStatus("The source node %s(%s) and dst node %s(%s) does not on the graph",212+ return HyperStatus::ErrorStatus("The source node %s(%s) and dst node %s(%s) are not on the graph",
214 src->GetNamePtr(), src->GetTypePtr(), dst->GetNamePtr(), dst->GetTypePtr());213 src->GetNamePtr(), src->GetTypePtr(), dst->GetNamePtr(), dst->GetTypePtr());
215 }214 }
216 if (src_graph->AddEdge(src, ge::kControlEdgeIndex, dst, ge::kControlEdgeIndex) == nullptr) {215 if (src_graph->AddEdge(src, ge::kControlEdgeIndex, dst, ge::kControlEdgeIndex) == nullptr) {
@@ -605,7 +604,7 @@ void ValueHolder::SetPlacement(const int32_t &placement) {
605}604}
606void ValueHolder::ReleaseAfter(const ValueHolderPtr &other) {605void ValueHolder::ReleaseAfter(const ValueHolderPtr &other) {
607 if (guarder_ == nullptr) {606 if (guarder_ == nullptr) {
608- GELOGW("Current holder from node %s index %d does not has a guarder", fast_node_->GetNamePtr(), index_);607+ GELOGW("Current holder from node %s index %d does not have a guarder", fast_node_->GetNamePtr(), index_);
609 return;608 return;
610 }609 }
611 AddDependency(other, guarder_);610 AddDependency(other, guarder_);
@@ -1008,7 +1008,7 @@ std::string AttrUtils::ValueTypeToSerialString(const AnyValue::ValueType value_t
1008 if (it != kAttrTypesMap.end()) {1008 if (it != kAttrTypesMap.end()) {
1009 return it->second;1009 return it->second;
1010 } else {1010 } else {
1011- REPORT_INNER_ERR_MSG("E18888", "value_type not support %d", value_type);1011+ REPORT_INNER_ERR_MSG("E18888", "value_type %d is not supported", value_type);
1012 GELOGE(GRAPH_FAILED, "[Check][Param] value_type not support %d", value_type);1012 GELOGE(GRAPH_FAILED, "[Check][Param] value_type not support %d", value_type);
1013 return "";1013 return "";
1014 }1014 }
@@ -1019,7 +1019,7 @@ AnyValue::ValueType AttrUtils::SerialStringToValueType(const string &value_type_
1019 if (it != kAttrStrTypesMap.end()) {1019 if (it != kAttrStrTypesMap.end()) {
1020 return it->second;1020 return it->second;
1021 } else {1021 } else {
1022- REPORT_INNER_ERR_MSG("E18888", "value_type_string not support %s", value_type_string.c_str());1022+ REPORT_INNER_ERR_MSG("E18888", "value_type_string %s is not supported", value_type_string.c_str());
1023 GELOGE(GRAPH_FAILED, "[Check][Param] value_type_string not support %s", value_type_string.c_str());1023 GELOGE(GRAPH_FAILED, "[Check][Param] value_type_string not support %s", value_type_string.c_str());
1024 return AnyValue::VT_NONE;1024 return AnyValue::VT_NONE;
1025 }1025 }
@@ -219,7 +219,7 @@ ge::Expression ShapeEnvAttr::FindReplacements(const ge::Expression &expr) {
219 return expr;219 return expr;
220 }220 }
221 if (iter->second.has_replace) {221 if (iter->second.has_replace) {
222- GELOGD("Find replace expr: %s of expr: %s has replace", iter->second.replace_expr.Str().get(), expr.Str().get());222+ GELOGD("Found replacement expr: %s for expr: %s", iter->second.replace_expr.Str().get(), expr.Str().get());
223 return expr;223 return expr;
224 }224 }
225 auto replace_expr = iter->second.replace_expr;225 auto replace_expr = iter->second.replace_expr;
@@ -743,7 +743,7 @@ ExpressionImplPtr Rational(const ExpressionImplPtr &a, const ExpressionImplPtr &
743 auto impl = ExpressionImpl::CreateExpressionImpl<const SymEngineExprPtr &>(sym_expr);743 auto impl = ExpressionImpl::CreateExpressionImpl<const SymEngineExprPtr &>(sym_expr);
744 return impl;744 return impl;
745 } else {745 } else {
746- std::cerr << "unsupported rational expr" << std::endl;746+ GELOGE(ge::PARAM_INVALID, "unsupported rational expr");
747 return nullptr;747 return nullptr;
748 }748 }
749}749}
@@ -85,7 +85,7 @@ Expression Rational(int32_t num, int32_t den) {
85 85 
86Expression Align(const Expression &arg, uint32_t alignment) {86Expression Align(const Expression &arg, uint32_t alignment) {
87 if (alignment == 0U) {87 if (alignment == 0U) {
88- GELOGE(FAILED, "Alignment should more than 0");88+ GELOGE(FAILED, "Alignment should be more than 0");
89 return Expression(nullptr);89 return Expression(nullptr);
90 }90 }
91 auto align = Symbol(alignment);91 auto align = Symbol(alignment);
@@ -94,7 +94,7 @@ Expression Align(const Expression &arg, uint32_t alignment) {
94 94 
95Expression AlignWithPositiveInteger(const Expression &arg, uint32_t alignment) {95Expression AlignWithPositiveInteger(const Expression &arg, uint32_t alignment) {
96 if (alignment == 0U) {96 if (alignment == 0U) {
97- GELOGE(FAILED, "Alignment should more than 0");97+ GELOGE(FAILED, "Alignment should be more than 0");
98 return Expression(nullptr);98 return Expression(nullptr);
99 }99 }
100 auto align = Symbol(alignment);100 auto align = Symbol(alignment);
@@ -590,7 +590,7 @@ graphStatus ExecuteGraph::CollectBreadthOutNode(const FastNode *const node,
590 590 
591graphStatus ExecuteGraph::BFSTopologicalSorting(std::vector<FastNode *> &node_vec, const bool reverse,591graphStatus ExecuteGraph::BFSTopologicalSorting(std::vector<FastNode *> &node_vec, const bool reverse,
592 const ExecuteGraph *const compute_graph) const {592 const ExecuteGraph *const compute_graph) const {
593- GELOGD("Runing_Bfs_Sort: %s", GetName().c_str());593+ GELOGD("Running_Bfs_Sort: %s", GetName().c_str());
594 (void)reverse;594 (void)reverse;
595 const bool is_mem_priority = IsMemoryPriority();595 const bool is_mem_priority = IsMemoryPriority();
596 std::vector<NodeStatus> reverse_dfs_nodes_info;596 std::vector<NodeStatus> reverse_dfs_nodes_info;
@@ -628,7 +628,7 @@ graphStatus ExecuteGraph::BFSTopologicalSorting(std::vector<FastNode *> &node_ve
628 628 
629graphStatus ExecuteGraph::DFSTopologicalSorting(std::vector<FastNode *> &node_vec, const bool reverse,629graphStatus ExecuteGraph::DFSTopologicalSorting(std::vector<FastNode *> &node_vec, const bool reverse,
630 const ExecuteGraph *const compute_graph) const {630 const ExecuteGraph *const compute_graph) const {
631- GELOGD("Runing_Dfs_Sort: %s", GetName().c_str());631+ GELOGD("Running_Dfs_Sort: %s", GetName().c_str());
632 std::vector<FastNode *> stack;632 std::vector<FastNode *> stack;
633 std::map<FastNode *, uint32_t> map_in_edge_num;633 std::map<FastNode *, uint32_t> map_in_edge_num;
634 // Record the number of non data nodes but no input nodes634 // Record the number of non data nodes but no input nodes
@@ -703,7 +703,7 @@ void ExecuteGraph::GetInNodes(const FastNode *const current, std::vector<FastNod
703graphStatus ExecuteGraph::RDFSTopologicalSorting(std::vector<FastNode *> &node_vec, const bool reverse,703graphStatus ExecuteGraph::RDFSTopologicalSorting(std::vector<FastNode *> &node_vec, const bool reverse,
704 const ExecuteGraph *const compute_graph) const {704 const ExecuteGraph *const compute_graph) const {
705 (void)reverse;705 (void)reverse;
706- GELOGD("Runing_Reverse_Dfs_Sort: %s", GetName().c_str());706+ GELOGD("Running_Reverse_Dfs_Sort: %s", GetName().c_str());
707 std::vector<NodeStatus> reverse_dfs_nodes_info;707 std::vector<NodeStatus> reverse_dfs_nodes_info;
708 InitNodeStatus(compute_graph, reverse_dfs_nodes_info);708 InitNodeStatus(compute_graph, reverse_dfs_nodes_info);
709 709 
@@ -763,13 +763,13 @@ graphStatus ExecuteGraph::TopologicalSortingGraph(const ExecuteGraph *const exec
763 for (auto &node : node_vec) {763 for (auto &node : node_vec) {
764 (void)itered_nodes_set.insert(node);764 (void)itered_nodes_set.insert(node);
765 }765 }
766- REPORT_INNER_ERR_MSG("E18888", "Failed to do topo sorting total %zu, itered %zu, exist closed loop in graph:%s",766+ REPORT_INNER_ERR_MSG("E18888", "Failed to do topo sorting total %zu, iterated %zu, exist closed loop in graph:%s",
767 GetDirectNodesSize(), node_vec.size(), GetName().c_str());767 GetDirectNodesSize(), node_vec.size(), GetName().c_str());
768- GELOGW("[Check][Param] Failed to do topo sorting total %zu, itered %zu, exist closed loop in graph.",768+ GELOGW("[Check][Param] Failed to do topo sorting total %zu, iterated %zu, exist closed loop in graph.",
769 GetDirectNodesSize(), node_vec.size());769 GetDirectNodesSize(), node_vec.size());
770 for (auto node : graph_shared_->GetDirectNodeToModify()) {770 for (auto node : graph_shared_->GetDirectNodeToModify()) {
771 if (itered_nodes_set.count(&FastGraphUtils::GetNode(node)) == 0UL) {771 if (itered_nodes_set.count(&FastGraphUtils::GetNode(node)) == 0UL) {
772- GELOGW("[Check][Param] The node %s does not itered when topological sorting",772+ GELOGW("[Check][Param] The node %s is not iterated when topological sorting",
773 FastGraphUtils::GetNode(node).GetName().c_str());773 FastGraphUtils::GetNode(node).GetName().c_str());
774 }774 }
775 }775 }
@@ -1411,7 +1411,7 @@ graphStatus ComputeGraphImpl::UpdateOutputMapping(const std::map<uint32_t, uint3
1411 }1411 }
1412 const auto op_desc = net_output->GetOpDescBarePtr();1412 const auto op_desc = net_output->GetOpDescBarePtr();
1413 if (op_desc == nullptr) {1413 if (op_desc == nullptr) {
1414- REPORT_INNER_ERR_MSG("E18888", "net output's op desc pr should not be null.");1414+ REPORT_INNER_ERR_MSG("E18888", "net output's op desc ptr should not be null.");
1415 GE_LOGE("[Get][OpDesc] UpdateOutputMapping failed: op_desc is NULL.");1415 GE_LOGE("[Get][OpDesc] UpdateOutputMapping failed: op_desc is NULL.");
1416 return GRAPH_FAILED;1416 return GRAPH_FAILED;
1417 }1417 }
@@ -1501,7 +1501,7 @@ graphStatus ComputeGraphImpl::InsertGraphEvents(const ConstComputeGraphPtr &comp
1501 1501 
1502graphStatus ComputeGraphImpl::DFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,1502graphStatus ComputeGraphImpl::DFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,
1503 const ConstComputeGraphPtr &compute_graph) const {1503 const ConstComputeGraphPtr &compute_graph) const {
1504- GELOGI("Runing_Dfs_Sort, reverse: %d, graph: %s", reverse, name_.c_str());1504+ GELOGI("Running_Dfs_Sort, reverse: %d, graph: %s", reverse, name_.c_str());
1505 std::vector<NodePtr> stack;1505 std::vector<NodePtr> stack;
1506 std::map<NodePtr, uint32_t> map_in_edge_num;1506 std::map<NodePtr, uint32_t> map_in_edge_num;
1507 // Record the number of non data nodes but no input nodes1507 // Record the number of non data nodes but no input nodes
@@ -1559,7 +1559,7 @@ graphStatus ComputeGraphImpl::DFSTopologicalSorting(std::vector<NodePtr> &node_v
1559graphStatus ComputeGraphImpl::StableRDFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,1559graphStatus ComputeGraphImpl::StableRDFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,
1560 const ConstComputeGraphPtr &compute_graph) const {1560 const ConstComputeGraphPtr &compute_graph) const {
1561 (void)reverse;1561 (void)reverse;
1562- GELOGI("Runing_Stable_Reverse_Dfs_Sort: %s", name_.c_str());1562+ GELOGI("Running_Stable_Reverse_Dfs_Sort: %s", name_.c_str());
1563 std::vector<NodeStatus> nodes_info;1563 std::vector<NodeStatus> nodes_info;
1564 InitNodeStatus(compute_graph, nodes_info);1564 InitNodeStatus(compute_graph, nodes_info);
1565 1565 
@@ -1618,7 +1618,7 @@ graphStatus ComputeGraphImpl::StableRDFSTopologicalSorting(std::vector<NodePtr>
1618graphStatus ComputeGraphImpl::RDFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,1618graphStatus ComputeGraphImpl::RDFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,
1619 const ConstComputeGraphPtr &compute_graph) const {1619 const ConstComputeGraphPtr &compute_graph) const {
1620 (void)reverse;1620 (void)reverse;
1621- GELOGI("Runing_Reverse_Dfs_Sort: %s", name_.c_str());1621+ GELOGI("Running_Reverse_Dfs_Sort: %s", name_.c_str());
1622 std::vector<NodeStatus> nodes_info;1622 std::vector<NodeStatus> nodes_info;
1623 InitNodeStatus(compute_graph, nodes_info);1623 InitNodeStatus(compute_graph, nodes_info);
1624 1624 
@@ -1655,7 +1655,7 @@ graphStatus ComputeGraphImpl::RDFSTopologicalSorting(std::vector<NodePtr> &node_
1655 1655 
1656graphStatus ComputeGraphImpl::BFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,1656graphStatus ComputeGraphImpl::BFSTopologicalSorting(std::vector<NodePtr> &node_vec, const bool reverse,
1657 const ConstComputeGraphPtr &compute_graph) const {1657 const ConstComputeGraphPtr &compute_graph) const {
1658- GELOGI("Runing_Bfs_Sort: %s", name_.c_str());1658+ GELOGI("Running_Bfs_Sort: %s", name_.c_str());
1659 (void)reverse;1659 (void)reverse;
1660 const bool is_mem_priority = IsMemoryPriority();1660 const bool is_mem_priority = IsMemoryPriority();
1661 std::vector<NodeStatus> nodes_info;1661 std::vector<NodeStatus> nodes_info;
@@ -1707,7 +1707,7 @@ void ComputeGraphImpl::SetGraphTargetNodesInfo(const std::vector<ge::NodePtr> &t
1707 targets_.clear();1707 targets_.clear();
1708 for (auto &node : target_nodes_info_) {1708 for (auto &node : target_nodes_info_) {
1709 if (node == nullptr) {1709 if (node == nullptr) {
1710- GELOGW("User pointed targets contains null node.ignore it !");1710+ GELOGW("User pointed targets contains null node, ignore it!");
1711 continue;1711 continue;
1712 }1712 }
1713 targets_.insert(node);1713 targets_.insert(node);
@@ -2334,13 +2334,13 @@ graphStatus ComputeGraphImpl::DoTopologicalSorting(const ConstComputeGraphPtr &c
2334 for (auto &node : node_vec) {2334 for (auto &node : node_vec) {
2335 (void)itered_nodes_set.insert(node.get());2335 (void)itered_nodes_set.insert(node.get());
2336 }2336 }
2337- REPORT_INNER_ERR_MSG("E18888", "Failed to do topo sorting total %zu, itered %zu, exist closed loop in graph:%s",2337+ REPORT_INNER_ERR_MSG("E18888", "Failed to do topo sorting total %zu, iterated %zu, exist closed loop in graph:%s",
2338 GetDirectNodesSize(), node_vec.size(), name_.c_str());2338 GetDirectNodesSize(), node_vec.size(), name_.c_str());
2339- GELOGW("[Check][Param] Failed to do topo sorting total %zu, itered %zu, exist closed loop in graph.",2339+ GELOGW("[Check][Param] Failed to do topo sorting total %zu, iterated %zu, exist closed loop in graph.",
2340 GetDirectNodesSize(), node_vec.size());2340 GetDirectNodesSize(), node_vec.size());
2341 for (auto &node : nodes_) {2341 for (auto &node : nodes_) {
2342 if (itered_nodes_set.count(node.get()) == 0UL) {2342 if (itered_nodes_set.count(node.get()) == 0UL) {
2343- GELOGW("[Check][Param] The node %s does not itered when topological sorting", node->GetName().c_str());2343+ GELOGW("[Check][Param] The node %s was not iterated when topological sorting", node->GetName().c_str());
2344 }2344 }
2345 }2345 }
2346 return GRAPH_FAILED;2346 return GRAPH_FAILED;
@@ -323,9 +323,9 @@ class GraphImpl {
323 }323 }
324 res = GraphUtils::RemoveEdge(src_node_ptr->GetOutControlAnchor(), dst_node_ptr->GetInControlAnchor());324 res = GraphUtils::RemoveEdge(src_node_ptr->GetOutControlAnchor(), dst_node_ptr->GetInControlAnchor());
325 if (res != GRAPH_SUCCESS) {325 if (res != GRAPH_SUCCESS) {
326- REPORT_INNER_ERR_MSG("E18888", "remove control edge between [%s] and [%s]failed.",326+ REPORT_INNER_ERR_MSG("E18888", "remove control edge between [%s] and [%s] failed.",
327 src_node_ptr->GetName().c_str(), dst_node_ptr->GetName().c_str());327 src_node_ptr->GetName().c_str(), dst_node_ptr->GetName().c_str());
328- GELOGE(GRAPH_FAILED, "[Remove][ControlEdge] between [%s] and [%s]failed.", src_node_ptr->GetName().c_str(),328+ GELOGE(GRAPH_FAILED, "[Remove][ControlEdge] between [%s] and [%s] failed.", src_node_ptr->GetName().c_str(),
329 dst_node_ptr->GetName().c_str());329 dst_node_ptr->GetName().c_str());
330 return GRAPH_FAILED;330 return GRAPH_FAILED;
331 }331 }
@@ -343,9 +343,9 @@ class GraphImpl {
343 if ((src_port_index != -1) && (dst_port_index == -1)) {343 if ((src_port_index != -1) && (dst_port_index == -1)) {
344 res = GraphUtils::RemoveEdge(src_node_ptr->GetOutDataAnchor(src_port_index), dst_node_ptr->GetInControlAnchor());344 res = GraphUtils::RemoveEdge(src_node_ptr->GetOutDataAnchor(src_port_index), dst_node_ptr->GetInControlAnchor());
345 if (res != GRAPH_SUCCESS) {345 if (res != GRAPH_SUCCESS) {
346- REPORT_INNER_ERR_MSG("E18888", "remove data-control edge between [%s] and [%s]failed.",346+ REPORT_INNER_ERR_MSG("E18888", "remove data-control edge between [%s] and [%s] failed.",
347 src_node_ptr->GetName().c_str(), dst_node_ptr->GetName().c_str());347 src_node_ptr->GetName().c_str(), dst_node_ptr->GetName().c_str());
348- GELOGE(GRAPH_FAILED, "[Remove][Edge] between [%s] and [%s]failed.", src_node_ptr->GetName().c_str(),348+ GELOGE(GRAPH_FAILED, "[Remove][Edge] between [%s] and [%s] failed.", src_node_ptr->GetName().c_str(),
349 dst_node_ptr->GetName().c_str());349 dst_node_ptr->GetName().c_str());
350 return GRAPH_FAILED;350 return GRAPH_FAILED;
351 }351 }
@@ -1140,7 +1140,7 @@ GNodePtr Graph::FindNodeByName(const AscendString &node_name) const {
1140 return nullptr;1140 return nullptr;
1141 }1141 }
1142 auto node = impl_->GetComputeGraph()->FindNode(node_name.GetString());1142 auto node = impl_->GetComputeGraph()->FindNode(node_name.GetString());
1143- GE_ASSERT_NOTNULL(node, "Node name: %s was not found in the current graph%s.", node_name.GetString(),1143+ GE_ASSERT_NOTNULL(node, "Node name: %s was not found in the current graph: %s.", node_name.GetString(),
1144 impl_->GetName().c_str());1144 impl_->GetName().c_str());
1145 return NodeAdapter::Node2GNodePtr(node);1145 return NodeAdapter::Node2GNodePtr(node);
1146}1146}
@@ -139,11 +139,11 @@ bool Node::NodeImpl::NodeAnchorIsEqual(const AnchorPtr &left_anchor, const Ancho
139 if (anchor_peer_size != right_anchor_peer_size) {139 if (anchor_peer_size != right_anchor_peer_size) {
140 REPORT_INNER_ERR_MSG("E18888",140 REPORT_INNER_ERR_MSG("E18888",
141 "Size of anchor's peer anchors verify failed, node name: %s "141 "Size of anchor's peer anchors verify failed, node name: %s "
142- "anchor_peer_size [%zu] is different form [%zu] at index [%zu].",142+ "anchor_peer_size [%zu] is different from [%zu] at index [%zu].",
143 this->GetName().c_str(), anchor_peer_size, right_anchor_peer_size, i);143 this->GetName().c_str(), anchor_peer_size, right_anchor_peer_size, i);
144 GELOGE(GRAPH_FAILED,144 GELOGE(GRAPH_FAILED,
145 "[Check][Param] Size of anchor's peer anchors verify failed, node name: %s "145 "[Check][Param] Size of anchor's peer anchors verify failed, node name: %s "
146- "anchor_peer_size [%zu] is different form [%zu] at index [%zu].",146+ "anchor_peer_size [%zu] is different from [%zu] at index [%zu].",
147 this->GetName().c_str(), anchor_peer_size, right_anchor_peer_size, i);147 this->GetName().c_str(), anchor_peer_size, right_anchor_peer_size, i);
148 return false;148 return false;
149 }149 }
@@ -163,11 +163,11 @@ bool Node::NodeImpl::NodeAnchorIsEqual(const AnchorPtr &left_anchor, const Ancho
163 // Determine the connection relationship by linking the node's name163 // Determine the connection relationship by linking the node's name
164 if (peer_node->GetName() != r_peer_node->GetName()) {164 if (peer_node->GetName() != r_peer_node->GetName()) {
165 REPORT_INNER_ERR_MSG("E18888",165 REPORT_INNER_ERR_MSG("E18888",
166- "anchor's peer node name verify failed, node name: %s index[%zu]"166+ "anchor's peer node name verify failed, node name: %s index[%zu] "
167 "peer node name %s is different from %s at index [%zu].",167 "peer node name %s is different from %s at index [%zu].",
168 this->GetName().c_str(), i, peer_node->GetName().c_str(), r_peer_node->GetName().c_str(), j);168 this->GetName().c_str(), i, peer_node->GetName().c_str(), r_peer_node->GetName().c_str(), j);
169 GELOGE(GRAPH_FAILED,169 GELOGE(GRAPH_FAILED,
170- "[Check][Param] anchor's peer node name verify failed, node name: %s index[%zu]"170+ "[Check][Param] anchor's peer node name verify failed, node name: %s index[%zu] "
171 "peer node name %s is different from %s at index [%zu].",171 "peer node name %s is different from %s at index [%zu].",
172 this->GetName().c_str(), i, peer_node->GetName().c_str(), r_peer_node->GetName().c_str(), j);172 this->GetName().c_str(), i, peer_node->GetName().c_str(), r_peer_node->GetName().c_str(), j);
173 return false;173 return false;
@@ -250,8 +250,8 @@ graphStatus Node::NodeImpl::AddLinkFrom(const uint32_t &index, const ge::Node::N
250 in_data_anchors_.push_back(anchor);250 in_data_anchors_.push_back(anchor);
251 (void)out_anchors.at(input_node_index)->LinkTo(in_data_anchors_.back());251 (void)out_anchors.at(input_node_index)->LinkTo(in_data_anchors_.back());
252 } else {252 } else {
253- REPORT_INNER_ERR_MSG("E18888", "index %u is over than in data anchors size %zu.", index, in_data_anchors_.size());253+ REPORT_INNER_ERR_MSG("E18888", "index %u exceeds in data anchors size %zu.", index, in_data_anchors_.size());
254- GELOGE(GRAPH_FAILED, "index %u is over than in data anchors size %zu.", index, in_data_anchors_.size());254+ GELOGE(GRAPH_FAILED, "index %u exceeds in data anchors size %zu.", index, in_data_anchors_.size());
255 return GRAPH_PARAM_INVALID;255 return GRAPH_PARAM_INVALID;
256 }256 }
257 257 
@@ -315,7 +315,7 @@ graphStatus OpDescImpl::AddInputDesc(const uint32_t index, const ge::GeTensorDes
315 315 
316graphStatus OpDescImpl::AddInputDesc(const std::string &name, const ge::GeTensorDesc &input_desc) {316graphStatus OpDescImpl::AddInputDesc(const std::string &name, const ge::GeTensorDesc &input_desc) {
317 if (input_name_idx_.find(name) != input_name_idx_.end()) {317 if (input_name_idx_.find(name) != input_name_idx_.end()) {
318- GELOGI("input %s is exist, update it", name.c_str());318+ GELOGI("input %s already exists, update it", name.c_str());
319 const graphStatus ret = UpdateInputDesc(name, input_desc);319 const graphStatus ret = UpdateInputDesc(name, input_desc);
320 return ret;320 return ret;
321 } else {321 } else {
@@ -1103,7 +1103,7 @@ graphStatus OpDescImpl::DefaultInferFormat(const ConstOpDescPtr &op_desc) const
1103 }1103 }
1104 }1104 }
1105 // Refresh all input output format1105 // Refresh all input output format
1106- GELOGD("Default infer format.node[%s], first none nod format is:%d", GetName().c_str(), first_none_nd_format);1106+ GELOGD("Default infer format.node[%s], first none ND format is:%d", GetName().c_str(), first_none_nd_format);
1107 1107 
1108 for (const auto &input_desc : input_descs) {1108 for (const auto &input_desc : input_descs) {
1109 const Format origin_format = input_desc->GetOriginFormat();1109 const Format origin_format = input_desc->GetOriginFormat();
@@ -2808,7 +2808,7 @@ Graph Operator::GetSubgraphImpl(const char_t *name) const {
2808 }2808 }
2809 const auto root_graph = GraphUtils::FindRootGraph(node->GetOwnerComputeGraph());2809 const auto root_graph = GraphUtils::FindRootGraph(node->GetOwnerComputeGraph());
2810 if (root_graph == nullptr) {2810 if (root_graph == nullptr) {
2811- REPORT_INNER_ERR_MSG("E18888", "Failed to get subgraph %s, because cannot find the root graph,node:%s", name,2811+ REPORT_INNER_ERR_MSG("E18888", "Failed to get subgraph %s, because cannot find the root graph, node:%s", name,
2812 node->GetName().c_str());2812 node->GetName().c_str());
2813 GE_LOGE("[Get][Subgraph] subgraph %s failed, because cannot find the root graph", name);2813 GE_LOGE("[Get][Subgraph] subgraph %s failed, because cannot find the root graph", name);
2814 return GraphUtilsEx::CreateGraph();2814 return GraphUtilsEx::CreateGraph();
@@ -2979,7 +2979,7 @@ class GraphBuilderImpl {
2979 GE_CHK_BOOL_EXEC(op_impl != nullptr, REPORT_INNER_ERR_MSG("E18888", "op_impl is nullptr, check invalid.");2979 GE_CHK_BOOL_EXEC(op_impl != nullptr, REPORT_INNER_ERR_MSG("E18888", "op_impl is nullptr, check invalid.");
2980 return GRAPH_FAILED, "[Check][Param] Operator Impl is null.");2980 return GRAPH_FAILED, "[Check][Param] Operator Impl is null.");
2981 if (all_nodes_info_.find(op_impl) != all_nodes_info_.cend()) {2981 if (all_nodes_info_.find(op_impl) != all_nodes_info_.cend()) {
2982- GELOGI("This node %s has created.", op_impl->GetName().c_str());2982+ GELOGI("Node %s has been created.", op_impl->GetName().c_str());
2983 continue;2983 continue;
2984 }2984 }
2985 auto node_ptr = graph_->AddNode(op_impl->op_desc_);2985 auto node_ptr = graph_->AddNode(op_impl->op_desc_);
@@ -469,7 +469,7 @@ graphStatus FormatRefiner::DataNodeFormatProcess(const ComputeGraphPtr &graph,
469}469}
470 470 
471graphStatus FormatRefiner::InferOrigineFormat(const ge::ComputeGraphPtr &graph) {471graphStatus FormatRefiner::InferOrigineFormat(const ge::ComputeGraphPtr &graph) {
472- GELOGI("Enter InferOrigineFormat process!");472+ GELOGI("Enter InferOriginFormat process!");
473 473 
474 // True: inferred false:no-inferred474 // True: inferred false:no-inferred
475 std::vector<ge::NodePtr> anchor_points;475 std::vector<ge::NodePtr> anchor_points;
@@ -293,8 +293,8 @@ graphStatus RefRelations::Impl::ProcessSubgraphDataNodes(std::vector<NodePtr> &g
293 bool is_exist = true;293 bool is_exist = true;
294 is_exist = AttrUtils::GetInt(e->GetOpDesc(), kRefIdx, i);294 is_exist = AttrUtils::GetInt(e->GetOpDesc(), kRefIdx, i);
295 if (!is_exist) {295 if (!is_exist) {
296- REPORT_INNER_ERR_MSG("E18888", "Invalid SubGraph NetOutput node[%s].no attr %s", e->GetName().c_str(), kRefIdx);296+ REPORT_INNER_ERR_MSG("E18888", "Invalid SubGraph NetOutput node[%s]. no attr %s", e->GetName().c_str(), kRefIdx);
297- GELOGE(GRAPH_FAILED, "[Get][Int] Invalid SubGraph NetOutput node[%s].no attr %s", e->GetName().c_str(), kRefIdx);297+ GELOGE(GRAPH_FAILED, "[Get][Int] Invalid SubGraph NetOutput node[%s]. no attr %s", e->GetName().c_str(), kRefIdx);
298 return GRAPH_FAILED;298 return GRAPH_FAILED;
299 }299 }
300 max_ref_idx = (i > max_ref_idx) ? i : max_ref_idx;300 max_ref_idx = (i > max_ref_idx) ? i : max_ref_idx;
@@ -219,8 +219,8 @@ graphStatus UpdateSubGraphDataNodes(const ConstNodePtr &node) {
219 for (const auto &name : sub_graph_names) {219 for (const auto &name : sub_graph_names) {
220 const auto sub_graph = root_graph->GetSubgraph(name);220 const auto sub_graph = root_graph->GetSubgraph(name);
221 if (sub_graph == nullptr) {221 if (sub_graph == nullptr) {
222- REPORT_INNER_ERR_MSG("E18888", "Cannot find the subgrpah %s for node %s", name.c_str(), node->GetName().c_str());222+ REPORT_INNER_ERR_MSG("E18888", "Cannot find the subgraph %s for node %s", name.c_str(), node->GetName().c_str());
223- GE_LOGE("[Get][Graph] cannot find the subgrpah %s for node %s", name.c_str(), node->GetName().c_str());223+ GE_LOGE("[Get][Graph] cannot find the subgraph %s for node %s", name.c_str(), node->GetName().c_str());
224 return GRAPH_FAILED;224 return GRAPH_FAILED;
225 }225 }
226 for (const auto &node_sub : sub_graph->GetDirectNode()) {226 for (const auto &node_sub : sub_graph->GetDirectNode()) {
@@ -459,7 +459,7 @@ graphStatus UpdateOpInputDesc(const ConstNodePtr &node_ptr) {
459 const auto peer_out_dtype = peer_out_desc->GetDataType();459 const auto peer_out_dtype = peer_out_desc->GetDataType();
460 if (peer_out_dtype != in_dtype) {460 if (peer_out_dtype != in_dtype) {
461 GELOGW(461 GELOGW(
462- "[Update][InputDesc] current node [%s] [%d]\'th in_dtype is [%s].peer output node [%s] [%d]\'th "462+ "[Update][InputDesc] current node [%s] [%d]\'th in_dtype is [%s]. peer output node [%s] [%d]\'th "
463 "output_dtype is [%s]. The two dtype should be same! Please check graph and fix it",463 "output_dtype is [%s]. The two dtype should be same! Please check graph and fix it",
464 node_ptr->GetName().c_str(), in_idx, TypeUtils::DataTypeToSerialString(in_dtype).c_str(),464 node_ptr->GetName().c_str(), in_idx, TypeUtils::DataTypeToSerialString(in_dtype).c_str(),
465 peer_out_data_node->GetName().c_str(), peer_out_idx,465 peer_out_data_node->GetName().c_str(), peer_out_idx,
@@ -468,7 +468,7 @@ graphStatus UpdateOpInputDesc(const ConstNodePtr &node_ptr) {
468 const std::string in_shape_str = Serial(in_shape);468 const std::string in_shape_str = Serial(in_shape);
469 const std::string peer_out_shape_str = Serial(peer_out_shape);469 const std::string peer_out_shape_str = Serial(peer_out_shape);
470 GELOGW(470 GELOGW(
471- "[Update][InputDesc] current node [%s] [%d]\'th in_shape is [%s].peer output node [%s] [%d]\'th "471+ "[Update][InputDesc] current node [%s] [%d]\'th in_shape is [%s]. peer output node [%s] [%d]\'th "
472 "output_shape is [%s]. The two shape should be same! Please check graph and fix it",472 "output_shape is [%s]. The two shape should be same! Please check graph and fix it",
473 node_ptr->GetName().c_str(), in_idx, in_shape_str.c_str(), peer_out_data_node->GetName().c_str(),473 node_ptr->GetName().c_str(), in_idx, in_shape_str.c_str(), peer_out_data_node->GetName().c_str(),
474 peer_out_idx, peer_out_shape_str.c_str());474 peer_out_idx, peer_out_shape_str.c_str());
@@ -1121,7 +1121,7 @@ Buffer ModelSerialize::SerializeModel(const Model &model, const std::string &pat
1121 "but cannot separate in this scenario, you can use external_weight instead");1121 "but cannot separate in this scenario, you can use external_weight instead");
1122 return Buffer();1122 return Buffer();
1123 }1123 }
1124- GELOGW("[Serialize][Model] Model could larger than 2G, need separate");1124+ GELOGW("[Serialize][Model] Model could be larger than 2G, need separate");
1125 if (!model_imp.SeparateModelDef(buffer, path, model_def)) {1125 if (!model_imp.SeparateModelDef(buffer, path, model_def)) {
1126 GELOGW("[Serialize][Model] Serialize to binary failed");1126 GELOGW("[Serialize][Model] Serialize to binary failed");
1127 return Buffer();1127 return Buffer();
@@ -1230,7 +1230,7 @@ bool ModelSerialize::UnserializeModel(ge::proto::ModelDef &model_def, Model &mod
1230bool ModelSerialize::UnserializeModel(ge::proto::ModelDef &model_def, Model &model, const std::string &path) const {1230bool ModelSerialize::UnserializeModel(ge::proto::ModelDef &model_def, Model &model, const std::string &path) const {
1231 const std::shared_ptr<proto::ModelDef> model_def_ptr = ComGraphMakeShared<proto::ModelDef>(model_def);1231 const std::shared_ptr<proto::ModelDef> model_def_ptr = ComGraphMakeShared<proto::ModelDef>(model_def);
1232 GE_CHK_BOOL_EXEC(model_def_ptr != nullptr, REPORT_INNER_ERR_MSG("E18888", "create ModelDef failed.");1232 GE_CHK_BOOL_EXEC(model_def_ptr != nullptr, REPORT_INNER_ERR_MSG("E18888", "create ModelDef failed.");
1233- return false, "[Create][ModelDef] mode_def make shared failed");1233+ return false, "[Create][ModelDef] model_def make shared failed");
1234 1234 
1235 ModelSerializeImp model_imp;1235 ModelSerializeImp model_imp;
1236 model_imp.SetAirModelPath(path);1236 model_imp.SetAirModelPath(path);
@@ -259,7 +259,7 @@ ExpressionType SymDtype::Type() const {
259graphStatus SymDtype::Eval(const OpDesc &op, TypeOrTypes &type_or_types) const {259graphStatus SymDtype::Eval(const OpDesc &op, TypeOrTypes &type_or_types) const {
260 GE_WARN_ASSERT(!is_legacy_, "Trying eval legacy sym dtype %s", id_.c_str());260 GE_WARN_ASSERT(!is_legacy_, "Trying eval legacy sym dtype %s", id_.c_str());
261 if (expression_ != nullptr) {261 if (expression_ != nullptr) {
262- GELOGI("Eval sym dtype from expression of op %s", id_.c_str(), op.GetType().c_str());262+ GELOGI("Eval sym dtype %s from expression of op %s", id_.c_str(), op.GetType().c_str());
263 return expression_->Eval(op, type_or_types);263 return expression_->Eval(op, type_or_types);
264 }264 }
265 265 
@@ -293,13 +293,13 @@ ExecuteGraphUtils::InsertNodeAfter(const EdgeSrcEndpoint &src, const std::vector
293 const auto src_node = src.node;293 const auto src_node = src.node;
294 GE_ASSERT_NOTNULL(src_node);294 GE_ASSERT_NOTNULL(src_node);
295 const auto src_extend_info = src_node->GetExtendInfo();295 const auto src_extend_info = src_node->GetExtendInfo();
296- GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:% is null", src_node->GetNamePtr());296+ GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:%s is null", src_node->GetNamePtr());
297 const auto graph = src_extend_info->GetOwnerGraphBarePtr();297 const auto graph = src_extend_info->GetOwnerGraphBarePtr();
298- GE_ASSERT_NOTNULL(graph, "The own graph of src node:% is null", src_node->GetNamePtr());298+ GE_ASSERT_NOTNULL(graph, "The own graph of src node:%s is null", src_node->GetNamePtr());
299- GE_ASSERT_NOTNULL(insert_node->GetExtendInfo(), "The extend info of insert node:% is null",299+ GE_ASSERT_NOTNULL(insert_node->GetExtendInfo(), "The extend info of insert node:%s is null",
300 insert_node->GetNamePtr());300 insert_node->GetNamePtr());
301 GE_ASSERT_TRUE(graph == insert_node->GetExtendInfo()->GetOwnerGraphBarePtr(),301 GE_ASSERT_TRUE(graph == insert_node->GetExtendInfo()->GetOwnerGraphBarePtr(),
302- "rc:%s and insert_node:%s does not exist in the same graph.", src_node->GetNamePtr(),302+ "src:%s and insert_node:%s does not exist in the same graph.", src_node->GetNamePtr(),
303 insert_node->GetNamePtr());303 insert_node->GetNamePtr());
304 304 
305 const auto src_index = src.index;305 const auto src_index = src.index;
@@ -310,7 +310,7 @@ ExecuteGraphUtils::InsertNodeAfter(const EdgeSrcEndpoint &src, const std::vector
310 GE_ASSERT_NOTNULL(dst_node);310 GE_ASSERT_NOTNULL(dst_node);
311 const auto dst_index = dst.index;311 const auto dst_index = dst.index;
312 const auto dst_extend_info = dst_node->GetExtendInfo();312 const auto dst_extend_info = dst_node->GetExtendInfo();
313- GE_ASSERT_NOTNULL(dst_extend_info, "The extend info of src node:% is null", dst_node->GetNamePtr());313+ GE_ASSERT_NOTNULL(dst_extend_info, "The extend info of src node:%s is null", dst_node->GetNamePtr());
314 GE_ASSERT_TRUE(graph == dst_extend_info->GetOwnerGraphBarePtr(),314 GE_ASSERT_TRUE(graph == dst_extend_info->GetOwnerGraphBarePtr(),
315 "[Check][Param] dst:%s and insert_node:%s does not exist in the same graph.", dst_node->GetNamePtr(),315 "[Check][Param] dst:%s and insert_node:%s does not exist in the same graph.", dst_node->GetNamePtr(),
316 insert_node->GetNamePtr());316 insert_node->GetNamePtr());
@@ -341,10 +341,10 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::In
341 const auto dst_node = dst.node;341 const auto dst_node = dst.node;
342 GE_ASSERT_NOTNULL(dst_node);342 GE_ASSERT_NOTNULL(dst_node);
343 const auto dst_extend_info = dst_node->GetExtendInfo();343 const auto dst_extend_info = dst_node->GetExtendInfo();
344- GE_ASSERT_NOTNULL(dst_extend_info, "The extend info of src node:% is null", dst_node->GetNamePtr());344+ GE_ASSERT_NOTNULL(dst_extend_info, "The extend info of src node:%s is null", dst_node->GetNamePtr());
345 const auto graph = dst_extend_info->GetOwnerGraphBarePtr();345 const auto graph = dst_extend_info->GetOwnerGraphBarePtr();
346- GE_ASSERT_NOTNULL(graph, "The own graph of src node:% is null", dst_node->GetNamePtr());346+ GE_ASSERT_NOTNULL(graph, "The own graph of src node:%s is null", dst_node->GetNamePtr());
347- GE_ASSERT_NOTNULL(insert_node->GetExtendInfo(), "The extend info of insert node:% is null",347+ GE_ASSERT_NOTNULL(insert_node->GetExtendInfo(), "The extend info of insert node:%s is null",
348 insert_node->GetNamePtr());348 insert_node->GetNamePtr());
349 GE_ASSERT_TRUE(graph == insert_node->GetExtendInfo()->GetOwnerGraphBarePtr(),349 GE_ASSERT_TRUE(graph == insert_node->GetExtendInfo()->GetOwnerGraphBarePtr(),
350 "[Check][Param] src:%s and insert_node:%s does not exist in the same graph.", dst_node->GetNamePtr(),350 "[Check][Param] src:%s and insert_node:%s does not exist in the same graph.", dst_node->GetNamePtr(),
@@ -393,7 +393,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::Co
393 }393 }
394 394 
395 const auto src_extend_info = src_node->GetExtendInfo();395 const auto src_extend_info = src_node->GetExtendInfo();
396- GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:% is null", src_node->GetNamePtr());396+ GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:%s is null", src_node->GetNamePtr());
397 const auto graph = src_extend_info->GetOwnerGraphBarePtr();397 const auto graph = src_extend_info->GetOwnerGraphBarePtr();
398 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());398 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());
399 for (const auto in_node : src_ctrl_in_nodes) {399 for (const auto in_node : src_ctrl_in_nodes) {
@@ -413,7 +413,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::Mo
413 src_node->GetNamePtr(), dst_node->GetNamePtr());413 src_node->GetNamePtr(), dst_node->GetNamePtr());
414 414 
415 const auto src_extend_info = src_node->GetExtendInfo();415 const auto src_extend_info = src_node->GetExtendInfo();
416- GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:% is null", src_node->GetNamePtr());416+ GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:%s is null", src_node->GetNamePtr());
417 const auto graph = src_extend_info->GetOwnerGraphBarePtr();417 const auto graph = src_extend_info->GetOwnerGraphBarePtr();
418 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());418 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());
419 for (const auto src_in_ctrl_edge : src_node->GetAllInControlEdgesRef()) {419 for (const auto src_in_ctrl_edge : src_node->GetAllInControlEdgesRef()) {
@@ -442,7 +442,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::Co
442 }442 }
443 443 
444 const auto src_extend_info = src_node->GetExtendInfo();444 const auto src_extend_info = src_node->GetExtendInfo();
445- GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:% is null", src_node->GetNamePtr());445+ GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:%s is null", src_node->GetNamePtr());
446 const auto graph = src_extend_info->GetOwnerGraphBarePtr();446 const auto graph = src_extend_info->GetOwnerGraphBarePtr();
447 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());447 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());
448 for (const auto out_node : out_ctrl_nodes) {448 for (const auto out_node : out_ctrl_nodes) {
@@ -462,7 +462,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::Mo
462 src_node->GetNamePtr(), dst_node->GetNamePtr());462 src_node->GetNamePtr(), dst_node->GetNamePtr());
463 463 
464 const auto src_extend_info = src_node->GetExtendInfo();464 const auto src_extend_info = src_node->GetExtendInfo();
465- GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:% is null", src_node->GetNamePtr());465+ GE_ASSERT_NOTNULL(src_extend_info, "The extend info of src node:%s is null", src_node->GetNamePtr());
466 const auto graph = src_extend_info->GetOwnerGraphBarePtr();466 const auto graph = src_extend_info->GetOwnerGraphBarePtr();
467 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());467 GE_ASSERT_NOTNULL(graph, "The graph of src node:% is null", src_node->GetNamePtr());
468 for (const auto src_out_ctrl_edge : src_node->GetAllOutControlEdgesRef()) {468 for (const auto src_out_ctrl_edge : src_node->GetAllOutControlEdgesRef()) {
@@ -477,7 +477,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::Mo
477GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::MoveNodeToGraph(FastNode *node,477GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus ExecuteGraphUtils::MoveNodeToGraph(FastNode *node,
478 ExecuteGraph *dst_graph) {478 ExecuteGraph *dst_graph) {
479 GE_ASSERT_GRAPH_SUCCESS(IsolateNode(node, {}));479 GE_ASSERT_GRAPH_SUCCESS(IsolateNode(node, {}));
480- GE_ASSERT_NOTNULL(node->GetExtendInfo(), "EntendInfo of node %s is null.", node->GetNamePtr());480+ GE_ASSERT_NOTNULL(node->GetExtendInfo(), "ExtendInfo of node %s is null.", node->GetNamePtr());
481 GE_ASSERT_GRAPH_SUCCESS(RemoveNodeWithoutRelink(node->GetExtendInfo()->GetOwnerGraphBarePtr(), node));481 GE_ASSERT_GRAPH_SUCCESS(RemoveNodeWithoutRelink(node->GetExtendInfo()->GetOwnerGraphBarePtr(), node));
482 GE_ASSERT_NOTNULL(dst_graph->AddNode(node));482 GE_ASSERT_NOTNULL(dst_graph->AddNode(node));
483 GE_ASSERT_GRAPH_SUCCESS(node->GetExtendInfo()->SetOwnerGraph(dst_graph, node));483 GE_ASSERT_GRAPH_SUCCESS(node->GetExtendInfo()->SetOwnerGraph(dst_graph, node));
@@ -532,8 +532,8 @@ ExecuteGraphUtils::ReplaceNodeEdges(FastNode *new_node, FastNode *old_node, cons
532 GE_ASSERT_NOTNULL(old_node->GetExtendInfo());532 GE_ASSERT_NOTNULL(old_node->GetExtendInfo());
533 GE_ASSERT_TRUE(graph == old_node->GetExtendInfo()->GetOwnerGraphBarePtr());533 GE_ASSERT_TRUE(graph == old_node->GetExtendInfo()->GetOwnerGraphBarePtr());
534 GE_ASSERT_GRAPH_SUCCESS(ReplaceNodeDataEdges(new_node, old_node, inputs_map, outputs_map, graph),534 GE_ASSERT_GRAPH_SUCCESS(ReplaceNodeDataEdges(new_node, old_node, inputs_map, outputs_map, graph),
535- "Replace data edgs from %s to %s failed.", old_node->GetNamePtr(), new_node->GetNamePtr());535+ "Replace data edges from %s to %s failed.", old_node->GetNamePtr(), new_node->GetNamePtr());
536- GE_ASSERT_GRAPH_SUCCESS(ReplaceControlEdges(new_node, old_node, graph), "Replace control edgs from %s to %s failed.",536+ GE_ASSERT_GRAPH_SUCCESS(ReplaceControlEdges(new_node, old_node, graph), "Replace control edges from %s to %s failed.",
537 old_node->GetNamePtr(), new_node->GetNamePtr());537 old_node->GetNamePtr(), new_node->GetNamePtr());
538 return GRAPH_SUCCESS;538 return GRAPH_SUCCESS;
539}539}
@@ -588,7 +588,7 @@ ExecuteGraphUtils::RemoveSubgraphRecursively(ExecuteGraph *execute_graph, FastNo
588 const auto remove_extend_info = remove_node->GetExtendInfo();588 const auto remove_extend_info = remove_node->GetExtendInfo();
589 GE_ASSERT_NOTNULL(remove_extend_info);589 GE_ASSERT_NOTNULL(remove_extend_info);
590 if (remove_extend_info->GetOwnerGraphBarePtr() == nullptr) {590 if (remove_extend_info->GetOwnerGraphBarePtr() == nullptr) {
591- GELOGW("Node %s has a owner graph with null value.", remove_node->GetNamePtr());591+ GELOGW("Node %s has an owner graph with null value.", remove_node->GetNamePtr());
592 return GRAPH_SUCCESS;592 return GRAPH_SUCCESS;
593 }593 }
594 594 
@@ -37,7 +37,7 @@ FastNode *FastNodeUtils::GetParentInput(const FastNode *const node) {
37 }37 }
38 38 
39 // Subgraph Data Node, check for constant input.39 // Subgraph Data Node, check for constant input.
40- GE_ASSERT_NOTNULL(node->GetExtendInfo(), "EntendInfo of node %s is null.", node->GetNamePtr());40+ GE_ASSERT_NOTNULL(node->GetExtendInfo(), "ExtendInfo of node %s is null.", node->GetNamePtr());
41 const auto graph = node->GetExtendInfo()->GetOwnerGraphBarePtr();41 const auto graph = node->GetExtendInfo()->GetOwnerGraphBarePtr();
42 GE_ASSERT_NOTNULL(graph);42 GE_ASSERT_NOTNULL(graph);
43 43 
@@ -100,7 +100,7 @@ ExecuteGraph *FastNodeUtils::GetSubgraphFromNode(const FastNode *const node, con
100 const auto op_desc = node->GetOpDescBarePtr();100 const auto op_desc = node->GetOpDescBarePtr();
101 GE_ASSERT_NOTNULL(op_desc);101 GE_ASSERT_NOTNULL(op_desc);
102 102 
103- GE_ASSERT_NOTNULL(node->GetExtendInfo(), "EntendInfo of node %s is null.", node->GetNamePtr());103+ GE_ASSERT_NOTNULL(node->GetExtendInfo(), "ExtendInfo of node %s is null.", node->GetNamePtr());
104 const auto root_graph = ExecuteGraphUtils::FindRootGraph(node->GetExtendInfo()->GetOwnerGraphBarePtr());104 const auto root_graph = ExecuteGraphUtils::FindRootGraph(node->GetExtendInfo()->GetOwnerGraphBarePtr());
105 GE_ASSERT_NOTNULL(root_graph);105 GE_ASSERT_NOTNULL(root_graph);
106 return root_graph->GetSubGraph(op_desc->GetSubgraphInstanceName(index));106 return root_graph->GetSubGraph(op_desc->GetSubgraphInstanceName(index));
@@ -114,7 +114,7 @@ graphStatus FastNodeUtils::MountSubgraphToNode(FastNode *const node, const uint3
114 const auto op_desc = node->GetOpDescBarePtr();114 const auto op_desc = node->GetOpDescBarePtr();
115 GE_ASSERT_NOTNULL(op_desc);115 GE_ASSERT_NOTNULL(op_desc);
116 116 
117- GE_ASSERT_NOTNULL(node->GetExtendInfo(), "EntendInfo of node %s is null.", node->GetNamePtr());117+ GE_ASSERT_NOTNULL(node->GetExtendInfo(), "ExtendInfo of node %s is null.", node->GetNamePtr());
118 const auto root_graph = ExecuteGraphUtils::FindRootGraph(node->GetExtendInfo()->GetOwnerGraphBarePtr());118 const auto root_graph = ExecuteGraphUtils::FindRootGraph(node->GetExtendInfo()->GetOwnerGraphBarePtr());
119 GE_ASSERT_NOTNULL(root_graph, "[Get][Graph] Failed to add subgraph to node %s, null root graph", node->GetNamePtr());119 GE_ASSERT_NOTNULL(root_graph, "[Get][Graph] Failed to add subgraph to node %s, null root graph", node->GetNamePtr());
120 120 
@@ -122,7 +122,7 @@ graphStatus FastNodeUtils::MountSubgraphToNode(FastNode *const node, const uint3
122 GE_CHK_GRAPH_STATUS_RET(ret, "[Set][Name] Failed to set subgraph to node %s index %u", node->GetNamePtr(), index);122 GE_CHK_GRAPH_STATUS_RET(ret, "[Set][Name] Failed to set subgraph to node %s index %u", node->GetNamePtr(), index);
123 123 
124 subgraph->SetParentNode(node);124 subgraph->SetParentNode(node);
125- GE_ASSERT_NOTNULL(node->GetExtendInfo(), "EntendInfo of node %s is null.", node->GetNamePtr());125+ GE_ASSERT_NOTNULL(node->GetExtendInfo(), "ExtendInfo of node %s is null.", node->GetNamePtr());
126 subgraph->SetParentGraph(node->GetExtendInfo()->GetOwnerGraphBarePtr());126 subgraph->SetParentGraph(node->GetExtendInfo()->GetOwnerGraphBarePtr());
127 127 
128 return (root_graph->AddSubGraph(const_cast<ExecuteGraphPtr &>(subgraph)) != nullptr) ? GRAPH_SUCCESS : GRAPH_FAILED;128 return (root_graph->AddSubGraph(const_cast<ExecuteGraphPtr &>(subgraph)) != nullptr) ? GRAPH_SUCCESS : GRAPH_FAILED;
@@ -952,7 +952,7 @@ bool OnnxUtils::DecodeNodeLink(const std::vector<onnx::NodeProto> &node_proto_ve
952 952 
953void OnnxUtils::DecodeAttribute(const ge::onnx::AttributeProto &attr_proto, std::vector<std::string> &strings) {953void OnnxUtils::DecodeAttribute(const ge::onnx::AttributeProto &attr_proto, std::vector<std::string> &strings) {
954 if (attr_proto.type() != ge::onnx::AttributeProto_AttributeType_STRINGS) {954 if (attr_proto.type() != ge::onnx::AttributeProto_AttributeType_STRINGS) {
955- REPORT_INNER_ERR_MSG("E18888", "Attribute %s call wrong decode attribute function", attr_proto.name().c_str());955+ REPORT_INNER_ERR_MSG("E18888", "Attribute %s called wrong decode attribute function.", attr_proto.name().c_str());
956 GELOGE(GRAPH_FAILED, "[Check][Param] Attribute %s call wrong decode attribute function", attr_proto.name().c_str());956 GELOGE(GRAPH_FAILED, "[Check][Param] Attribute %s call wrong decode attribute function", attr_proto.name().c_str());
957 return;957 return;
958 }958 }
@@ -1205,7 +1205,7 @@ bool OnnxUtils::AddInputAndOutputNodesForGraph(const onnx::GraphProto &graph_pro
1205 const auto &output_name = output.name();1205 const auto &output_name = output.name();
1206 const auto output_node_item = node_map.find(output_name);1206 const auto output_node_item = node_map.find(output_name);
1207 if (output_node_item == node_map.end()) {1207 if (output_node_item == node_map.end()) {
1208- REPORT_INNER_ERR_MSG("E18888", "cannot find graph's output node %s in node_", output_name.c_str());1208+ REPORT_INNER_ERR_MSG("E18888", "cannot find graph's output node %s in node list", output_name.c_str());
1209 GELOGE(GRAPH_FAILED, "[Check][Param] cannot find graph's output node %s in node_", output_name.c_str());1209 GELOGE(GRAPH_FAILED, "[Check][Param] cannot find graph's output node %s in node_", output_name.c_str());
1210 return false;1210 return false;
1211 }1211 }
@@ -102,7 +102,7 @@ graphStatus ReLinkInputDataEdge(const NodePtr &input_node, const NodePtr &target
102 (void)AttrUtils::GetInt(input_node->GetOpDesc(), ATTR_NAME_INDEX, index);102 (void)AttrUtils::GetInt(input_node->GetOpDesc(), ATTR_NAME_INDEX, index);
103 GE_ASSERT_TRUE(index >= 0, "Attr index[%d] of node: %s is invalid", index, input_node->GetNamePtr());103 GE_ASSERT_TRUE(index >= 0, "Attr index[%d] of node: %s is invalid", index, input_node->GetNamePtr());
104 GE_ASSERT_TRUE(index < static_cast<int32_t>(target_node->GetAllInDataAnchorsSize()),104 GE_ASSERT_TRUE(index < static_cast<int32_t>(target_node->GetAllInDataAnchorsSize()),
105- "Attr index[%d] of node: %s cannot larger than input num: %u of target node: %s", index,105+ "Attr index[%d] of node: %s cannot be larger than input num: %u of target node: %s", index,
106 input_node->GetNamePtr(), target_node->GetAllInDataAnchorsSize(), target_node->GetNamePtr());106 input_node->GetNamePtr(), target_node->GetAllInDataAnchorsSize(), target_node->GetNamePtr());
107 GELOGD("Begin to handle subgraph input node:%s with index:%d.", input_node->GetName().c_str(), index);107 GELOGD("Begin to handle subgraph input node:%s with index:%d.", input_node->GetName().c_str(), index);
108 // get node's in data anchor and peer out anchor108 // get node's in data anchor and peer out anchor
@@ -139,7 +139,7 @@ graphStatus RelinkOutputNodeEdge(const NodePtr &out_node, const int32_t out_inde
139 const size_t target_index) {139 const size_t target_index) {
140 // 处理输出算子的连边关系140 // 处理输出算子的连边关系
141 GE_ASSERT_TRUE(target_index < static_cast<size_t>(target_node->GetAllOutDataAnchorsSize()),141 GE_ASSERT_TRUE(target_index < static_cast<size_t>(target_node->GetAllOutDataAnchorsSize()),
142- "Attr index[%d] of node: %s cannot larger than input num: %u of target node: %s", target_index,142+ "Attr index[%d] of node: %s cannot be larger than output num: %u of target node: %s", target_index,
143 out_node->GetNamePtr(), target_node->GetAllOutDataAnchorsSize(), target_node->GetNamePtr());143 out_node->GetNamePtr(), target_node->GetAllOutDataAnchorsSize(), target_node->GetNamePtr());
144 auto node_out_anchor = target_node->GetOutDataAnchor(target_index);144 auto node_out_anchor = target_node->GetOutDataAnchor(target_index);
145 GE_ASSERT_NOTNULL(node_out_anchor, "Get index: %zu of node: %s failed", target_index, target_node->GetNamePtr());145 GE_ASSERT_NOTNULL(node_out_anchor, "Get index: %zu of node: %s failed", target_index, target_node->GetNamePtr());
@@ -495,7 +495,7 @@ GraphUtils::RemoveNodesWithoutRelink(const ComputeGraphPtr &compute_graph, const
495 }495 }
496 const auto to_be_remove_nodes_size = nodes.size();496 const auto to_be_remove_nodes_size = nodes.size();
497 if (success_removed_nodes_size != to_be_remove_nodes_size) {497 if (success_removed_nodes_size != to_be_remove_nodes_size) {
498- GELOGW("Successfully remove %zu nodes but there are %zu nodes to be delete", success_removed_nodes_size,498+ GELOGW("Successfully remove %zu nodes but there are %zu nodes to be deleted", success_removed_nodes_size,
499 to_be_remove_nodes_size);499 to_be_remove_nodes_size);
500 }500 }
501 return GRAPH_SUCCESS;501 return GRAPH_SUCCESS;
@@ -851,7 +851,7 @@ graphStatus GetDumpRealPath(const int64_t file_index, const std::string &suffix,
851 const std::string file_name = user_graph_name.substr(sep + 1UL, user_graph_name.length());851 const std::string file_name = user_graph_name.substr(sep + 1UL, user_graph_name.length());
852 std::string path_dir = user_graph_name.substr(0UL, sep + 1UL);852 std::string path_dir = user_graph_name.substr(0UL, sep + 1UL);
853 if ((file_name.length() == 0UL) || (path_dir.length() == 0UL)) {853 if ((file_name.length() == 0UL) || (path_dir.length() == 0UL)) {
854- GELOGW("[Invalid]path or name invalid.user_graph_name:%s", user_graph_name.c_str());854+ GELOGW("[Invalid] path or name is invalid. user_graph_name:%s", user_graph_name.c_str());
855 return GRAPH_PARAM_INVALID;855 return GRAPH_PARAM_INVALID;
856 }856 }
857 857 
@@ -867,7 +867,7 @@ graphStatus GetDumpRealPath(const int64_t file_index, const std::string &suffix,
867 char_t real_path[MMPA_MAX_PATH] = {};867 char_t real_path[MMPA_MAX_PATH] = {};
868 auto const ret = mmRealPath(relative_path.c_str(), &(real_path[0]), MMPA_MAX_PATH);868 auto const ret = mmRealPath(relative_path.c_str(), &(real_path[0]), MMPA_MAX_PATH);
869 if (ret != EN_OK) {869 if (ret != EN_OK) {
870- GELOGD("[Get][RealPath]file does not exist, it will be create. ret:%d", ret);870+ GELOGD("[Get][RealPath]file does not exist, it will be created. ret:%d", ret);
871 }871 }
872 872 
873 real_path_name = real_path;873 real_path_name = real_path;
@@ -1147,7 +1147,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool GraphUtils::LoadGEGraph(cons
1147 // Get Model object from ModelDef by deserialize ModelDef1147 // Get Model object from ModelDef by deserialize ModelDef
1148 GE_ASSERT_SUCCESS(model.Load(model_def), "[Get][Model] failed from ModelDef:%s", file);1148 GE_ASSERT_SUCCESS(model.Load(model_def), "[Get][Model] failed from ModelDef:%s", file);
1149 GE_CHK_BOOL_EXEC(model.GetGraph() != nullptr,1149 GE_CHK_BOOL_EXEC(model.GetGraph() != nullptr,
1150- REPORT_INNER_ERR_MSG("E18888", "Get computer graph is nullptr, model file:%s.", file);1150+ REPORT_INNER_ERR_MSG("E18888", "Get compute graph is nullptr, model file:%s.", file);
1151 return false, "[Get][ComputerGraph] is nullptr");1151 return false, "[Get][ComputerGraph] is nullptr");
1152 compute_graph = *model.GetGraph();1152 compute_graph = *model.GetGraph();
1153 return true;1153 return true;
@@ -1163,12 +1163,12 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool GraphUtils::LoadGEGraph(cons
1163 // Get Model object from ModelDef by deserialize ModelDef1163 // Get Model object from ModelDef by deserialize ModelDef
1164 GE_ASSERT_SUCCESS(model.Load(model_def), "[Get][Model] failed from ModelDef:%s", file);1164 GE_ASSERT_SUCCESS(model.Load(model_def), "[Get][Model] failed from ModelDef:%s", file);
1165 GE_CHK_BOOL_EXEC(model.GetGraph() != nullptr,1165 GE_CHK_BOOL_EXEC(model.GetGraph() != nullptr,
1166- REPORT_INNER_ERR_MSG("E18888", "Get computer graph is nullptr, model file:%s.", file);1166+ REPORT_INNER_ERR_MSG("E18888", "Get compute graph is nullptr, model file:%s.", file);
1167 return false, "[Get][ComputerGraph] is nullptr");1167 return false, "[Get][ComputerGraph] is nullptr");
1168 compute_graph = model.GetGraph();1168 compute_graph = model.GetGraph();
1169 for (const auto &node : compute_graph->GetDirectNode()) {1169 for (const auto &node : compute_graph->GetDirectNode()) {
1170 if (node == nullptr) {1170 if (node == nullptr) {
1171- REPORT_INNER_ERR_MSG("E18888", "ModeDef %s has nullptr node.", file);1171+ REPORT_INNER_ERR_MSG("E18888", "ModelDef %s has nullptr node.", file);
1172 GELOGE(GRAPH_FAILED, "[Get][Node]Nullptr node in graph:%s, model:%s", compute_graph->GetName().c_str(), file);1172 GELOGE(GRAPH_FAILED, "[Get][Node]Nullptr node in graph:%s, model:%s", compute_graph->GetName().c_str(), file);
1173 return false;1173 return false;
1174 }1174 }
@@ -1487,7 +1487,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY void GraphUtils::DumpGrphToOnnx(c
1487 if ((proto_file.length()) >= kNameMax) {1487 if ((proto_file.length()) >= kNameMax) {
1488 proto_file = proto_file.substr(0U, kNameMax - 7U);1488 proto_file = proto_file.substr(0U, kNameMax - 7U);
1489 proto_file = proto_file + ".pbtxt";1489 proto_file = proto_file + ".pbtxt";
1490- GELOGW("[Check][Param] File name is too longer!, file:%s", proto_file.c_str());1490+ GELOGW("[Check][Param] File name is too long, file:%s", proto_file.c_str());
1491 }1491 }
1492 const std::string full_proto_file = path + "/" + proto_file;1492 const std::string full_proto_file = path + "/" + proto_file;
1493 const auto real_path = ComGraphMakeUnique<char_t[]>(static_cast<size_t>(MMPA_MAX_PATH));1493 const auto real_path = ComGraphMakeUnique<char_t[]>(static_cast<size_t>(MMPA_MAX_PATH));
@@ -3307,7 +3307,7 @@ graphStatus GraphUtils::UnionSymbolMapping(const NodeIndexIO &exist_node_info1,
3307 GE_ASSERT_TRUE(iter != anchor_to_symbol.end(), "anchor %s does not exist in anchor_to_symbol.",3307 GE_ASSERT_TRUE(iter != anchor_to_symbol.end(), "anchor %s does not exist in anchor_to_symbol.",
3308 node_index_io.ToString().c_str());3308 node_index_io.ToString().c_str());
3309 if (iter->second != min_symbol) {3309 if (iter->second != min_symbol) {
3310- GELOGW("[GetRefMapping][Check] not expected symbol of anchor %s, expect %s but %s exactly.", iter->first.c_str(),3310+ GELOGW("[GetRefMapping][Check] not expected symbol of anchor %s, expect %s but got %s.", iter->first.c_str(),
3311 min_symbol.c_str(), iter->second.c_str());3311 min_symbol.c_str(), iter->second.c_str());
3312 }3312 }
3313 iter->second = symbol;3313 iter->second = symbol;
@@ -4650,7 +4650,7 @@ void CompleteGraphBuilder::AddNetOutputNode(graphStatus &error_code, std::string
4650 4650 
4651 if (net_output_desc->AddInputDesc(tensor) != GRAPH_SUCCESS) {4651 if (net_output_desc->AddInputDesc(tensor) != GRAPH_SUCCESS) {
4652 error_code = GRAPH_FAILED;4652 error_code = GRAPH_FAILED;
4653- error_msg = "AddNetOutputNode failed: add input_desc ailed.";4653+ error_msg = "AddNetOutputNode failed: add input_desc failed.";
4654 return;4654 return;
4655 }4655 }
4656 peer_out_anchors[i] = node->GetOutDataAnchor(static_cast<int32_t>(index));4656 peer_out_anchors[i] = node->GetOutDataAnchor(static_cast<int32_t>(index));
@@ -4748,7 +4748,7 @@ void CompleteGraphBuilder::PostProcess(graphStatus &error_code, std::string &err
4748 std::vector<ComputeGraphPtr> subgraphs;4748 std::vector<ComputeGraphPtr> subgraphs;
4749 if (NodeUtils::GetDirectSubgraphs(node, subgraphs) != GRAPH_SUCCESS) {4749 if (NodeUtils::GetDirectSubgraphs(node, subgraphs) != GRAPH_SUCCESS) {
4750 error_code = GRAPH_FAILED;4750 error_code = GRAPH_FAILED;
4751- error_msg = "Get subgraphs for failed failed, node:" + node->GetName();4751+ error_msg = "Get subgraphs for node failed, node:" + node->GetName();
4752 return;4752 return;
4753 }4753 }
4754 for (const auto &subgraph : subgraphs) {4754 for (const auto &subgraph : subgraphs) {
@@ -4901,7 +4901,7 @@ graphStatus GraphUtils::RemoveJustNodes(const ComputeGraphPtr &compute_graph,
4901 }4901 }
4902 const auto to_be_remove_nodes_size = nodes.size();4902 const auto to_be_remove_nodes_size = nodes.size();
4903 if (success_removed_nodes_size != to_be_remove_nodes_size) {4903 if (success_removed_nodes_size != to_be_remove_nodes_size) {
4904- GELOGW("Successfully remove %zu nodes but there are %zu nodes to be delete", success_removed_nodes_size,4904+ GELOGW("Successfully remove %zu nodes but there are %zu nodes to be deleted", success_removed_nodes_size,
4905 to_be_remove_nodes_size);4905 to_be_remove_nodes_size);
4906 }4906 }
4907 return GRAPH_SUCCESS;4907 return GRAPH_SUCCESS;
@@ -4971,7 +4971,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus GraphUtils::GetSuppor
4971 constexpr size_t kInplaceAbilitySize = 2U;4971 constexpr size_t kInplaceAbilitySize = 2U;
4972 for (auto &inplace_index : output_inplace_index_list) {4972 for (auto &inplace_index : output_inplace_index_list) {
4973 if (inplace_index.size() != kInplaceAbilitySize) {4973 if (inplace_index.size() != kInplaceAbilitySize) {
4974- GELOGW("The size %u of inplace index is not invalid, must be equal to 2.", inplace_index.size());4974+ GELOGW("The size %u of inplace index is invalid, must be equal to 2.", inplace_index.size());
4975 return GRAPH_FAILED;4975 return GRAPH_FAILED;
4976 }4976 }
4977 GE_ASSERT_TRUE(ge::IntegerChecker<int32_t>::Compat(inplace_index[0]));4977 GE_ASSERT_TRUE(ge::IntegerChecker<int32_t>::Compat(inplace_index[0]));
@@ -5122,7 +5122,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus GraphUtils::GenDumpOn
5122 std::string dump_file_name = ss.str();5122 std::string dump_file_name = ss.str();
5123 if ((dump_file_name.length()) >= kNameMax) {5123 if ((dump_file_name.length()) >= kNameMax) {
5124 dump_file_name = dump_file_name.substr(0U, kNameMax - 7U) + ".pbtxt";5124 dump_file_name = dump_file_name.substr(0U, kNameMax - 7U) + ".pbtxt";
5125- GELOGW("[Check][Param] File name is too longer!, file:%s", dump_file_name.c_str());5125+ GELOGW("[Check][Param] File name is too long!, file:%s", dump_file_name.c_str());
5126 }5126 }
5127 std::string proto_file = stream_file_name.str() + dump_file_name;5127 std::string proto_file = stream_file_name.str() + dump_file_name;
5128 5128 
@@ -5134,7 +5134,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus GraphUtils::GenDumpOn
5134 /// Distinguish between last the two cases in the function WriteProtoToTextFile call open()5134 /// Distinguish between last the two cases in the function WriteProtoToTextFile call open()
5135 auto const ret = mmRealPath(proto_file.c_str(), &(real_path[0]), MMPA_MAX_PATH);5135 auto const ret = mmRealPath(proto_file.c_str(), &(real_path[0]), MMPA_MAX_PATH);
5136 if (ret != EN_OK) {5136 if (ret != EN_OK) {
5137- GELOGD("[Get][RealPath]file does not exist, it will be create. ret:%d", ret);5137+ GELOGD("[Get][RealPath]file does not exist, it will be created. ret:%d", ret);
5138 }5138 }
5139 real_path_name = real_path;5139 real_path_name = real_path;
5140 return SUCCESS;5140 return SUCCESS;
@@ -875,7 +875,7 @@ std::shared_ptr<DtypeInferenceRule> DtypeInferenceRule::FromJsonString(const std
875 875 
876 const auto dtype_json = rule_json["dtype"];876 const auto dtype_json = rule_json["dtype"];
877 if (dtype_json.is_null()) {877 if (dtype_json.is_null()) {
878- *rule << "Filed 'dtype' must not be null.";878+ *rule << "Field 'dtype' must not be null.";
879 return g_dtype_rule_cache.GetWithDefault(json_str, rule);879 return g_dtype_rule_cache.GetWithDefault(json_str, rule);
880 }880 }
881 881 
@@ -780,7 +780,7 @@ OpDescPtr OpDescUtils::CreateConstOp(const GeTensorPtr &tensor_ptr, const bool c
780 const_opdesc->GetNamePtr());780 const_opdesc->GetNamePtr());
781 } else {781 } else {
782 GE_ASSERT_TRUE(AttrUtils::SetShareTensor(const_opdesc, ATTR_NAME_WEIGHTS, *tensor_ptr),782 GE_ASSERT_TRUE(AttrUtils::SetShareTensor(const_opdesc, ATTR_NAME_WEIGHTS, *tensor_ptr),
783- "[Set][ShardTensor] success for %s.", const_opdesc->GetNamePtr());783+ "[Set][ShardTensor] failed for %s.", const_opdesc->GetNamePtr());
784 }784 }
785 const_opdesc->SetType(CONSTANT);785 const_opdesc->SetType(CONSTANT);
786 std::string op_name;786 std::string op_name;
@@ -65,7 +65,7 @@ graphStatus OpDescUtilsEx::CallInferFuncV2(const OpDescPtr &op_desc, Operator &o
65 return GRAPH_FAILED;65 return GRAPH_FAILED;
66 }66 }
67 if (op_desc->GetIrInputs().empty() && op_desc->GetIrOutputs().empty() && op_desc->GetAllOutputsDescSize() != 0U) {67 if (op_desc->GetIrInputs().empty() && op_desc->GetIrOutputs().empty() && op_desc->GetAllOutputsDescSize() != 0U) {
68- GE_CHK_STATUS_RET(RecoverIrUtils::RecoverOpDescIrDefinition(op_desc), "Failed recover ir def for %s %s",68+ GE_CHK_STATUS_RET(RecoverIrUtils::RecoverOpDescIrDefinition(op_desc), "Failed to recover ir def for %s %s",
69 op_desc->GetNamePtr(), op_desc->GetTypePtr());69 op_desc->GetNamePtr(), op_desc->GetTypePtr());
70 }70 }
71 GE_WARN_ASSERT_GRAPH_SUCCESS(call_infer_data_type(op_desc),71 GE_WARN_ASSERT_GRAPH_SUCCESS(call_infer_data_type(op_desc),
@@ -266,7 +266,7 @@ graphStatus OpDescUtilsEx::CallInferFormatFuncV2(const OpDescPtr &op_desc, Opera
266 const auto call_infer_format_v2 = OperatorFactoryImpl::GetInferFormatV2Func();266 const auto call_infer_format_v2 = OperatorFactoryImpl::GetInferFormatV2Func();
267 GE_ASSERT_NOTNULL(call_infer_format_v2);267 GE_ASSERT_NOTNULL(call_infer_format_v2);
268 if (op_desc->GetIrInputs().empty() && op_desc->GetIrOutputs().empty() && op_desc->GetAllOutputsDescSize() != 0U) {268 if (op_desc->GetIrInputs().empty() && op_desc->GetIrOutputs().empty() && op_desc->GetAllOutputsDescSize() != 0U) {
269- GE_CHK_STATUS_RET(RecoverIrUtils::RecoverOpDescIrDefinition(op_desc), "Failed recover ir def for %s %s",269+ GE_CHK_STATUS_RET(RecoverIrUtils::RecoverOpDescIrDefinition(op_desc), "Failed to recover ir def for %s %s",
270 op_desc->GetNamePtr(), op_desc->GetTypePtr());270 op_desc->GetNamePtr(), op_desc->GetTypePtr());
271 }271 }
272 return call_infer_format_v2(op, op_desc);272 return call_infer_format_v2(op, op_desc);
@@ -39,7 +39,7 @@ class TraceFileHolder {
39 if (fd_ >= 0) {39 if (fd_ >= 0) {
40 const mmSsize_t written_count = mmWrite(fd_, const_cast<char_t *>(data), strlen(data));40 const mmSsize_t written_count = mmWrite(fd_, const_cast<char_t *>(data), strlen(data));
41 if ((written_count == EN_INVALID_PARAM) || (written_count == EN_ERROR)) {41 if ((written_count == EN_INVALID_PARAM) || (written_count == EN_ERROR)) {
42- GELOGE(INTERNAL_ERROR, "[trace] Failed write trace info to file %s", data);42+ GELOGE(INTERNAL_ERROR, "[trace] Failed to write trace info to file %s", data);
43 }43 }
44 (void)mmWrite(fd_, const_cast<char_t *>(separator), strlen(separator));44 (void)mmWrite(fd_, const_cast<char_t *>(separator), strlen(separator));
45 }45 }
@@ -149,7 +149,7 @@ void TraceManager::SaveTraceBufferToFile(const ReadyPart ready_part) {
149 149 
150 auto fh = OpenOrCreateFile(current_saving_file_name_);150 auto fh = OpenOrCreateFile(current_saving_file_name_);
151 if (fh == nullptr || (!fh->Valid())) {151 if (fh == nullptr || (!fh->Valid())) {
152- GELOGE(INTERNAL_ERROR, "[trace] Failed get file holder for %s", current_saving_file_name_.c_str());152+ GELOGE(INTERNAL_ERROR, "[trace] Failed to get file holder for %s", current_saving_file_name_.c_str());
153 return;153 return;
154 }154 }
155 155 
@@ -198,7 +198,7 @@ Status TraceManager::Initialize(const char_t *file_save_path) {
198 try {198 try {
199 save_thread_ = std::thread(&TraceManager::SaveBufferToFileThreadFunc, this);199 save_thread_ = std::thread(&TraceManager::SaveBufferToFileThreadFunc, this);
200 } catch (const std::system_error &) {200 } catch (const std::system_error &) {
201- GELOGE(INTERNAL_ERROR, "[trace] Trace not enabled as failed start trace saving thread");201+ GELOGE(INTERNAL_ERROR, "[trace] Trace not enabled as failed to start trace saving thread");
202 return FAILED;202 return FAILED;
203 }203 }
204 return SUCCESS;204 return SUCCESS;
@@ -87,7 +87,7 @@ bool NodeShapeTransUtils::CatchFormatAndShape() {
87 if (SameCurrentAndOrigin(tensor_desc_output)) {87 if (SameCurrentAndOrigin(tensor_desc_output)) {
88 GELOGD(88 GELOGD(
89 "Node is %s, output tensor idx is %zu. ori format: %s, format: %s, ori shape:%s, shape:%s is same!"89 "Node is %s, output tensor idx is %zu. ori format: %s, format: %s, ori shape:%s, shape:%s is same!"
90- "or output original not initialized. No need to catch format&shape!",90+ " or output original not initialized. No need to catch format&shape!",
91 op_desc_->GetName().c_str(), i, TypeUtils::FormatToSerialString(ori_format).c_str(),91 op_desc_->GetName().c_str(), i, TypeUtils::FormatToSerialString(ori_format).c_str(),
92 TypeUtils::FormatToSerialString(format).c_str(), tensor_desc_output->GetOriginShape().ToString().c_str(),92 TypeUtils::FormatToSerialString(format).c_str(), tensor_desc_output->GetOriginShape().ToString().c_str(),
93 tensor_desc_output->GetShape().ToString().c_str());93 tensor_desc_output->GetShape().ToString().c_str());
@@ -115,7 +115,7 @@ bool NodeShapeTransUtils::UpdateFormatAndShape() {
115 }115 }
116 // if cannot find saved info, it says format and origin format is same when caught116 // if cannot find saved info, it says format and origin format is same when caught
117 if (map_format_in_[i] == FORMAT_RESERVED) {117 if (map_format_in_[i] == FORMAT_RESERVED) {
118- GELOGD("Node is [%s], input tensor idx [%zu] is not been caught.Skip update action for it!",118+ GELOGD("Node is [%s], input tensor idx [%zu] has not been caught. Skip update action for it!",
119 op_desc_->GetName().c_str(), i);119 op_desc_->GetName().c_str(), i);
120 tensor_desc_input->SetOriginFormat(tensor_desc_input->GetFormat());120 tensor_desc_input->SetOriginFormat(tensor_desc_input->GetFormat());
121 tensor_desc_input->SetOriginShape(tensor_desc_input->MutableShape());121 tensor_desc_input->SetOriginShape(tensor_desc_input->MutableShape());
@@ -154,7 +154,7 @@ bool NodeShapeTransUtils::UpdateFormatAndShape() {
154 }154 }
155 // if cannot find saved info, it says format and origin format is same when caught155 // if cannot find saved info, it says format and origin format is same when caught
156 if (map_ori_format_out_[i] == FORMAT_RESERVED) {156 if (map_ori_format_out_[i] == FORMAT_RESERVED) {
157- GELOGD("Node is [%s], output tensor idx [%zu] is not been caught.Skip update action for it!",157+ GELOGD("Node is [%s], output tensor idx [%zu] has not been caught. Skip update action for it!",
158 op_desc_->GetName().c_str(), i);158 op_desc_->GetName().c_str(), i);
159 tensor_desc_output->SetOriginFormat(tensor_desc_output->GetFormat());159 tensor_desc_output->SetOriginFormat(tensor_desc_output->GetFormat());
160 tensor_desc_output->SetOriginShape(tensor_desc_output->MutableShape());160 tensor_desc_output->SetOriginShape(tensor_desc_output->MutableShape());
@@ -102,7 +102,7 @@ graphStatus TuningUtils::ConvertGraphToFile(std::vector<ComputeGraphPtr> tuning_
102 auto help_info = HelpInfo{i, exe_flag, true, path, user_path};102 auto help_info = HelpInfo{i, exe_flag, true, path, user_path};
103 help_info.need_preprocess_ = true;103 help_info.need_preprocess_ = true;
104 if (MakeExeGraph(subgraph, help_info) != SUCCESS) {104 if (MakeExeGraph(subgraph, help_info) != SUCCESS) {
105- GELOGE(GRAPH_FAILED, "[Invoke][MakeExeGraph] TUU:subgraph %zu generate exe graph failed", i);105+ GELOGE(GRAPH_FAILED, "[Invoke][MakeExeGraph] subgraph %zu generate exe graph failed", i);
106 return GRAPH_FAILED;106 return GRAPH_FAILED;
107 }107 }
108 i++;108 i++;
@@ -601,13 +601,13 @@ graphStatus TuningUtils::LinkEnd2NetOutput(NodePtr &end_node, NodePtr &out_node)
601 GE_CHECK_NOTNULL(src_anchor);601 GE_CHECK_NOTNULL(src_anchor);
602 if (GraphUtils::RemoveEdge(src_anchor, end_in_anchor) != GRAPH_SUCCESS) {602 if (GraphUtils::RemoveEdge(src_anchor, end_in_anchor) != GRAPH_SUCCESS) {
603 REPORT_INNER_ERR_MSG("E18888",603 REPORT_INNER_ERR_MSG("E18888",
604- "TUU:remove end input edge from from %s(%d) to %s(%d) failed. "604+ "TUU:remove end input edge from %s(%d) to %s(%d) failed. "
605 "node_name:%s, graph_name:%s",605 "node_name:%s, graph_name:%s",
606 GetNodeNameByAnchor(src_anchor.get()).c_str(), src_anchor->GetIdx(),606 GetNodeNameByAnchor(src_anchor.get()).c_str(), src_anchor->GetIdx(),
607 GetNodeNameByAnchor(end_in_anchor.get()).c_str(), end_in_anchor->GetIdx(),607 GetNodeNameByAnchor(end_in_anchor.get()).c_str(), end_in_anchor->GetIdx(),
608 end_node->GetName().c_str(), end_node->GetOwnerComputeGraph()->GetName().c_str());608 end_node->GetName().c_str(), end_node->GetOwnerComputeGraph()->GetName().c_str());
609 GELOGE(FAILED,609 GELOGE(FAILED,
610- "[Remove][Edge] TUU:remove end input edge from from %s(%d) to %s(%d) failed. "610+ "[Remove][Edge] TUU:remove end input edge from %s(%d) to %s(%d) failed. "
611 "node_name:%s, graph_name:%s",611 "node_name:%s, graph_name:%s",
612 GetNodeNameByAnchor(src_anchor.get()).c_str(), src_anchor->GetIdx(),612 GetNodeNameByAnchor(src_anchor.get()).c_str(), src_anchor->GetIdx(),
613 GetNodeNameByAnchor(end_in_anchor.get()).c_str(), end_in_anchor->GetIdx(), end_node->GetName().c_str(),613 GetNodeNameByAnchor(end_in_anchor.get()).c_str(), end_in_anchor->GetIdx(), end_node->GetName().c_str(),
@@ -692,7 +692,7 @@ graphStatus TuningUtils::ChangeEnd2NetOutput(NodePtr &end_node, NodePtr &out_nod
692 const auto type_end = end_node->GetType();692 const auto type_end = end_node->GetType();
693 const auto type_out = out_node->GetType();693 const auto type_out = out_node->GetType();
694 if ((type_end != END) || (type_out != NETOUTPUT)) {694 if ((type_end != END) || (type_out != NETOUTPUT)) {
695- REPORT_INNER_ERR_MSG("E18888", "TUU:Failed to change end_node %s from type %s to type %s",695+ REPORT_INNER_ERR_MSG("E18888", "[Tuning]Failed to change end_node %s from type %s to type %s",
696 end_node->GetName().c_str(), type_end.c_str(), type_out.c_str());696 end_node->GetName().c_str(), type_end.c_str(), type_out.c_str());
697 GELOGE(FAILED, "[Check][Param] TUU:Failed to change end_node %s from type %s to type %s",697 GELOGE(FAILED, "[Check][Param] TUU:Failed to change end_node %s from type %s to type %s",
698 end_node->GetName().c_str(), type_end.c_str(), type_out.c_str());698 end_node->GetName().c_str(), type_end.c_str(), type_out.c_str());
@@ -786,7 +786,7 @@ graphStatus TuningUtils::LinkSubgraph(ComputeGraphPtr &root_graph, const Compute
786 for (const auto &subgraph_name : op_desc->GetSubgraphInstanceNames()) {786 for (const auto &subgraph_name : op_desc->GetSubgraphInstanceNames()) {
787 const auto iter = name_to_merged_subgraph.find(subgraph_name);787 const auto iter = name_to_merged_subgraph.find(subgraph_name);
788 if (iter == name_to_merged_subgraph.end()) {788 if (iter == name_to_merged_subgraph.end()) {
789- REPORT_INNER_ERR_MSG("E18888", "TUU:cannot find subgraph with name:%s for op:%s.", subgraph_name.c_str(),789+ REPORT_INNER_ERR_MSG("E18888", "cannot find subgraph with name:%s for op:%s.", subgraph_name.c_str(),
790 op_desc->GetName().c_str());790 op_desc->GetName().c_str());
791 GELOGE(GRAPH_FAILED, "cannot find subgraph with name:%s for op:%s", subgraph_name.c_str(),791 GELOGE(GRAPH_FAILED, "cannot find subgraph with name:%s for op:%s", subgraph_name.c_str(),
792 op_desc->GetName().c_str());792 op_desc->GetName().c_str());
@@ -848,7 +848,7 @@ graphStatus TuningUtils::LoadGraphFromFile(const std::map<int64_t, std::string>
848 }848 }
849 849 
850 if (root_graphs.empty()) {850 if (root_graphs.empty()) {
851- REPORT_INNER_ERR_MSG("E18888", "TUU:root graph has no subgraphs, cannot merge.");851+ REPORT_INNER_ERR_MSG("E18888", "root graph has no subgraphs, cannot merge.");
852 GELOGE(GRAPH_FAILED, "root graph has no subgraphs, cannot merge");852 GELOGE(GRAPH_FAILED, "root graph has no subgraphs, cannot merge");
853 return GRAPH_FAILED;853 return GRAPH_FAILED;
854 }854 }
@@ -98,7 +98,7 @@ void ParseConstShapeDescV2(const nlohmann::json &shape_json, ge::Operator &op_pa
98 std::string dtype_str;98 std::string dtype_str;
99 99 
100 if (!shape_json.contains("const_value")) {100 if (!shape_json.contains("const_value")) {
101- GELOGI("Not const tenosr");101+ GELOGI("Not const tensor");
102 return;102 return;
103 }103 }
104 if (!shape_json.contains("name")) {104 if (!shape_json.contains("name")) {
@@ -481,7 +481,7 @@ extern "C" int32_t AscendCPyInterfaceOpReplay(const char *optype, const char *so
481 constexpr int32_t CORE_TYPE_VEC = 2;481 constexpr int32_t CORE_TYPE_VEC = 2;
482 if ((core_type != CORE_TYPE_BOTH) && (core_type != CORE_TYPE_CUBE) && (core_type != CORE_TYPE_VEC)) {482 if ((core_type != CORE_TYPE_BOTH) && (core_type != CORE_TYPE_CUBE) && (core_type != CORE_TYPE_VEC)) {
483 GELOGE(ge::GRAPH_FAILED,483 GELOGE(ge::GRAPH_FAILED,
484- "core_type is valid, should be one of 0/1/2, but args is "484+ "core_type is invalid, should be one of 0/1/2, but args is "
485 "%d",485 "%d",
486 core_type);486 core_type);
487 return 0;487 return 0;
@@ -490,7 +490,7 @@ extern "C" int32_t AscendCPyInterfaceOpReplay(const char *optype, const char *so
490 constexpr int32_t TASK_RATION_TWO = 2;490 constexpr int32_t TASK_RATION_TWO = 2;
491 if ((task_ration != TASK_RATION_ONE) && (task_ration != TASK_RATION_TWO)) {491 if ((task_ration != TASK_RATION_ONE) && (task_ration != TASK_RATION_TWO)) {
492 GELOGE(ge::GRAPH_FAILED,492 GELOGE(ge::GRAPH_FAILED,
493- "task_ration is valid, should be one of 1/2, but args is "493+ "task_ration is invalid, should be one of 1/2, but args is "
494 "%d",494 "%d",
495 task_ration);495 task_ration);
496 return 0;496 return 0;
@@ -688,7 +688,7 @@ Status FusionTurbo::LinkInput(Relations &input_relations, const ge::NodePtr &dst
688 if (ge::GraphUtils::AddEdge(out_anchor, dst_in_anchor) != ge::GRAPH_SUCCESS) {688 if (ge::GraphUtils::AddEdge(out_anchor, dst_in_anchor) != ge::GRAPH_SUCCESS) {
689 return FAILED;689 return FAILED;
690 }690 }
691- GELOGD("SuccessFully link input %s %d ---> %s %d.", src_node->GetName().c_str(), src_out_index,691+ GELOGD("Successfully link input %s %d ---> %s %d.", src_node->GetName().c_str(), src_out_index,
692 dst_node->GetName().c_str(), dst_in_index);692 dst_node->GetName().c_str(), dst_in_index);
693 }693 }
694 return SUCCESS;694 return SUCCESS;
@@ -748,7 +748,7 @@ Status FusionTurbo::LinkOutput(Relations &output_relations, const ge::NodePtr &s
748 if (ge::GraphUtils::AddEdge(src_out_anchor, in_anchor) != ge::GRAPH_SUCCESS) {748 if (ge::GraphUtils::AddEdge(src_out_anchor, in_anchor) != ge::GRAPH_SUCCESS) {
749 return FAILED;749 return FAILED;
750 }750 }
751- GELOGD("SuccessFully link output %s %d ---> %s %d.", src_node->GetName().c_str(), src_out_index,751+ GELOGD("Successfully link output %s %d ---> %s %d.", src_node->GetName().c_str(), src_out_index,
752 dst_node->GetName().c_str(), dst_index);752 dst_node->GetName().c_str(), dst_index);
753 }753 }
754 }754 }
@@ -34,7 +34,7 @@ ge::graphStatus ParseJson(const std::tuple<const uint8_t *, const uint8_t *> &in
34 try {34 try {
35 res = nlohmann::json::parse(jsonStr);35 res = nlohmann::json::parse(jsonStr);
36 } catch (const nlohmann::json::exception &e) {36 } catch (const nlohmann::json::exception &e) {
37- GELOGE(ge::GRAPH_PARAM_INVALID, "Parse json failed, resion %s, json info %s.", e.what(), jsonStr.c_str());37+ GELOGE(ge::GRAPH_PARAM_INVALID, "Parse json failed, reason %s, json info %s.", e.what(), jsonStr.c_str());
38 return ge::GRAPH_PARAM_INVALID;38 return ge::GRAPH_PARAM_INVALID;
39 }39 }
40 return ge::GRAPH_SUCCESS;40 return ge::GRAPH_SUCCESS;
@@ -461,7 +461,7 @@ ge::graphStatus PostProcCalculateV2(const ge::Operator &op, OpRunInfoV2 &run_inf
461 run_info.GetAllWorkspaces(op_workspaces);461 run_info.GetAllWorkspaces(op_workspaces);
462 const size_t op_work_size = op_workspaces.size();462 const size_t op_work_size = op_workspaces.size();
463 if (op_work_size > all_workspaces.size()) {463 if (op_work_size > all_workspaces.size()) {
464- GELOGW("Op name:%s tiling return workspace number(%zu) large than all workspace num(%zu).",464+ GELOGW("Op name:%s tiling return workspace number(%zu) larger than all workspace num(%zu).",
465 op_desc->GetName().c_str(), op_work_size, all_workspaces.size());465 op_desc->GetName().c_str(), op_work_size, all_workspaces.size());
466 return ge::GRAPH_SUCCESS;466 return ge::GRAPH_SUCCESS;
467 }467 }
@@ -556,7 +556,7 @@ ge::graphStatus PostProcMemoryCheck(const ge::Operator &op, OpRunInfoV2 &run_inf
556 op_desc->GetName().c_str(), i);556 op_desc->GetName().c_str(), i);
557 return ge::GRAPH_FAILED;557 return ge::GRAPH_FAILED;
558 }558 }
559- GELOGD("Op input tensor: %zu has a size of %ld.", i, clean_size);559+ GELOGD("Op input tensor: %zu has a size of %ld bytes.", i, clean_size);
560 run_info.AddTilingData(clean_size);560 run_info.AddTilingData(clean_size);
561 }561 }
562 for (size_t j = 0U; j < op_desc->GetOutputsSize(); ++j) {562 for (size_t j = 0U; j < op_desc->GetOutputsSize(); ++j) {
@@ -570,7 +570,7 @@ ge::graphStatus PostProcMemoryCheck(const ge::Operator &op, OpRunInfoV2 &run_inf
570 op_desc->GetName().c_str(), j);570 op_desc->GetName().c_str(), j);
571 return ge::GRAPH_FAILED;571 return ge::GRAPH_FAILED;
572 }572 }
573- GELOGD("Op output tensor: %zu with size %ld.", j, clean_size);573+ GELOGD("Op output tensor: %zu with size %ld bytes.", j, clean_size);
574 run_info.AddTilingData(clean_size);574 run_info.AddTilingData(clean_size);
575 }575 }
576 for (size_t k = 0U; k < run_info.GetWorkspaceNum(); ++k) {576 for (size_t k = 0U; k < run_info.GetWorkspaceNum(); ++k) {
@@ -580,7 +580,7 @@ ge::graphStatus PostProcMemoryCheck(const ge::Operator &op, OpRunInfoV2 &run_inf
580 run_info.AddTilingData(workspace);580 run_info.AddTilingData(workspace);
581 }581 }
582 const uint64_t cur_size = run_info.GetTilingDataSize();582 const uint64_t cur_size = run_info.GetTilingDataSize();
583- GELOGD("Adding tiling data; current size: %lu.", cur_size);583+ GELOGD("Adding tiling data; current size: %lu bytes.", cur_size);
584 run_info.AddTilingData(cur_size);584 run_info.AddTilingData(cur_size);
585 585 
586 uint64_t max_size = 0U;586 uint64_t max_size = 0U;
@@ -689,7 +689,7 @@ ge::graphStatus AssembleWorkspaceList(const ge::OpDescPtr &op_desc_ptr, int64_t
689 }689 }
690 }690 }
691 }691 }
692- GELOGI("Atomic clean size: %ld, op_name:%s", first_clean_size, op_desc_ptr->GetName().c_str());692+ GELOGI("Atomic clean size: %ld bytes, op_name:%s", first_clean_size, op_desc_ptr->GetName().c_str());
693 693 
694 if (!atomic_workspace_info.empty()) {694 if (!atomic_workspace_info.empty()) {
695 const std::vector<int64_t> workspace_bytes = op_desc_ptr->GetWorkspaceBytes();695 const std::vector<int64_t> workspace_bytes = op_desc_ptr->GetWorkspaceBytes();
@@ -982,7 +982,7 @@ OpTilingFuncInfo *GetOpAtomicTilingInfo(const ge::OpDescPtr &op_desc) {
982 auto &op_func_map = OpTilingFuncRegistry::RegisteredOpFuncInfo();982 auto &op_func_map = OpTilingFuncRegistry::RegisteredOpFuncInfo();
983 const auto iter = op_func_map.find(OP_TYPE_DYNAMIC_ATOMIC_ADDR_CLEAN);983 const auto iter = op_func_map.find(OP_TYPE_DYNAMIC_ATOMIC_ADDR_CLEAN);
984 if (iter == op_func_map.end()) {984 if (iter == op_func_map.end()) {
985- GE_LOGE("Atomic optiling func not found of op[%s, %s].", op_desc->GetName().c_str(), op_desc->GetType().c_str());985+ GE_LOGE("Atomic optiling func not found for op[%s, %s].", op_desc->GetName().c_str(), op_desc->GetType().c_str());
986 return nullptr;986 return nullptr;
987 }987 }
988 op_desc->SetAtomicTilingFuncInfo(::ge::PtrToPtr<OpTilingFuncInfo, void>(&(iter->second)));988 op_desc->SetAtomicTilingFuncInfo(::ge::PtrToPtr<OpTilingFuncInfo, void>(&(iter->second)));
Mruntime/v1/graph/execute/model_executor.cc+3-3文件内容审核中,请稍后刷新重试