已合并
fix:improve log usability-0910 #4876
洪跃城创建于 12 天前
fix:improve log usability-0910 #4876
已合并
共 175 个文件变更+591-478
| @@ -134,7 +134,7 @@ static aclError GetModelOriDims(const uint32_t modelId, const uint32_t relatedIn | |||
| 134 | 134 | ||
| 135 | // Parse NHW from input Dims when inputDims is not empty | 135 | // Parse NHW from input Dims when inputDims is not empty |
| 136 | if (inputDims.empty()) { | 136 | if (inputDims.empty()) { |
| 137 | - ACL_LOG_INNER_ERROR("[Check][InputDims]get model origin input dims fail, origin input dims is empty"); | 137 | + ACL_LOG_INNER_ERROR("[Check][InputDims]get model origin input dims fail, origin input dims are empty"); |
| 138 | return ACL_ERROR_GE_FAILURE; | 138 | return ACL_ERROR_GE_FAILURE; |
| 139 | } | 139 | } |
| 140 | // Get the index of the maximum gear | 140 | // Get the index of the maximum gear |
| @@ -418,7 +418,7 @@ aclError aclmdlSetInputAIPPImpl(uint32_t modelId, aclmdlDataset *dataset, size_t | |||
| 418 | 418 | ||
| 419 | mdlRet = GetAndCheckAippParams(modelId, modelDesc, index, aippParmsSet); | 419 | mdlRet = GetAndCheckAippParams(modelId, modelDesc, index, aippParmsSet); |
| 420 | if (mdlRet != ACL_SUCCESS) { | 420 | if (mdlRet != ACL_SUCCESS) { |
| 421 | - ACL_LOG_ERROR("[Check][AippParams]Dynamic AIPP parameters is invalid, parameters verification failed"); | 421 | + ACL_LOG_ERROR("[Check][AippParams]Dynamic AIPP parameters are invalid, parameters verification failed"); |
| 422 | acl::AclErrorLogManager::ReportInputError( | 422 | acl::AclErrorLogManager::ReportInputError( |
| 423 | acl::INVALID_AIPP_MSG, std::vector<const char *>({"param", "reason"}), | 423 | acl::INVALID_AIPP_MSG, std::vector<const char *>({"param", "reason"}), |
| 424 | std::vector<const char *>({"parameters", "parameters verification failed"})); | 424 | std::vector<const char *>({"parameters", "parameters verification failed"})); |
| @@ -191,7 +191,7 @@ static aclError GetModelOriDimsOm2(const std::shared_ptr<gert::Om2ModelExecutor> | |||
| 191 | 191 | ||
| 192 | // Parse NHW from input Dims when inputDims is not empty | 192 | // Parse NHW from input Dims when inputDims is not empty |
| 193 | if (input_dims.empty()) { | 193 | if (input_dims.empty()) { |
| 194 | - ACL_LOG_INNER_ERROR("[Check][InputDims]get model origin input dims fail, origin input dims is empty"); | 194 | + ACL_LOG_INNER_ERROR("[Check][InputDims]get model origin input dims fail, origin input dims are empty"); |
| 195 | return ACL_ERROR_GE_FAILURE; | 195 | return ACL_ERROR_GE_FAILURE; |
| 196 | } | 196 | } |
| 197 | // Get the index of the maximum gear | 197 | // Get the index of the maximum gear |
| @@ -289,7 +289,7 @@ static aclError GetAndCheckAippOutputShapeOm2(const std::shared_ptr<gert::Om2Mod | |||
| 289 | return ACL_ERROR_INVALID_PARAM; | 289 | return ACL_ERROR_INVALID_PARAM; |
| 290 | } | 290 | } |
| 291 | } else { | 291 | } else { |
| 292 | - ACL_LOG_INFO("cant not get model H W N, current used model is old"); | 292 | + ACL_LOG_INFO("cannot get model H W N, current used model is old"); |
| 293 | } | 293 | } |
| 294 | return ACL_SUCCESS; | 294 | return ACL_SUCCESS; |
| 295 | } | 295 | } |
| @@ -828,7 +828,7 @@ aclError aclmdlSetInputAIPPImplOm2(uint32_t modelId, aclmdlDataset *dataset, siz | |||
| 828 | 828 | ||
| 829 | mdlRet = GetAndCheckAippParamsOm2(executor, modelId, index, aippParmsSet); | 829 | mdlRet = GetAndCheckAippParamsOm2(executor, modelId, index, aippParmsSet); |
| 830 | if (mdlRet != ACL_SUCCESS) { | 830 | if (mdlRet != ACL_SUCCESS) { |
| 831 | - ACL_LOG_ERROR("[Check][AippParams]Dynamic AIPP parameters is invalid, parameters verification failed"); | 831 | + ACL_LOG_ERROR("[Check][AippParams]Dynamic AIPP parameters are invalid, parameters verification failed"); |
| 832 | acl::AclErrorLogManager::ReportInputError( | 832 | acl::AclErrorLogManager::ReportInputError( |
| 833 | acl::INVALID_AIPP_MSG, std::vector<const char *>({"param", "reason"}), | 833 | acl::INVALID_AIPP_MSG, std::vector<const char *>({"param", "reason"}), |
| 834 | std::vector<const char *>({"parameters", "parameters verification failed"})); | 834 | std::vector<const char *>({"parameters", "parameters verification failed"})); |
| @@ -46,7 +46,7 @@ static aclError AippInputFormatCheck(const enum CceAippInputFormat inputFormat, | |||
| 46 | return ACL_ERROR_INVALID_PARAM; | 46 | return ACL_ERROR_INVALID_PARAM; |
| 47 | } | 47 | } |
| 48 | } else { | 48 | } else { |
| 49 | - ACL_LOG_INNER_ERROR("[Check][Aipp]dynamic aipp not support arch[%s]", npuArch.c_str()); | 49 | + ACL_LOG_INNER_ERROR("[Check][Aipp]dynamic aipp does not support arch[%s]", npuArch.c_str()); |
| 50 | return ACL_ERROR_INVALID_PARAM; | 50 | return ACL_ERROR_INVALID_PARAM; |
| 51 | } | 51 | } |
| 52 | return ACL_SUCCESS; | 52 | return ACL_SUCCESS; |
| @@ -278,7 +278,7 @@ static aclError AippDynamicBatchParaCheck(const aclmdlAIPP *const aippParmsSet, | |||
| 278 | for (uint64_t i = 0UL; i < batchSize; i++) { | 278 | for (uint64_t i = 0UL; i < batchSize; i++) { |
| 279 | scfSwitch = aippParmsSet->aippBatchPara[i].scfSwitch; | 279 | scfSwitch = aippParmsSet->aippBatchPara[i].scfSwitch; |
| 280 | if (scfSwitch == 1) { | 280 | if (scfSwitch == 1) { |
| 281 | - ACL_LOG_INNER_ERROR("[Check][Params]Not support scf!"); | 281 | + ACL_LOG_INNER_ERROR("[Check][Params]Scf is not supported!"); |
| 282 | return ACL_ERROR_INVALID_PARAM; | 282 | return ACL_ERROR_INVALID_PARAM; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| @@ -325,7 +325,7 @@ ACL_FUNC_VISIBILITY aclError AippParamsCheck(const aclmdlAIPP *const aippParmsSe | |||
| 325 | (inputFormat == CCE_RAW16)); | 325 | (inputFormat == CCE_RAW16)); |
| 326 | if (flag) { | 326 | if (flag) { |
| 327 | if (cscSwitch == 1) { | 327 | if (cscSwitch == 1) { |
| 328 | - ACL_LOG_INNER_ERROR("[Check][Params]YUV400 or raw not support csc switch!"); | 328 | + ACL_LOG_INNER_ERROR("[Check][Params]YUV400 or raw does not support csc switch!"); |
| 329 | return ACL_ERROR_INVALID_PARAM; | 329 | return ACL_ERROR_INVALID_PARAM; |
| 330 | } | 330 | } |
| 331 | } | 331 | } |
| @@ -213,10 +213,10 @@ aclTensorDesc *aclCreateTensorDescImplOm2(aclDataType dataType, int numDims, con | |||
| 213 | return nullptr; | 213 | return nullptr; |
| 214 | } | 214 | } |
| 215 | if ((numDims > 0) && (dims == nullptr)) { | 215 | if ((numDims > 0) && (dims == nullptr)) { |
| 216 | - ACL_LOG_ERROR("[Check][Dims]dims is null while numDims[%d] > 0", numDims); | 216 | + ACL_LOG_ERROR("[Check][Dims]dims are null while numDims[%d] > 0", numDims); |
| 217 | acl::AclErrorLogManager::ReportInputError( | 217 | acl::AclErrorLogManager::ReportInputError( |
| 218 | acl::INVALID_PARAM_MSG, std::vector<const char *>({"param", "value", "reason"}), | 218 | acl::INVALID_PARAM_MSG, std::vector<const char *>({"param", "value", "reason"}), |
| 219 | - std::vector<const char *>({"numDims", std::to_string(numDims).c_str(), "dims is null while numDims > 0"})); | 219 | + std::vector<const char *>({"numDims", std::to_string(numDims).c_str(), "dims are null while numDims > 0"})); |
| 220 | return nullptr; | 220 | return nullptr; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| @@ -57,7 +57,7 @@ aclError CheckInput(const char *opType, const int32_t numInputs, const aclTensor | |||
| 57 | ACL_REQUIRES_NON_NEGATIVE(numInputs); | 57 | ACL_REQUIRES_NON_NEGATIVE(numInputs); |
| 58 | ACL_REQUIRES_NON_NEGATIVE(numOutputs); | 58 | ACL_REQUIRES_NON_NEGATIVE(numOutputs); |
| 59 | if (compileFlag != ACL_COMPILE_SYS && compileFlag != ACL_COMPILE_UNREGISTERED) { | 59 | if (compileFlag != ACL_COMPILE_SYS && compileFlag != ACL_COMPILE_UNREGISTERED) { |
| 60 | - ACL_LOG_ERROR("[Check][Type]aclopCompile compile type[%d] not support", static_cast<int32_t>(compileFlag)); | 60 | + ACL_LOG_ERROR("[Check][Type]aclopCompile compile type[%d] is not supported", static_cast<int32_t>(compileFlag)); |
| 61 | acl::AclErrorLogManager::ReportInputError( | 61 | acl::AclErrorLogManager::ReportInputError( |
| 62 | acl::UNSUPPORTED_FEATURE_MSG, std::vector<const char *>({"feature", "reason"}), | 62 | acl::UNSUPPORTED_FEATURE_MSG, std::vector<const char *>({"feature", "reason"}), |
| 63 | std::vector<const char *>({"compile type", "must be equal to ACL_COMPILE_SYS or ACL_COMPILE_UNREGISTERED"})); | 63 | std::vector<const char *>({"compile type", "must be equal to ACL_COMPILE_SYS or ACL_COMPILE_UNREGISTERED"})); |
| @@ -141,7 +141,7 @@ aclError aclopCompile(const char *opType, int numInputs, const aclTensorDesc *co | |||
| 141 | ACL_REQUIRES_NON_NEGATIVE(numInputs); | 141 | ACL_REQUIRES_NON_NEGATIVE(numInputs); |
| 142 | ACL_REQUIRES_NON_NEGATIVE(numOutputs); | 142 | ACL_REQUIRES_NON_NEGATIVE(numOutputs); |
| 143 | if (compileFlag != ACL_COMPILE_SYS && compileFlag != ACL_COMPILE_UNREGISTERED) { | 143 | if (compileFlag != ACL_COMPILE_SYS && compileFlag != ACL_COMPILE_UNREGISTERED) { |
| 144 | - ACL_LOG_ERROR("[Check][CompileFlag]aclopCompileType [%d] not support", static_cast<int32_t>(compileFlag)); | 144 | + ACL_LOG_ERROR("[Check][CompileFlag]aclopCompileType [%d] is not supported", static_cast<int32_t>(compileFlag)); |
| 145 | acl::AclErrorLogManager::ReportInputError( | 145 | acl::AclErrorLogManager::ReportInputError( |
| 146 | acl::INVALID_PARAM_MSG, std::vector<const char *>({"param", "value", "reason"}), | 146 | acl::INVALID_PARAM_MSG, std::vector<const char *>({"param", "value", "reason"}), |
| 147 | std::vector<const char *>({"compile type", std::to_string(compileFlag).c_str(), "not in range"})); | 147 | std::vector<const char *>({"compile type", std::to_string(compileFlag).c_str(), "not in range"})); |
| @@ -153,13 +153,13 @@ aclError aclopCompile(const char *opType, int numInputs, const aclTensorDesc *co | |||
| 153 | if (acl::array_utils::IsHostMemTensorDesc(numInputs, inputDesc) != ACL_SUCCESS) { | 153 | if (acl::array_utils::IsHostMemTensorDesc(numInputs, inputDesc) != ACL_SUCCESS) { |
| 154 | ACL_LOG_INNER_ERROR( | 154 | ACL_LOG_INNER_ERROR( |
| 155 | "[Check][TensorDesc]aclopCompile ACL_MEMTYPE_HOST or " | 155 | "[Check][TensorDesc]aclopCompile ACL_MEMTYPE_HOST or " |
| 156 | - "ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT placeMent in inputDesc not support"); | 156 | + "ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT placeMent in inputDesc is not supported"); |
| 157 | return ACL_ERROR_API_NOT_SUPPORT; | 157 | return ACL_ERROR_API_NOT_SUPPORT; |
| 158 | } | 158 | } |
| 159 | if (acl::array_utils::IsHostMemTensorDesc(numOutputs, outputDesc) != ACL_SUCCESS) { | 159 | if (acl::array_utils::IsHostMemTensorDesc(numOutputs, outputDesc) != ACL_SUCCESS) { |
| 160 | ACL_LOG_INNER_ERROR( | 160 | ACL_LOG_INNER_ERROR( |
| 161 | "[Check][TensorDesc]aclopCompile ACL_MEMTYPE_HOST or " | 161 | "[Check][TensorDesc]aclopCompile ACL_MEMTYPE_HOST or " |
| 162 | - "ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT placeMent in outputDesc not support"); | 162 | + "ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT placeMent in outputDesc is not supported"); |
| 163 | return ACL_ERROR_API_NOT_SUPPORT; | 163 | return ACL_ERROR_API_NOT_SUPPORT; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| @@ -112,13 +112,13 @@ aclError aclopCreateHandleImpl(const char *opType, int numInputs, const aclTenso | |||
| 112 | if (acl::array_utils::IsHostMemTensorDesc(numInputs, inputDesc) != ACL_SUCCESS) { | 112 | if (acl::array_utils::IsHostMemTensorDesc(numInputs, inputDesc) != ACL_SUCCESS) { |
| 113 | ACL_LOG_INNER_ERROR( | 113 | ACL_LOG_INNER_ERROR( |
| 114 | "[Check][HostMemTensorDesc]aclopCreateHandle or ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT " | 114 | "[Check][HostMemTensorDesc]aclopCreateHandle or ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT " |
| 115 | - "placeMent in inputDesc not support"); | 115 | + "placeMent in inputDesc is not supported"); |
| 116 | return ACL_ERROR_API_NOT_SUPPORT; | 116 | return ACL_ERROR_API_NOT_SUPPORT; |
| 117 | } | 117 | } |
| 118 | if (acl::array_utils::IsHostMemTensorDesc(numOutputs, outputDesc) != ACL_SUCCESS) { | 118 | if (acl::array_utils::IsHostMemTensorDesc(numOutputs, outputDesc) != ACL_SUCCESS) { |
| 119 | ACL_LOG_INNER_ERROR( | 119 | ACL_LOG_INNER_ERROR( |
| 120 | "[Check][HostMemTensorDesc]aclopCreateHandle ACL_MEMTYPE_HOST or " | 120 | "[Check][HostMemTensorDesc]aclopCreateHandle ACL_MEMTYPE_HOST or " |
| 121 | - "ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT placeMent in outputDesc not support"); | 121 | + "ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT placeMent in outputDesc is not supported"); |
| 122 | return ACL_ERROR_API_NOT_SUPPORT; | 122 | return ACL_ERROR_API_NOT_SUPPORT; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| @@ -309,7 +309,7 @@ aclError OpExecutor::DoExecuteAsync(ge::DynamicSingleOp *const singleOp, const A | |||
| 309 | for (size_t i = 0U; i < outputDesc->size(); ++i) { | 309 | for (size_t i = 0U; i < outputDesc->size(); ++i) { |
| 310 | const ge::GeShape outputShape = (*outputDesc)[i].GetShape(); | 310 | const ge::GeShape outputShape = (*outputDesc)[i].GetShape(); |
| 311 | const std::vector<int64_t> outputDims = outputShape.GetDims(); | 311 | const std::vector<int64_t> outputDims = outputShape.GetDims(); |
| 312 | - ACL_LOG_INFO("update outputDesc[%zu] dims is [%s]", i, StringUtils::VectorToString(outputDims).c_str()); | 312 | + ACL_LOG_INFO("update outputDesc[%zu] dims are [%s]", i, StringUtils::VectorToString(outputDims).c_str()); |
| 313 | ConvertVecToSvec(outputDims, const_cast<aclTensorDesc *>(aclOp.outputDesc[i])->dims); | 313 | ConvertVecToSvec(outputDims, const_cast<aclTensorDesc *>(aclOp.outputDesc[i])->dims); |
| 314 | } | 314 | } |
| 315 | ACL_LOG_INFO("update outputDesc successfully"); | 315 | ACL_LOG_INFO("update outputDesc successfully"); |
| @@ -321,7 +321,7 @@ aclError OpExecutor::DoExecuteAsync(ge::DynamicSingleOp *const singleOp, const A | |||
| 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(); |
| 324 | - ACL_LOG_INFO("update outputDesc[%zu] dims is [%s]", i, StringUtils::VectorToString(outputOriShape).c_str()); | 324 | + ACL_LOG_INFO("update outputDesc[%zu] dims are [%s]", i, StringUtils::VectorToString(outputOriShape).c_str()); |
| 325 | ConvertVecToSvec(outputOriShape, const_cast<aclTensorDesc *>(aclOp.outputDesc[i])->dims); | 325 | ConvertVecToSvec(outputOriShape, const_cast<aclTensorDesc *>(aclOp.outputDesc[i])->dims); |
| 326 | } | 326 | } |
| 327 | ACL_LOG_INFO("update outputDesc origin shape successfully"); | 327 | ACL_LOG_INFO("update outputDesc origin shape successfully"); |
| @@ -168,7 +168,7 @@ bool AclOpMap<T>::CheckValueRange(const AclOp &op, const T &entry) const { | |||
| 168 | ACL_LOG_INFO("the input [%zu] needs to check value range", i); | 168 | ACL_LOG_INFO("the input [%zu] needs to check value range", i); |
| 169 | if (!attr_utils::ValueRangeCheck(entry->inputDescArr[i].valueRange, op.inputs[i], | 169 | if (!attr_utils::ValueRangeCheck(entry->inputDescArr[i].valueRange, op.inputs[i], |
| 170 | entry->inputDescArr[i].dataType)) { | 170 | entry->inputDescArr[i].dataType)) { |
| 171 | - ACL_LOG_DEBUG("ValueRangeCheck input is not match"); | 171 | + ACL_LOG_DEBUG("ValueRangeCheck input does not match"); |
| 172 | return false; | 172 | return false; |
| 173 | } | 173 | } |
| 174 | } | 174 | } |
| @@ -178,7 +178,7 @@ bool AclOpMap<T>::CheckValueRange(const AclOp &op, const T &entry) const { | |||
| 178 | ACL_LOG_INFO("the output [%zu] needs to check value range", i); | 178 | ACL_LOG_INFO("the output [%zu] needs to check value range", i); |
| 179 | if (!attr_utils::ValueRangeCheck(entry->outputDescArr[i].valueRange, op.outputs[i], | 179 | if (!attr_utils::ValueRangeCheck(entry->outputDescArr[i].valueRange, op.outputs[i], |
| 180 | entry->outputDescArr[i].dataType)) { | 180 | entry->outputDescArr[i].dataType)) { |
| 181 | - ACL_LOG_DEBUG("ValueRangeCheck output is not match"); | 181 | + ACL_LOG_DEBUG("ValueRangeCheck output does not match"); |
| 182 | return false; | 182 | return false; |
| 183 | } | 183 | } |
| 184 | } | 184 | } |
| @@ -288,7 +288,7 @@ aclError aclmdlSetConfigOpt(aclmdlConfigHandle *handle, aclmdlConfigAttr attr, c | |||
| 288 | return ret; | 288 | return ret; |
| 289 | } | 289 | } |
| 290 | } else { | 290 | } else { |
| 291 | - ACL_LOG_INNER_ERROR("not support this attr."); | 291 | + ACL_LOG_INNER_ERROR("This attr is not supported."); |
| 292 | return ACL_ERROR_INVALID_PARAM; | 292 | return ACL_ERROR_INVALID_PARAM; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| @@ -113,7 +113,7 @@ aclError aclmdlSetExecConfigOpt(aclmdlExecConfigHandle *handle, aclmdlExecConfig | |||
| 113 | return ret; | 113 | return ret; |
| 114 | } | 114 | } |
| 115 | } else { | 115 | } else { |
| 116 | - ACL_LOG_INNER_ERROR("not support set this attr."); | 116 | + ACL_LOG_INNER_ERROR("Setting this attr is not supported."); |
| 117 | return ACL_ERROR_INVALID_PARAM; | 117 | return ACL_ERROR_INVALID_PARAM; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| @@ -601,7 +601,7 @@ domi::Status InitDomiOmgContext(const std::string &input_shape, const std::strin | |||
| 601 | std::vector<const char *>({input_format.c_str(), "input_format", | 601 | std::vector<const char *>({input_format.c_str(), "input_format", |
| 602 | "ND, NCHW, NHWC, CHWN, NC1HWC0 or NHWC1C0"})); | 602 | "ND, NCHW, NHWC, CHWN, NC1HWC0 or NHWC1C0"})); |
| 603 | GELOGE(PARAM_INVALID, | 603 | GELOGE(PARAM_INVALID, |
| 604 | - "[Check][Param]Input format %s not support, " | 604 | + "[Check][Param]Input format %s is not supported, " |
| 605 | "expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.", | 605 | "expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.", |
| 606 | input_format.c_str()); | 606 | input_format.c_str()); |
| 607 | return PARAM_INVALID; | 607 | return PARAM_INVALID; |
| @@ -1280,7 +1280,7 @@ FMK_FUNC_HOST_VISIBILITY domi::Status ConvertFwkModelToJson(const domi::Framewor | |||
| 1280 | "The framework must be selected from {0(Caffe), 3(TensorFlow), 5(Onnx)} when model is set to 1(JSON)."})); | 1280 | "The framework must be selected from {0(Caffe), 3(TensorFlow), 5(Onnx)} when model is set to 1(JSON)."})); |
| 1281 | GELOGE(PARAM_INVALID, | 1281 | GELOGE(PARAM_INVALID, |
| 1282 | "[Check][Param]Input parameter[--framework] is mandatory " | 1282 | "[Check][Param]Input parameter[--framework] is mandatory " |
| 1283 | - "and it's value must be: 0(Caffe) 3(TensorFlow) or 5(Onnx)."); | 1283 | + "and its value must be: 0(Caffe) 3(TensorFlow) or 5(Onnx)."); |
| 1284 | return PARAM_INVALID; | 1284 | return PARAM_INVALID; |
| 1285 | } | 1285 | } |
| 1286 | 1286 | ||
| @@ -38,7 +38,8 @@ inline std::vector<int64_t> ShapeToDims(const gert::Shape &shape) { | |||
| 38 | 38 | ||
| 39 | inline gert::Shape DimsToShape(const std::vector<int64_t> &dims) { | 39 | inline gert::Shape DimsToShape(const std::vector<int64_t> &dims) { |
| 40 | if (dims.size() > gert::Shape::kMaxDimNum) { | 40 | if (dims.size() > gert::Shape::kMaxDimNum) { |
| 41 | - throw std::invalid_argument("shape dimension number exceeds gert::Shape::kMaxDimNum"); | 41 | + throw std::invalid_argument("shape dimension number " + std::to_string(dims.size()) + |
| 42 | + " exceeds gert::Shape::kMaxDimNum"); | ||
| 42 | } | 43 | } |
| 43 | gert::Shape shape; | 44 | gert::Shape shape; |
| 44 | for (const auto dim : dims) { | 45 | for (const auto dim : dims) { |
| @@ -161,7 +162,8 @@ class PYBIND11_EXPORT NativeShape : public NativeObjectBase<gert::Shape> { | |||
| 161 | int64_t GetDim(size_t index) const { | 162 | int64_t GetDim(size_t index) const { |
| 162 | const auto dim_num = Get()->GetDimNum(); | 163 | const auto dim_num = Get()->GetDimNum(); |
| 163 | if (index >= dim_num) { | 164 | if (index >= dim_num) { |
| 164 | - throw std::invalid_argument("shape dimension index out of range"); | 165 | + throw std::invalid_argument("shape dimension index " + std::to_string(index) + |
| 166 | + " out of range, dim_num=" + std::to_string(dim_num)); | ||
| 165 | } | 167 | } |
| 166 | return Get()->GetDim(index); | 168 | return Get()->GetDim(index); |
| 167 | } | 169 | } |
| @@ -169,7 +171,8 @@ class PYBIND11_EXPORT NativeShape : public NativeObjectBase<gert::Shape> { | |||
| 169 | void SetDim(size_t index, int64_t value) const { | 171 | void SetDim(size_t index, int64_t value) const { |
| 170 | auto *shape = MutableGet(); | 172 | auto *shape = MutableGet(); |
| 171 | if (index >= shape->GetDimNum()) { | 173 | if (index >= shape->GetDimNum()) { |
| 172 | - throw std::invalid_argument("shape dimension index out of range"); | 174 | + throw std::invalid_argument("shape dimension index " + std::to_string(index) + |
| 175 | + " out of range, dim_num=" + std::to_string(shape->GetDimNum())); | ||
| 173 | } | 176 | } |
| 174 | shape->SetDim(index, value); | 177 | shape->SetDim(index, value); |
| 175 | } | 178 | } |
| @@ -292,7 +295,8 @@ class PYBIND11_EXPORT NativeTensorDesc : public NativeObjectBase<NativeTensorDes | |||
| 292 | 295 | ||
| 293 | const auto dims_list = shape.cast<py::list>(); | 296 | const auto dims_list = shape.cast<py::list>(); |
| 294 | if (dims_list.size() > gert::Shape::kMaxDimNum) { | 297 | if (dims_list.size() > gert::Shape::kMaxDimNum) { |
| 295 | - throw std::invalid_argument("shape exceeds maximum dimension count"); | 298 | + throw std::invalid_argument("shape dimension number " + std::to_string(dims_list.size()) + |
| 299 | + " exceeds maximum dimension count"); | ||
| 296 | } | 300 | } |
| 297 | std::vector<int64_t> dims; | 301 | std::vector<int64_t> dims; |
| 298 | dims.reserve(dims_list.size()); | 302 | dims.reserve(dims_list.size()); |
| @@ -531,7 +531,7 @@ Status Session::RemoveGraph(uint32_t graph_id) { | |||
| 531 | // Print Output Result | 531 | // Print Output Result |
| 532 | static void PrintOutputResult(std::vector<Tensor> &outputs) { | 532 | static void PrintOutputResult(std::vector<Tensor> &outputs) { |
| 533 | if (outputs.empty() || (outputs[0].GetData() == nullptr)) { | 533 | if (outputs.empty() || (outputs[0].GetData() == nullptr)) { |
| 534 | - GELOGW("outputs is empty or data is nullptr."); | 534 | + GELOGW("outputs are empty or data is nullptr."); |
| 535 | return; | 535 | return; |
| 536 | } | 536 | } |
| 537 | 537 | ||
| @@ -624,7 +624,7 @@ Status GeSession::RemoveGraph(uint32_t graph_id) { | |||
| 624 | 624 | ||
| 625 | static void PrintOutputResult(std::vector<gert::Tensor> &outputs) { | 625 | static void PrintOutputResult(std::vector<gert::Tensor> &outputs) { |
| 626 | if (outputs.empty() || (outputs[0].GetAddr() == nullptr)) { | 626 | if (outputs.empty() || (outputs[0].GetAddr() == nullptr)) { |
| 627 | - GELOGW("outputs is empty or data is nullptr."); | 627 | + GELOGW("outputs are empty or data is nullptr."); |
| 628 | return; | 628 | return; |
| 629 | } | 629 | } |
| 630 | 630 | ||
| @@ -331,7 +331,7 @@ Status JitExecutor::LoadGraph(UserGraphExecution &task) { | |||
| 331 | 331 | ||
| 332 | auto gep = ep->FindGuarded(*task.external_rt_inputs); | 332 | auto gep = ep->FindGuarded(*task.external_rt_inputs); |
| 333 | if (gep == nullptr || !gep->Compiled()) { | 333 | if (gep == nullptr || !gep->Compiled()) { |
| 334 | - GELOGE(ge::FAILED, "Guard is not exist or Compiled EP[%ld], USER_GRAPH[%u]", ep->GetId(), task.user_graph_id); | 334 | + GELOGE(ge::FAILED, "Guard does not exist or Compiled EP[%ld], USER_GRAPH[%u]", ep->GetId(), task.user_graph_id); |
| 335 | return FAILED; | 335 | return FAILED; |
| 336 | } | 336 | } |
| 337 | GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(), | 337 | GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(), |
| @@ -292,7 +292,7 @@ CompiledGraphSummaryPtr UserGraphControl::GetCompiledGraphSummary() { | |||
| 292 | GELOGI("GetCompiledGraphSummary USER_GRAPH[%u]", user_graph_id_); | 292 | GELOGI("GetCompiledGraphSummary USER_GRAPH[%u]", user_graph_id_); |
| 293 | ExecutionPoint *ep = order_.GetFirstPoint(); | 293 | ExecutionPoint *ep = order_.GetFirstPoint(); |
| 294 | if (ep == nullptr) { | 294 | if (ep == nullptr) { |
| 295 | - GELOGI("CompiledGraph is not exist. USER_GRAPH[%u]", user_graph_id_); | 295 | + GELOGI("CompiledGraph does not exist. USER_GRAPH[%u]", user_graph_id_); |
| 296 | return nullptr; | 296 | return nullptr; |
| 297 | } | 297 | } |
| 298 | GELOGD("Get EP[%ld] of USER_GRAPH[%u] for GetCompiledGraphSummary", ep->GetId(), user_graph_id_); | 298 | GELOGD("Get EP[%ld] of USER_GRAPH[%u] for GetCompiledGraphSummary", ep->GetId(), user_graph_id_); |
| @@ -303,7 +303,7 @@ CompiledGraphSummaryPtr UserGraphControl::GetCompiledGraphSummary() { | |||
| 303 | 303 | ||
| 304 | auto gep = ep->FindGuarded(inputs); | 304 | auto gep = ep->FindGuarded(inputs); |
| 305 | if (gep == nullptr || !gep->Compiled()) { | 305 | if (gep == nullptr || !gep->Compiled()) { |
| 306 | - GELOGD("Guard is not exist or Compiled"); | 306 | + GELOGD("Guard does not exist or Compiled"); |
| 307 | return nullptr; | 307 | return nullptr; |
| 308 | } | 308 | } |
| 309 | GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(), | 309 | GELOGD("Get GEP[compiled_graph_id:%u] [compiled? %d] of EP[%ld] USER_GRAPH[%u].", gep->GetCompiledGraphId(), |
| @@ -23,7 +23,7 @@ namespace ge { | |||
| 23 | 23 | ||
| 24 | ComputeGraphPtr BinaryGraphBuilder::BuildGraph(const std::vector<NodePtr> &nodes, const std::string &name) const { | 24 | ComputeGraphPtr BinaryGraphBuilder::BuildGraph(const std::vector<NodePtr> &nodes, const std::string &name) const { |
| 25 | if (nodes.empty()) { | 25 | if (nodes.empty()) { |
| 26 | - GELOGE(ge::FAILED, "nodes is empty, no need to build graph:%s", name.c_str()); | 26 | + GELOGE(ge::FAILED, "nodes are empty, no need to build graph:%s", name.c_str()); |
| 27 | return nullptr; | 27 | return nullptr; |
| 28 | } | 28 | } |
| 29 | std::unordered_set<NodePtr> nodes_set(nodes.begin(), nodes.end()); | 29 | std::unordered_set<NodePtr> nodes_set(nodes.begin(), nodes.end()); |
| @@ -134,7 +134,7 @@ Status UserHybridGraphManager::RecordDynamicGearInfo(const uint32_t graph_id) { | |||
| 134 | dynamic_dims_info.dynamic_shape_dims.emplace_back(std::move(tmp_dims)); | 134 | dynamic_dims_info.dynamic_shape_dims.emplace_back(std::move(tmp_dims)); |
| 135 | } | 135 | } |
| 136 | for (size_t i = 0U; i < dynamic_dims_info.dynamic_shape_dims.size(); ++i) { | 136 | for (size_t i = 0U; i < dynamic_dims_info.dynamic_shape_dims.size(); ++i) { |
| 137 | - GELOGI("index %zu dynamic dims is %s", i, ToString(dynamic_dims_info.dynamic_shape_dims[i]).c_str()); | 137 | + GELOGI("index %zu dynamic dims are %s", i, ToString(dynamic_dims_info.dynamic_shape_dims[i]).c_str()); |
| 138 | } | 138 | } |
| 139 | for (size_t i = 0U; i < dynamic_dims_info.user_input_dims.size(); ++i) { | 139 | for (size_t i = 0U; i < dynamic_dims_info.user_input_dims.size(); ++i) { |
| 140 | const auto &input_dims_map = dynamic_dims_info.user_input_dims[i]; | 140 | const auto &input_dims_map = dynamic_dims_info.user_input_dims[i]; |
| @@ -188,7 +188,7 @@ bool DumpManager::NeedDoDump(const DumpConfig &dump_config, DumpProperties &dump | |||
| 188 | return false; | 188 | return false; |
| 189 | } | 189 | } |
| 190 | if ((dump_config.dump_status == kDumpOn) && (dump_config.dump_debug == kDumpOn)) { | 190 | if ((dump_config.dump_status == kDumpOn) && (dump_config.dump_debug == kDumpOn)) { |
| 191 | - GELOGW("Not support coexistence of dump debug and dump status."); | 191 | + GELOGW("Does not support coexistence of dump debug and dump status."); |
| 192 | return false; | 192 | return false; |
| 193 | } | 193 | } |
| 194 | return true; | 194 | return true; |
| @@ -176,7 +176,7 @@ Status DumpProperties::CheckEnableDump(const std::string &input) const { | |||
| 176 | std::vector<const char *>({ge::GetContext().GetReadableName("ge.exec.enableDump").c_str(), input.c_str(), | 176 | std::vector<const char *>({ge::GetContext().GetReadableName("ge.exec.enableDump").c_str(), input.c_str(), |
| 177 | "The value must be 1 or 0."})); | 177 | "The value must be 1 or 0."})); |
| 178 | GELOGE(PARAM_INVALID, | 178 | GELOGE(PARAM_INVALID, |
| 179 | - "[Check][Param] Not support ge.exec.enableDump or ge.exec.enableDumpDebug format:%s, " | 179 | + "[Check][Param] Does not support ge.exec.enableDump or ge.exec.enableDumpDebug format:%s, " |
| 180 | "only support 1 or 0.", | 180 | "only support 1 or 0.", |
| 181 | input.c_str()); | 181 | input.c_str()); |
| 182 | return PARAM_INVALID; | 182 | return PARAM_INVALID; |
| @@ -82,7 +82,7 @@ ge::Status ConvertToMobileTensorDescriptor(const ge::proto::TensorDescriptor &td | |||
| 82 | mobile_td->set_name(td.name()); | 82 | mobile_td->set_name(td.name()); |
| 83 | mobile_td->set_dtype(ConvertToMobileDataType(td.dtype())); | 83 | mobile_td->set_dtype(ConvertToMobileDataType(td.dtype())); |
| 84 | if (td.shape().dim().size() > 0) { | 84 | if (td.shape().dim().size() > 0) { |
| 85 | - GE_ASSERT_TRUE(mobile_td->dtype() != ge::mobile::proto::DataType::DT_UNDEFINED, "[Mobile] dtype is not support."); | 85 | + GE_ASSERT_TRUE(mobile_td->dtype() != ge::mobile::proto::DataType::DT_UNDEFINED, "[Mobile] dtype is not supported."); |
| 86 | } else { | 86 | } else { |
| 87 | GELOGD("[Mobile] desc shape is null, should not check dtype."); | 87 | GELOGD("[Mobile] desc shape is null, should not check dtype."); |
| 88 | } | 88 | } |
| @@ -421,7 +421,7 @@ ge::Status CreateCompiledModelBuffer(OmFileSaveHelper &om_file_save_helper, ge:: | |||
| 421 | ret = SetCompiledPartionData(base_ptr, total_size, {weights_info_buffer}, offset, align_offset); | 421 | ret = SetCompiledPartionData(base_ptr, total_size, {weights_info_buffer}, offset, align_offset); |
| 422 | GE_ASSERT_TRUE(ret == ge::SUCCESS, "[Mobile] set compiled partition data (weights info buffer) failed."); | 422 | GE_ASSERT_TRUE(ret == ge::SUCCESS, "[Mobile] set compiled partition data (weights info buffer) failed."); |
| 423 | } else { | 423 | } else { |
| 424 | - GELOGI("[Mobile] not support save weight info data."); | 424 | + GELOGI("[Mobile] Saving weight info data is not supported."); |
| 425 | } | 425 | } |
| 426 | return ge::SUCCESS; | 426 | return ge::SUCCESS; |
| 427 | } | 427 | } |
| @@ -456,7 +456,7 @@ Status ModelBufferSaver::SaveCompiledModelToBuffer(const ge::GeModelPtr &ge_mode | |||
| 456 | SaveCompiledPartion(om_file_save_helper, ModelPartitionType::WEIGHT_INFO, {weights_info_buffer}, align_offset); | 456 | SaveCompiledPartion(om_file_save_helper, ModelPartitionType::WEIGHT_INFO, {weights_info_buffer}, align_offset); |
| 457 | GE_ASSERT_TRUE(ret == SUCCESS, "[Mobile] save compiled partition TASK_INFO failed."); | 457 | GE_ASSERT_TRUE(ret == SUCCESS, "[Mobile] save compiled partition TASK_INFO failed."); |
| 458 | } else { | 458 | } else { |
| 459 | - GELOGI("[Mobile] not support save WEIGHT_INFO."); | 459 | + GELOGI("[Mobile] Saving WEIGHT_INFO is not supported."); |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | ret = SaveModelFileHeader(om_file_save_helper, model_info); | 462 | ret = SaveModelFileHeader(om_file_save_helper, model_info); |
| @@ -307,7 +307,7 @@ ge::Status ParseArgsFormat(const std::string &args_format, | |||
| 307 | } else if (sm_with_shape_info[1] == "o") { | 307 | } else if (sm_with_shape_info[1] == "o") { |
| 308 | group_index = output_group_index++; | 308 | group_index = output_group_index++; |
| 309 | } else { | 309 | } else { |
| 310 | - GELOGE(ge::FAILED, "[Mobile] sm_with_shape_info[1] is not support, failed."); | 310 | + GELOGE(ge::FAILED, "[Mobile] sm_with_shape_info[1] is not supported, failed."); |
| 311 | return ge::FAILED; | 311 | return ge::FAILED; |
| 312 | } | 312 | } |
| 313 | arg_infos_with_shape_info.push_back(KernelArgInfoWithShapeInfo(sm_with_shape_info[1], "desc", group_index, add)); | 313 | arg_infos_with_shape_info.push_back(KernelArgInfoWithShapeInfo(sm_with_shape_info[1], "desc", group_index, add)); |
| @@ -93,7 +93,7 @@ void UpdateFftsPlusTaskAddr(domi::TaskDef &task_def, const std::map<int64_t, int | |||
| 93 | mutable_mix_aic_aiv_ctx->set_task_addr(k, static_cast<uint64_t>(it->second)); | 93 | mutable_mix_aic_aiv_ctx->set_task_addr(k, static_cast<uint64_t>(it->second)); |
| 94 | GELOGD("update task_addr[%d], [%ld] to [%ld]", k, orig_task_addr, it->second); | 94 | GELOGD("update task_addr[%d], [%ld] to [%ld]", k, orig_task_addr, it->second); |
| 95 | } else { | 95 | } else { |
| 96 | - GELOGW("update task_addr[%d] [%ld] NOT match", k, orig_task_addr); | 96 | + GELOGW("update task_addr[%d] [%ld] does not match", k, orig_task_addr); |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| @@ -38,7 +38,7 @@ Status NanoModelSaveHelper::SaveToOmRootModel(const GeRootModelPtr &ge_root_mode | |||
| 38 | "E10055", std::vector<const char *>({"reason"}), | 38 | "E10055", std::vector<const char *>({"reason"}), |
| 39 | std::vector<const char *>( | 39 | std::vector<const char *>( |
| 40 | {"Dynamic shape is not supported when the ATC tool is used for model conversion on a nano chip"})); | 40 | {"Dynamic shape is not supported when the ATC tool is used for model conversion on a nano chip"})); |
| 41 | - GELOGE(FAILED, "[Save][Model] Unknown shape not support."); | 41 | + GELOGE(FAILED, "[Save][Model] Unknown shape is not supported."); |
| 42 | return PARAM_INVALID; | 42 | return PARAM_INVALID; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| @@ -281,7 +281,7 @@ Status OmFileLoadHelper::CheckModelCompatibility(const Model &model) const { | |||
| 281 | (void)REPORT_PREDEFINED_ERR_MSG( | 281 | (void)REPORT_PREDEFINED_ERR_MSG( |
| 282 | "E10001", std::vector<const char *>({"parameter", "value", "reason"}), | 282 | "E10001", std::vector<const char *>({"parameter", "value", "reason"}), |
| 283 | std::vector<const char *>({"soc_version", model_soc_version.c_str(), reason.c_str()})); | 283 | std::vector<const char *>({"soc_version", model_soc_version.c_str(), reason.c_str()})); |
| 284 | - GELOGE(PARAM_INVALID, "Model soc version[%s] is not support in this device", model_soc_version.c_str()); | 284 | + GELOGE(PARAM_INVALID, "Model soc version[%s] is not supported in this device", model_soc_version.c_str()); |
| 285 | return PARAM_INVALID; | 285 | return PARAM_INVALID; |
| 286 | } | 286 | } |
| 287 | return SUCCESS; | 287 | return SUCCESS; |
| @@ -33,7 +33,7 @@ Status PreModelHelper::SaveToOmRootModel(const GeRootModelPtr &ge_root_model, co | |||
| 33 | GE_ASSERT_TRUE(!(name_to_ge_model.empty()), "[Get][SubModel] ge_root_model has no sub model"); | 33 | GE_ASSERT_TRUE(!(name_to_ge_model.empty()), "[Get][SubModel] ge_root_model has no sub model"); |
| 34 | GE_ASSERT_TRUE(!(output_file.empty()), "[Save][Model] GraphBuilder SaveModel received invalid file name prefix"); | 34 | GE_ASSERT_TRUE(!(output_file.empty()), "[Save][Model] GraphBuilder SaveModel received invalid file name prefix"); |
| 35 | if (is_unknown_shape) { | 35 | if (is_unknown_shape) { |
| 36 | - GELOGE(FAILED, "[Save][Model] Unknown shape not support."); | 36 | + GELOGE(FAILED, "[Save][Model] Unknown shape is not supported."); |
| 37 | return PARAM_INVALID; | 37 | return PARAM_INVALID; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| @@ -487,7 +487,7 @@ Status Om2ModelUtils::ConstructWorkspaceAddr(const TaskSemanticContributeContext | |||
| 487 | AddrSemantic &workspace_addr) { | 487 | AddrSemantic &workspace_addr) { |
| 488 | const bool aicpu_work_space = attrs.has_reuse_flag && (index < attrs.reuse_flag.size()) && (!attrs.reuse_flag[index]); | 488 | const bool aicpu_work_space = attrs.has_reuse_flag && (index < attrs.reuse_flag.size()) && (!attrs.reuse_flag[index]); |
| 489 | if (aicpu_work_space) { | 489 | if (aicpu_work_space) { |
| 490 | - GELOGE(FAILED, "[OM2] Aicpu task not support append workspace addrs for now."); | 490 | + GELOGE(FAILED, "[OM2] Appending workspace addresses is not supported for AICPU tasks."); |
| 491 | return FAILED; | 491 | return FAILED; |
| 492 | } | 492 | } |
| 493 | const bool session_scope_memory = attrs.has_no_reuse_scope && (index < attrs.no_reuse_scope.size()) && | 493 | const bool session_scope_memory = attrs.has_no_reuse_scope && (index < attrs.no_reuse_scope.size()) && |
| @@ -407,16 +407,17 @@ Status ModelAdapter::GenInputMemAllocations(const std::map<uint32_t, OpDescPtr> | |||
| 407 | input_indexes_to_copy_info_[input_index] = {static_cast<uint32_t>(mem_allocation_and_offset.id), | 407 | input_indexes_to_copy_info_[input_index] = {static_cast<uint32_t>(mem_allocation_and_offset.id), |
| 408 | mem_allocation_and_offset.offset, data_size}; | 408 | mem_allocation_and_offset.offset, data_size}; |
| 409 | GELOGW( | 409 | GELOGW( |
| 410 | - "[OM2][mem allocation][input] model_name %s, input_index %u, op_name %s op_type %s not support zero copy, " | 410 | + "[OM2][mem allocation][input] model_name %s, input_index %u, op_name %s op_type %s does not support zero " |
| 411 | + "copy, " | ||
| 411 | "%s.", | 412 | "%s.", |
| 412 | name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str(), | 413 | name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str(), |
| 413 | input_indexes_to_copy_info_[input_index].ToString().c_str()); | 414 | input_indexes_to_copy_info_[input_index].ToString().c_str()); |
| 414 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), | 415 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), |
| 415 | - "[OM2] model_name %s, input_index %u, op_name %s op_type %s not support zero copy", | 416 | + "[OM2] model_name %s, input_index %u, op_name %s op_type %s does not support zero copy", |
| 416 | name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); | 417 | name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); |
| 417 | if (copy_host_input_indexes_.count(input_index) != 0U) { | 418 | if (copy_host_input_indexes_.count(input_index) != 0U) { |
| 418 | - GELOGW("[OM2] model_name %s, host_input_index %u, op_name %s op_type %s not support zero copy", name_.c_str(), | 419 | + GELOGW("[OM2] model_name %s, host_input_index %u, op_name %s op_type %s does not support zero copy", |
| 419 | - input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); | 420 | + name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); |
| 420 | } | 421 | } |
| 421 | 422 | ||
| 422 | input_index++; | 423 | input_index++; |
| @@ -452,7 +453,7 @@ Status ModelAdapter::GenInputMemAllocations(const std::map<uint32_t, OpDescPtr> | |||
| 452 | zero_copy_input_indexes_.push_back(input_index); | 453 | zero_copy_input_indexes_.push_back(input_index); |
| 453 | if (copy_host_input_indexes_.count(input_index) > 0U) { | 454 | if (copy_host_input_indexes_.count(input_index) > 0U) { |
| 454 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), | 455 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), |
| 455 | - "[OM2] model_name %s, input_index %u, op_name %s op_type %s not support host input index ", | 456 | + "[OM2] model_name %s, input_index %u, op_name %s op_type %s does not support host input index ", |
| 456 | name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); | 457 | name_.c_str(), input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); |
| 457 | CopyHostInputInfo copy_host_input = {}; | 458 | CopyHostInputInfo copy_host_input = {}; |
| 458 | copy_host_input.input_index = input_index; | 459 | copy_host_input.input_index = input_index; |
| @@ -524,7 +525,7 @@ Status ModelAdapter::GenOutputMemAllocations(const std::vector<OpDescPtr> &outpu | |||
| 524 | uint32_t id = 0xFFFFFFFFU; | 525 | uint32_t id = 0xFFFFFFFFU; |
| 525 | uint64_t offset = logical_addr; | 526 | uint64_t offset = logical_addr; |
| 526 | if (mem_types[i] != kVarMemType) { | 527 | if (mem_types[i] != kVarMemType) { |
| 527 | - GE_ASSERT_TRUE(ret == SUCCESS, "[OM2] not find 0x%" PRIx64 " in allocating table", logical_addr); | 528 | + GE_ASSERT_TRUE(ret == SUCCESS, "[OM2] not found 0x%" PRIx64 " in allocating table", logical_addr); |
| 528 | id = static_cast<uint32_t>(mem_allocation_and_offset.id); | 529 | id = static_cast<uint32_t>(mem_allocation_and_offset.id); |
| 529 | offset = mem_allocation_and_offset.offset; | 530 | offset = mem_allocation_and_offset.offset; |
| 530 | } | 531 | } |
| @@ -399,7 +399,7 @@ Status ModelArgsManager::ConstructOneTaskUpdateData( | |||
| 399 | 399 | ||
| 400 | if (require_placement == ArgsPlacement::kArgsPlacementSqe) { | 400 | if (require_placement == ArgsPlacement::kArgsPlacementSqe) { |
| 401 | GE_ASSERT_TRUE(!task_update_data.has_sqe_placement, | 401 | GE_ASSERT_TRUE(!task_update_data.has_sqe_placement, |
| 402 | - "[OM2] More than one placement-sqe tasks found in task %zu, not support yet", task_index); | 402 | + "[OM2] More than one placement-sqe tasks found in task %zu, not supported yet", task_index); |
| 403 | task_update_data.has_sqe_placement = true; | 403 | task_update_data.has_sqe_placement = true; |
| 404 | task_update_data.sqe_update_arg.stream_id = std::numeric_limits<uint32_t>::max(); | 404 | task_update_data.sqe_update_arg.stream_id = std::numeric_limits<uint32_t>::max(); |
| 405 | task_update_data.sqe_update_arg.task_id = std::numeric_limits<uint32_t>::max(); | 405 | task_update_data.sqe_update_arg.task_id = std::numeric_limits<uint32_t>::max(); |
| @@ -588,7 +588,7 @@ Status ModelUtils::GetInputOutputDescAddrs(const RuntimeParam &model_param, cons | |||
| 588 | return RT_ERROR_TO_GE_STATUS(rt_ret); | 588 | return RT_ERROR_TO_GE_STATUS(rt_ret); |
| 589 | } | 589 | } |
| 590 | v_addrs[tensor_cnt] = mem_addr; | 590 | v_addrs[tensor_cnt] = mem_addr; |
| 591 | - GELOGD("[OM2]Calc op[%s] tenser[%zu] desc addr[%p] ok", op_desc->GetName().c_str(), tensor_cnt, mem_addr); | 591 | + GELOGD("[OM2]Calc op[%s] tensor[%zu] desc addr[%p] ok", op_desc->GetName().c_str(), tensor_cnt, mem_addr); |
| 592 | tensor_cnt++; | 592 | tensor_cnt++; |
| 593 | } | 593 | } |
| 594 | return SUCCESS; | 594 | return SUCCESS; |
| @@ -240,7 +240,7 @@ std::vector<std::pair<uint64_t, uint32_t>> PreModelUtils::GetWorkspaceDataAddrOf | |||
| 240 | const bool aicpu_work_space = | 240 | const bool aicpu_work_space = |
| 241 | (has_workspace_reuse && (i < workspace_reuse_flag.size()) && (!workspace_reuse_flag[i])); | 241 | (has_workspace_reuse && (i < workspace_reuse_flag.size()) && (!workspace_reuse_flag[i])); |
| 242 | if (aicpu_work_space) { | 242 | if (aicpu_work_space) { |
| 243 | - GELOGW("not support aicpu work space, pls check."); | 243 | + GELOGW("AICPU workspace is not supported. Please check."); |
| 244 | continue; | 244 | continue; |
| 245 | } | 245 | } |
| 246 | const bool session_scope_memory = (has_workspace_no_reuse_scope) && (i < workspace_no_reuse_scope.size()); | 246 | const bool session_scope_memory = (has_workspace_no_reuse_scope) && (i < workspace_no_reuse_scope.size()); |
| @@ -341,7 +341,7 @@ Status TransFormatFromFracZzToNd(const TransArgs &args, TransResult &result, con | |||
| 341 | Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult &result) { | 341 | Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult &result) { |
| 342 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { | 342 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { |
| 343 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, | 343 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, |
| 344 | - "[Check][Datatype]Failed, not support trans format from %s to %s, " | 344 | + "[Check][Datatype] Format conversion from %s to %s is not supported, " |
| 345 | "src shape %s, dst shape %s, data type %s", | 345 | "src shape %s, dst shape %s, data type %s", |
| 346 | TypeUtils::FormatToSerialString(args.src_format).c_str(), | 346 | TypeUtils::FormatToSerialString(args.src_format).c_str(), |
| 347 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 347 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -357,7 +357,7 @@ Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult & | |||
| 357 | } | 357 | } |
| 358 | if ((!CheckShape(args.src_primary_format, args.src_shape)) || (!IsShapeValid(args.dst_shape))) { | 358 | if ((!CheckShape(args.src_primary_format, args.src_shape)) || (!IsShapeValid(args.dst_shape))) { |
| 359 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | 359 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, |
| 360 | - "[Check][Shape]Failed, not support trans format from %s to %s, " | 360 | + "[Check][Shape] Format conversion from %s to %s is not supported, " |
| 361 | "src shape %s, dst shape %s, data type %s", | 361 | "src shape %s, dst shape %s, data type %s", |
| 362 | TypeUtils::FormatToSerialString(args.src_primary_format).c_str(), | 362 | TypeUtils::FormatToSerialString(args.src_primary_format).c_str(), |
| 363 | TypeUtils::FormatToSerialString(args.dst_primary_format).c_str(), ShapeToString(args.src_shape).c_str(), | 363 | TypeUtils::FormatToSerialString(args.dst_primary_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -393,7 +393,7 @@ Status FormatTransferFractalZz::TransShape(const Format src_format, const std::v | |||
| 393 | std::vector<int64_t> &dst_shape) { | 393 | std::vector<int64_t> &dst_shape) { |
| 394 | if (!CheckDataTypeSupportForFractalZz(data_type)) { | 394 | if (!CheckDataTypeSupportForFractalZz(data_type)) { |
| 395 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, | 395 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, |
| 396 | - "[Check][Datatype]Failed, not support trans format from %s to %s, " | 396 | + "[Check][Datatype] Format conversion from %s to %s is not supported, " |
| 397 | "src shape %s, data type %s", | 397 | "src shape %s, data type %s", |
| 398 | TypeUtils::FormatToSerialString(src_format).c_str(), TypeUtils::FormatToSerialString(dst_format).c_str(), | 398 | TypeUtils::FormatToSerialString(src_format).c_str(), TypeUtils::FormatToSerialString(dst_format).c_str(), |
| 399 | ShapeToString(src_shape).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); | 399 | ShapeToString(src_shape).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); |
| @@ -409,7 +409,7 @@ Status FormatTransferFractalZz::TransShape(const Format src_format, const std::v | |||
| 409 | const Format dst_primary_format = static_cast<Format>(GetPrimaryFormat(static_cast<int32_t>(dst_format))); | 409 | const Format dst_primary_format = static_cast<Format>(GetPrimaryFormat(static_cast<int32_t>(dst_format))); |
| 410 | if (!CheckShape(src_primary_format, src_shape)) { | 410 | if (!CheckShape(src_primary_format, src_shape)) { |
| 411 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | 411 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, |
| 412 | - "[Check][Shape]Failed, not support trans format from %s to %s, " | 412 | + "[Check][Shape] Format conversion from %s to %s is not supported, " |
| 413 | "src shape %s, data type %s", | 413 | "src shape %s, data type %s", |
| 414 | TypeUtils::FormatToSerialString(src_primary_format).c_str(), | 414 | TypeUtils::FormatToSerialString(src_primary_format).c_str(), |
| 415 | TypeUtils::FormatToSerialString(dst_primary_format).c_str(), ShapeToString(src_shape).c_str(), | 415 | TypeUtils::FormatToSerialString(dst_primary_format).c_str(), ShapeToString(src_shape).c_str(), |
| @@ -430,7 +430,7 @@ Status FormatTransferFractalZz::TransShape(const Format src_format, const std::v | |||
| 430 | Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult &result) { | 430 | Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult &result) { |
| 431 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { | 431 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { |
| 432 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, | 432 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, |
| 433 | - "[Check][Datatype]Failed, not support trans format from %s to %s, " | 433 | + "[Check][Datatype] Format conversion from %s to %s is not supported, " |
| 434 | "src shape %s, dst shape %s, data type %s", | 434 | "src shape %s, dst shape %s, data type %s", |
| 435 | TypeUtils::FormatToSerialString(args.src_format).c_str(), | 435 | TypeUtils::FormatToSerialString(args.src_format).c_str(), |
| 436 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 436 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -447,8 +447,8 @@ Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult | |||
| 447 | 447 | ||
| 448 | if ((!IsShapeValid(args.src_shape)) || (!CheckShape(args.dst_primary_format, args.dst_shape))) { | 448 | if ((!IsShapeValid(args.src_shape)) || (!CheckShape(args.dst_primary_format, args.dst_shape))) { |
| 449 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | 449 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, |
| 450 | - "[Check][Shape]Failed, not support trans format " | 450 | + "[Check][Shape] Format conversion from %s to %s is not supported, " |
| 451 | - "from %s to %s, src shape %s, dst shape %s, data type %s", | 451 | + "src shape %s, dst shape %s, data type %s", |
| 452 | TypeUtils::FormatToSerialString(args.src_format).c_str(), | 452 | TypeUtils::FormatToSerialString(args.src_format).c_str(), |
| 453 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 453 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| 454 | ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); | 454 | ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); |
| @@ -46,7 +46,7 @@ Status CheckGroupsSupport(const int32_t groups) { | |||
| 46 | if (groups == 0 || groups == 1) { | 46 | if (groups == 0 || groups == 1) { |
| 47 | return SUCCESS; | 47 | return SUCCESS; |
| 48 | } | 48 | } |
| 49 | - GELOGW("Currently groups %ld not support, should be 1 on fzc04 format transfer.", groups); | 49 | + GELOGW("The current group count is %ld; only 1 is supported for FZC04 format transfer.", groups); |
| 50 | return ACL_ERROR_GE_PARAM_INVALID; | 50 | return ACL_ERROR_GE_PARAM_INVALID; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| @@ -150,7 +150,7 @@ Status TransFormatNchwToFzC04(const TransArgs &args, TransResult &result) { | |||
| 150 | const size_t expect_size = static_cast<size_t>(sum_size); | 150 | const size_t expect_size = static_cast<size_t>(sum_size); |
| 151 | if (trans_result_1.length != expect_size) { | 151 | if (trans_result_1.length != expect_size) { |
| 152 | GELOGE(ACL_ERROR_GE_PARAM_INVALID, | 152 | GELOGE(ACL_ERROR_GE_PARAM_INVALID, |
| 153 | - "[Check][Shape]size %zu is not match expect size %zu " | 153 | + "[Check][Shape]size %zu does not match expect size %zu " |
| 154 | "after transpose", | 154 | "after transpose", |
| 155 | trans_result_1.length, expect_size); | 155 | trans_result_1.length, expect_size); |
| 156 | return ACL_ERROR_GE_PARAM_INVALID; | 156 | return ACL_ERROR_GE_PARAM_INVALID; |
| @@ -392,7 +392,7 @@ Status FormatTransfer4DToFZC04::BuildTransArgsNchwToFzC04(const ge::formats::Tra | |||
| 392 | static_cast<Format>(GetFormatFromSub(FORMAT_NCHW, GetSubFormat(src_dst_args.dst_sub_format))); | 392 | static_cast<Format>(GetFormatFromSub(FORMAT_NCHW, GetSubFormat(src_dst_args.dst_sub_format))); |
| 393 | src_to_nchw_args.dst_primary_format = FORMAT_NCHW; | 393 | src_to_nchw_args.dst_primary_format = FORMAT_NCHW; |
| 394 | if (!ge::formats::IsTransFormatSupport(src_to_nchw_args)) { | 394 | if (!ge::formats::IsTransFormatSupport(src_to_nchw_args)) { |
| 395 | - GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Not support trans format from %s to %s.", | 395 | + GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Format conversion from %s to %s is not supported.", |
| 396 | TypeUtils::FormatToSerialString(src_dst_args.src_format).c_str(), | 396 | TypeUtils::FormatToSerialString(src_dst_args.src_format).c_str(), |
| 397 | TypeUtils::FormatToSerialString(src_to_nchw_args.dst_format).c_str()); | 397 | TypeUtils::FormatToSerialString(src_to_nchw_args.dst_format).c_str()); |
| 398 | return ACL_ERROR_GE_FORMAT_INVALID; | 398 | return ACL_ERROR_GE_FORMAT_INVALID; |
| @@ -431,7 +431,7 @@ Status FormatTransfer4DToFZC04::TransShapeFromSrcToNchw(const Format src_format, | |||
| 431 | FORMAT_NCHW, FORMAT_RESERVED, FORMAT_RESERVED, kC0Size, | 431 | FORMAT_NCHW, FORMAT_RESERVED, FORMAT_RESERVED, kC0Size, |
| 432 | kC0Size, src_shape, nchw_shape, data_type}; | 432 | kC0Size, src_shape, nchw_shape, data_type}; |
| 433 | if (!ge::formats::IsTransFormatSupport(args)) { | 433 | if (!ge::formats::IsTransFormatSupport(args)) { |
| 434 | - GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Not support trans shape from %s to %s", | 434 | + GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Shape conversion from %s to %s is not supported.", |
| 435 | ge::TypeUtils::FormatToSerialString(src_format).c_str(), | 435 | ge::TypeUtils::FormatToSerialString(src_format).c_str(), |
| 436 | ge::TypeUtils::FormatToSerialString(FORMAT_NCHW).c_str()); | 436 | ge::TypeUtils::FormatToSerialString(FORMAT_NCHW).c_str()); |
| 437 | return ACL_ERROR_GE_FORMAT_INVALID; | 437 | return ACL_ERROR_GE_FORMAT_INVALID; |
| @@ -507,7 +507,8 @@ Status FormatTransferFZC04To4D::TransFormat(const TransArgs &args, TransResult & | |||
| 507 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 507 | TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| 508 | TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), ShapeToString(args.dst_shape).c_str()); | 508 | TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), ShapeToString(args.dst_shape).c_str()); |
| 509 | if (args.src_primary_format != FORMAT_FRACTAL_Z_C04 || args.dst_primary_format != FORMAT_HWCN) { | 509 | if (args.src_primary_format != FORMAT_FRACTAL_Z_C04 || args.dst_primary_format != FORMAT_HWCN) { |
| 510 | - GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Src format is %s, dst format is %s, Not support.", | 510 | + GELOGE(ACL_ERROR_GE_FORMAT_INVALID, |
| 511 | + "The conversion from source format %s to destination format %s is not supported.", | ||
| 511 | TypeUtils::FormatToSerialString(args.src_primary_format).c_str(), | 512 | TypeUtils::FormatToSerialString(args.src_primary_format).c_str(), |
| 512 | TypeUtils::FormatToSerialString(args.dst_primary_format).c_str()); | 513 | TypeUtils::FormatToSerialString(args.dst_primary_format).c_str()); |
| 513 | return ACL_ERROR_GE_FORMAT_INVALID; | 514 | return ACL_ERROR_GE_FORMAT_INVALID; |
| @@ -82,9 +82,9 @@ bool IsTransposeArgValid(const uint8_t *const src, const std::vector<int64_t> &s | |||
| 82 | return false; | 82 | return false; |
| 83 | } | 83 | } |
| 84 | if (GetSizeByDataType(src_data_type) < 0) { | 84 | if (GetSizeByDataType(src_data_type) < 0) { |
| 85 | - GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Trans][Param]Failed, the data type %s is not support", | 85 | + GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Trans][Param]Failed, the data type %s is not supported", |
| 86 | TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 86 | TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 87 | - REPORT_INNER_ERR_MSG("E19999", "Failed to transpose, the data type %s is not support", | 87 | + REPORT_INNER_ERR_MSG("E19999", "Failed to transpose, the data type %s is not supported", |
| 88 | TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 88 | TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 89 | return false; | 89 | return false; |
| 90 | } | 90 | } |
| @@ -37,16 +37,16 @@ ge::Status InitVarIfHasInitValue(const VarDevAddrMgr *const var_mgr, void *var_d | |||
| 37 | const auto &init_desc = init_value->GetTensorDesc(); | 37 | const auto &init_desc = init_value->GetTensorDesc(); |
| 38 | const auto &var_desc = var_mgr->tensor_desc; | 38 | const auto &var_desc = var_mgr->tensor_desc; |
| 39 | GE_ASSERT_TRUE(var_desc.GetShape().GetDims() == init_desc.GetShape().GetDims(), | 39 | GE_ASSERT_TRUE(var_desc.GetShape().GetDims() == init_desc.GetShape().GetDims(), |
| 40 | - "_init_value shape not match," | 40 | + "_init_value shape does not match," |
| 41 | " var_shape: %s, init_shape: %s", | 41 | " var_shape: %s, init_shape: %s", |
| 42 | var_desc.GetShape().ToString().c_str(), init_desc.GetShape().ToString().c_str()); | 42 | var_desc.GetShape().ToString().c_str(), init_desc.GetShape().ToString().c_str()); |
| 43 | GE_ASSERT_TRUE(var_desc.GetDataType() == init_desc.GetDataType(), | 43 | GE_ASSERT_TRUE(var_desc.GetDataType() == init_desc.GetDataType(), |
| 44 | - "_init_value data type not match, " | 44 | + "_init_value data type does not match, " |
| 45 | "var data type: %s, init value data type: %s", | 45 | "var data type: %s, init value data type: %s", |
| 46 | TypeUtils::DataTypeToSerialString(var_desc.GetDataType()).c_str(), | 46 | TypeUtils::DataTypeToSerialString(var_desc.GetDataType()).c_str(), |
| 47 | TypeUtils::DataTypeToSerialString(init_desc.GetDataType()).c_str()); | 47 | TypeUtils::DataTypeToSerialString(init_desc.GetDataType()).c_str()); |
| 48 | GE_ASSERT_TRUE(var_desc.GetFormat() == init_desc.GetFormat(), | 48 | GE_ASSERT_TRUE(var_desc.GetFormat() == init_desc.GetFormat(), |
| 49 | - "_init_value format not match, " | 49 | + "_init_value format does not match, " |
| 50 | "var format: %s, init format: %s", | 50 | "var format: %s, init format: %s", |
| 51 | TypeUtils::FormatToSerialString(var_desc.GetFormat()).c_str(), | 51 | TypeUtils::FormatToSerialString(var_desc.GetFormat()).c_str(), |
| 52 | TypeUtils::FormatToSerialString(init_desc.GetFormat()).c_str()); | 52 | TypeUtils::FormatToSerialString(init_desc.GetFormat()).c_str()); |
| @@ -180,7 +180,7 @@ Status HostCpuEngine::PrepareInputs(const ge::ConstOpDescPtr &op_desc, const std | |||
| 180 | Status HostCpuEngine::PrepareOutputs(const ge::ConstOpDescPtr &op_desc, std::vector<GeTensorPtr> &outputs, | 180 | Status HostCpuEngine::PrepareOutputs(const ge::ConstOpDescPtr &op_desc, std::vector<GeTensorPtr> &outputs, |
| 181 | std::map<std::string, Tensor> &named_outputs) { | 181 | std::map<std::string, Tensor> &named_outputs) { |
| 182 | if ((!outputs.empty()) && (outputs.size() != op_desc->GetOutputsSize())) { | 182 | if ((!outputs.empty()) && (outputs.size() != op_desc->GetOutputsSize())) { |
| 183 | - GELOGW("size of outputs not match, size of outputs = %zu, exactly output_num=%zu.", outputs.size(), | 183 | + GELOGW("size of outputs does not match, size of outputs = %zu, exactly output_num=%zu.", outputs.size(), |
| 184 | op_desc->GetOutputsSize()); | 184 | op_desc->GetOutputsSize()); |
| 185 | outputs.clear(); | 185 | outputs.clear(); |
| 186 | } | 186 | } |
| @@ -195,7 +195,7 @@ Status HostCpuEngine::PrepareOutputs(const ge::ConstOpDescPtr &op_desc, std::vec | |||
| 195 | const auto &out_desc = op_desc->GetOutputDesc(static_cast<uint32_t>(i)); | 195 | const auto &out_desc = op_desc->GetOutputDesc(static_cast<uint32_t>(i)); |
| 196 | const std::set<DataType>::const_iterator &output_data_type_iter = output_data_type_set.find(out_desc.GetDataType()); | 196 | const std::set<DataType>::const_iterator &output_data_type_iter = output_data_type_set.find(out_desc.GetDataType()); |
| 197 | if (output_data_type_iter == output_data_type_set.cend()) { | 197 | if (output_data_type_iter == output_data_type_set.cend()) { |
| 198 | - GELOGW("data type %s not support.", TypeUtils::DataTypeToSerialString(out_desc.GetDataType()).c_str()); | 198 | + GELOGW("data type %s is not supported.", TypeUtils::DataTypeToSerialString(out_desc.GetDataType()).c_str()); |
| 199 | ret = NOT_CHANGED; | 199 | ret = NOT_CHANGED; |
| 200 | break; | 200 | break; |
| 201 | } | 201 | } |
| @@ -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:InputFormat] %s not support , expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.", | 1146 | + "[Check][Param:InputFormat] %s is not supported, 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 | } |
| @@ -1859,7 +1859,7 @@ static std::string AttrTypeToSerialString(aclgrphAttrType attr_type) { | |||
| 1859 | const std::string reason = "aclgrphAttrType " + std::to_string(attr_type) + " is not supported"; | 1859 | const std::string reason = "aclgrphAttrType " + std::to_string(attr_type) + " is not supported"; |
| 1860 | REPORT_PREDEFINED_ERR_MSG("E10055", std::vector<const char_t *>({"reason"}), | 1860 | REPORT_PREDEFINED_ERR_MSG("E10055", std::vector<const char_t *>({"reason"}), |
| 1861 | std::vector<const char_t *>({reason.c_str()})); | 1861 | std::vector<const char_t *>({reason.c_str()})); |
| 1862 | - GELOGE(GRAPH_FAILED, "[Check][AclgrphAttrType] attr_type not support %u", attr_type); | 1862 | + GELOGE(GRAPH_FAILED, "[Check][AclgrphAttrType] attr_type is not supported %u", attr_type); |
| 1863 | return "UNDEFINED"; | 1863 | return "UNDEFINED"; |
| 1864 | } | 1864 | } |
| 1865 | } | 1865 | } |
| @@ -187,7 +187,7 @@ Status ParseIndexedListOption(const std::string &option_name, const std::string | |||
| 187 | if (index_and_value_str.size() != kLeastStrElementNum) { | 187 | if (index_and_value_str.size() != kLeastStrElementNum) { |
| 188 | REPORT_PREDEFINED_ERR_MSG("E10014", std::vector<const char *>({"parameter", "value"}), | 188 | REPORT_PREDEFINED_ERR_MSG("E10014", std::vector<const char *>({"parameter", "value"}), |
| 189 | std::vector<const char *>({option_name.c_str(), option_value.c_str()})); | 189 | std::vector<const char *>({option_name.c_str(), option_value.c_str()})); |
| 190 | - GELOGE(PARAM_INVALID, "Options[%s] is invalid, input[%zu][%s] not match pattern: input_index:[v0,v1,...]", | 190 | + GELOGE(PARAM_INVALID, "Options[%s] is invalid, input[%zu][%s] does not match pattern: input_index:[v0,v1,...]", |
| 191 | option_name.c_str(), i, input_option_local.c_str()); | 191 | option_name.c_str(), i, input_option_local.c_str()); |
| 192 | return PARAM_INVALID; | 192 | return PARAM_INVALID; |
| 193 | } | 193 | } |
| @@ -1966,8 +1966,8 @@ Status CheckScreenPrinterOption(const std::map<std::string, std::string> &option | |||
| 1966 | "E10003", std::vector<const char *>({"parameter", "value", "reason"}), | 1966 | "E10003", std::vector<const char *>({"parameter", "value", "reason"}), |
| 1967 | std::vector<const char *>({OPTION_SCREEN_PRINT_MODE, iter->second.c_str(), | 1967 | std::vector<const char *>({OPTION_SCREEN_PRINT_MODE, iter->second.c_str(), |
| 1968 | "This value is not supported. It only supports enable or disable."})); | 1968 | "This value is not supported. It only supports enable or disable."})); |
| 1969 | - GELOGE(ge::PARAM_INVALID, "[Check][Option] option[%s] value[%s] invalid, not support.", OPTION_SCREEN_PRINT_MODE, | 1969 | + GELOGE(ge::PARAM_INVALID, "[Check][Option] option[%s] value[%s] invalid, is not supported.", |
| 1970 | - iter->second.c_str()); | 1970 | + OPTION_SCREEN_PRINT_MODE, iter->second.c_str()); |
| 1971 | return FAILED; | 1971 | return FAILED; |
| 1972 | } | 1972 | } |
| 1973 | return SUCCESS; | 1973 | return SUCCESS; |
| @@ -1129,7 +1129,8 @@ Status GeGenerator::BuildSingleOp(OpDescPtr &op_desc, const std::vector<GeTensor | |||
| 1129 | // 2. check engine type when compile online | 1129 | // 2. check engine type when compile online |
| 1130 | ret = CheckEngineTypeSupport(node, engine_type); | 1130 | ret = CheckEngineTypeSupport(node, engine_type); |
| 1131 | if (ret != SUCCESS) { | 1131 | if (ret != SUCCESS) { |
| 1132 | - GELOGE(ret, "[Check][EngineType]not support node:%s with engine of %d.", node->GetName().c_str(), engine_type); | 1132 | + GELOGE(ret, "[Check][EngineType] does not support node:%s with engine of %d.", node->GetName().c_str(), |
| 1133 | + engine_type); | ||
| 1133 | return ret; | 1134 | return ret; |
| 1134 | } | 1135 | } |
| 1135 | } | 1136 | } |
| @@ -1447,7 +1448,7 @@ Status GeGenerator::CheckEngineTypeSupport(const NodePtr &node, OpEngineType eng | |||
| 1447 | std::vector<const char *>({op_desc->GetName().c_str(), op_desc->GetType().c_str(), "engine type", | 1448 | std::vector<const char *>({op_desc->GetName().c_str(), op_desc->GetType().c_str(), "engine type", |
| 1448 | "It only supports default/AIcoreEngine/VectorEngine"})); | 1449 | "It only supports default/AIcoreEngine/VectorEngine"})); |
| 1449 | GELOGE(FAILED, | 1450 | GELOGE(FAILED, |
| 1450 | - "[Check][Param] value:%d not support, " | 1451 | + "[Check][Param] value:%d is not supported, " |
| 1451 | "only support default/AIcoreEngine/VectorEngine now", | 1452 | "only support default/AIcoreEngine/VectorEngine now", |
| 1452 | static_cast<int32_t>(engine_type)); | 1453 | static_cast<int32_t>(engine_type)); |
| 1453 | return FAILED; | 1454 | return FAILED; |
| @@ -85,13 +85,13 @@ bool IsAttrNamesMatch(const NodePtr &p_node, const NodePtr &t_node, const std::v | |||
| 85 | const auto &t_attr_names = t_node->GetOpDesc()->GetIrAttrNames(); | 85 | const auto &t_attr_names = t_node->GetOpDesc()->GetIrAttrNames(); |
| 86 | GE_WARN_ASSERT( | 86 | GE_WARN_ASSERT( |
| 87 | p_attr_names.size() == t_attr_names.size(), | 87 | p_attr_names.size() == t_attr_names.size(), |
| 88 | - "[AttrMiss] Ir attr num is not match. P node[%s][%s] attr names: %s attr num is %zu, T node [%s][%s] attr names" | 88 | + "[AttrMiss] Ir attr num does not match. P node[%s][%s] attr names: %s attr num is %zu, T node [%s][%s] attr names" |
| 89 | ":%s attr num is %zu.", | 89 | ":%s attr num is %zu.", |
| 90 | p_node->GetNamePtr(), p_node->GetTypePtr(), AttrNamesToString(p_attr_names).c_str(), p_attr_names.size(), | 90 | p_node->GetNamePtr(), p_node->GetTypePtr(), AttrNamesToString(p_attr_names).c_str(), p_attr_names.size(), |
| 91 | t_node->GetNamePtr(), t_node->GetTypePtr(), AttrNamesToString(t_attr_names).c_str(), t_attr_names.size()); | 91 | t_node->GetNamePtr(), t_node->GetTypePtr(), AttrNamesToString(t_attr_names).c_str(), t_attr_names.size()); |
| 92 | GE_WARN_ASSERT( | 92 | GE_WARN_ASSERT( |
| 93 | std::is_permutation(p_attr_names.begin(), p_attr_names.end(), t_attr_names.begin()), | 93 | std::is_permutation(p_attr_names.begin(), p_attr_names.end(), t_attr_names.begin()), |
| 94 | - "[AttrMiss] Ir attr names is not match. P node[%s][%s] attr names: %s, T node [%s][%s] attr names: %s.", | 94 | + "[AttrMiss] Ir attr names do not match. P node[%s][%s] attr names: %s, T node [%s][%s] attr names: %s.", |
| 95 | p_node->GetNamePtr(), p_node->GetTypePtr(), AttrNamesToString(p_attr_names).c_str(), t_node->GetNamePtr(), | 95 | p_node->GetNamePtr(), p_node->GetTypePtr(), AttrNamesToString(p_attr_names).c_str(), t_node->GetNamePtr(), |
| 96 | t_node->GetTypePtr(), AttrNamesToString(t_attr_names).c_str()); | 96 | t_node->GetTypePtr(), AttrNamesToString(t_attr_names).c_str()); |
| 97 | return true; | 97 | return true; |
| @@ -115,7 +115,7 @@ bool IsAttrValuesMatch(const NodePtr &p_node, const NodePtr &t_node, const std:: | |||
| 115 | const auto &t_attr_value_buf = t_attr_values[i]; | 115 | const auto &t_attr_value_buf = t_attr_values[i]; |
| 116 | if (p_attr_value_buf.size() != t_attr_value_buf.size()) { | 116 | if (p_attr_value_buf.size() != t_attr_value_buf.size()) { |
| 117 | GELOGD( | 117 | GELOGD( |
| 118 | - "[AttrMiss] Ir attr value size is not match. Attr name [%s], P node[%s][%s] attr value size: %zu, T node " | 118 | + "[AttrMiss] Ir attr value size does not match. Attr name [%s], P node[%s][%s] attr value size: %zu, T node " |
| 119 | "[%s][%s] attr value size: %zu.", | 119 | "[%s][%s] attr value size: %zu.", |
| 120 | attr_name.c_str(), p_node->GetNamePtr(), p_node->GetTypePtr(), p_attr_value_buf.size(), t_node->GetNamePtr(), | 120 | attr_name.c_str(), p_node->GetNamePtr(), p_node->GetTypePtr(), p_attr_value_buf.size(), t_node->GetNamePtr(), |
| 121 | t_node->GetTypePtr(), t_attr_value_buf.size()); | 121 | t_node->GetTypePtr(), t_attr_value_buf.size()); |
| @@ -123,7 +123,7 @@ bool IsAttrValuesMatch(const NodePtr &p_node, const NodePtr &t_node, const std:: | |||
| 123 | } | 123 | } |
| 124 | if (memcmp(p_attr_value_buf.data(), t_attr_value_buf.data(), p_attr_value_buf.size()) != 0) { | 124 | if (memcmp(p_attr_value_buf.data(), t_attr_value_buf.data(), p_attr_value_buf.size()) != 0) { |
| 125 | // todo better to print attr value | 125 | // todo better to print attr value |
| 126 | - GELOGD("[AttrMiss] Ir attr value is not match. Attr name [%s], P node[%s][%s], T node [%s][%s].", | 126 | + GELOGD("[AttrMiss] Ir attr value does not match. Attr name [%s], P node[%s][%s], T node [%s][%s].", |
| 127 | attr_name.c_str(), p_node->GetNamePtr(), p_node->GetTypePtr(), t_node->GetNamePtr(), t_node->GetTypePtr()); | 127 | attr_name.c_str(), p_node->GetNamePtr(), p_node->GetTypePtr(), t_node->GetNamePtr(), t_node->GetTypePtr()); |
| 128 | return false; | 128 | return false; |
| 129 | } | 129 | } |
| @@ -78,7 +78,7 @@ Status RunDecomposePass(GraphPtr &graph, CustomPassContext &pass_context, const | |||
| 78 | auto compute_graph = GraphUtilsEx::GetComputeGraph(*graph); | 78 | auto compute_graph = GraphUtilsEx::GetComputeGraph(*graph); |
| 79 | const auto matched_nodes = MatchFromAllNodes(compute_graph, op_types); | 79 | const auto matched_nodes = MatchFromAllNodes(compute_graph, op_types); |
| 80 | if (matched_nodes.empty()) { | 80 | if (matched_nodes.empty()) { |
| 81 | - GELOGD("[MATCH] not find any op with match_type"); | 81 | + GELOGD("[MATCH] did not find any op with match_type"); |
| 82 | return NOT_CHANGED; | 82 | return NOT_CHANGED; |
| 83 | } | 83 | } |
| 84 | bool is_changed = false; | 84 | bool is_changed = false; |
| @@ -96,7 +96,7 @@ Status RunDecomposePass(GraphPtr &graph, CustomPassContext &pass_context, const | |||
| 96 | GE_ASSERT_TRUE(it_fusion_info != fusion_info_map.end()); | 96 | GE_ASSERT_TRUE(it_fusion_info != fusion_info_map.end()); |
| 97 | it_fusion_info->second.first++; | 97 | it_fusion_info->second.first++; |
| 98 | if (!meet_requirements(g_node)) { | 98 | if (!meet_requirements(g_node)) { |
| 99 | - GELOGD("Node [%s][%s] is not match requires", node->GetNamePtr(), node->GetTypePtr()); | 99 | + GELOGD("Node [%s][%s] does not match requires", node->GetNamePtr(), node->GetTypePtr()); |
| 100 | continue; | 100 | continue; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| @@ -26,11 +26,11 @@ class SubgraphInputImpl { | |||
| 26 | Status AddInput(const NodeIo &node_input) { | 26 | Status AddInput(const NodeIo &node_input) { |
| 27 | const auto in_node = NodeAdapter::GNode2Node(node_input.node); | 27 | const auto in_node = NodeAdapter::GNode2Node(node_input.node); |
| 28 | const auto in_data_anchor = in_node->GetInDataAnchor(node_input.index); | 28 | const auto in_data_anchor = in_node->GetInDataAnchor(node_input.index); |
| 29 | - GE_ASSERT_NOTNULL(in_data_anchor, "Node [%s][%s] input[%d] is not exist", in_node->GetNamePtr(), | 29 | + GE_ASSERT_NOTNULL(in_data_anchor, "Node [%s][%s] input[%d] does not exist", in_node->GetNamePtr(), |
| 30 | in_node->GetTypePtr(), node_input.index); | 30 | in_node->GetTypePtr(), node_input.index); |
| 31 | if (tensor_producer_ == nullptr) { | 31 | if (tensor_producer_ == nullptr) { |
| 32 | tensor_producer_ = in_data_anchor->GetPeerOutAnchor(); | 32 | tensor_producer_ = in_data_anchor->GetPeerOutAnchor(); |
| 33 | - GE_ASSERT_NOTNULL(tensor_producer_, "The tensor producer of node [%s][%s] input[%d] is not exist", | 33 | + GE_ASSERT_NOTNULL(tensor_producer_, "The tensor producer of node [%s][%s] input[%d] does not exist", |
| 34 | in_node->GetNamePtr(), in_node->GetTypePtr(), node_input.index); | 34 | in_node->GetNamePtr(), in_node->GetTypePtr(), node_input.index); |
| 35 | } else { | 35 | } else { |
| 36 | // check node_input has same tensor producer | 36 | // check node_input has same tensor producer |
| @@ -58,7 +58,7 @@ class SubgraphOutputImpl { | |||
| 58 | GE_ASSERT_TRUE(NodeAdapter::GNode2Node(output_.node) == nullptr, "SubgraphOutput has already been 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] does not exist", |
| 62 | node->GetNamePtr(), node->GetTypePtr(), node_output.index); | 62 | node->GetNamePtr(), node->GetTypePtr(), node_output.index); |
| 63 | output_ = node_output; | 63 | output_ = node_output; |
| 64 | return SUCCESS; | 64 | return SUCCESS; |
| @@ -111,7 +111,7 @@ class SubgraphBoundaryImpl { | |||
| 111 | Status GetOutput(int64_t index, SubgraphOutput &subgraph_output) const { | 111 | Status GetOutput(int64_t index, SubgraphOutput &subgraph_output) const { |
| 112 | const auto iter = idx_2_subgraph_output_.find(index); | 112 | const auto iter = idx_2_subgraph_output_.find(index); |
| 113 | if (iter == idx_2_subgraph_output_.cend()) { | 113 | if (iter == idx_2_subgraph_output_.cend()) { |
| 114 | - GELOGE(FAILED, "Output of index %ld is not exist", index); | 114 | + GELOGE(FAILED, "Output of index %ld does not exist", index); |
| 115 | return FAILED; | 115 | return FAILED; |
| 116 | } | 116 | } |
| 117 | subgraph_output = iter->second; | 117 | subgraph_output = iter->second; |
| @@ -2670,7 +2670,7 @@ Status GraphManager::ParseOptions(const std::map<std::string, std::string> &opti | |||
| 2670 | ParseOption(options, kDynamicDims, options_.dynamic_dims); | 2670 | ParseOption(options, kDynamicDims, options_.dynamic_dims); |
| 2671 | ParseOption(options, DYNAMIC_NODE_TYPE, options_.dynamic_node_type); | 2671 | ParseOption(options, DYNAMIC_NODE_TYPE, options_.dynamic_node_type); |
| 2672 | ParseOption(options, EVENT, options_.event); | 2672 | ParseOption(options, EVENT, options_.event); |
| 2673 | - GELOGD("Dynamic dims params: input shape is %s, dynamic dims is %s, dynamic node type is %d", | 2673 | + GELOGD("Dynamic dims params: input shape is %s, dynamic dims are %s, dynamic node type is %d", |
| 2674 | options_.input_shape.c_str(), options_.dynamic_dims.c_str(), options_.dynamic_node_type); | 2674 | options_.input_shape.c_str(), options_.dynamic_dims.c_str(), options_.dynamic_node_type); |
| 2675 | 2675 | ||
| 2676 | return SUCCESS; | 2676 | return SUCCESS; |
| @@ -4778,7 +4778,7 @@ Status GraphManager::SetConstMemoryBase(uint32_t graph_id, const void *const mem | |||
| 4778 | 4778 | ||
| 4779 | const auto compute_graph = graph_node->GetComputeGraph(); | 4779 | const auto compute_graph = graph_node->GetComputeGraph(); |
| 4780 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); | 4780 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); |
| 4781 | - GE_ASSERT_TRUE(!compute_graph->GetGraphUnknownFlag(), "Not support for dynamic compiled graph."); | 4781 | + GE_ASSERT_TRUE(!compute_graph->GetGraphUnknownFlag(), "Not supported for dynamic compiled graph."); |
| 4782 | 4782 | ||
| 4783 | auto const_mem = graph_node->GetConstMemoryBase(); | 4783 | auto const_mem = graph_node->GetConstMemoryBase(); |
| 4784 | if (const_mem.first != nullptr) { | 4784 | if (const_mem.first != nullptr) { |
| @@ -4823,7 +4823,7 @@ Status GraphManager::UpdateFeatureMemoryBase(uint32_t graph_id, const void *cons | |||
| 4823 | GetThreadLocalContext().SetGraphOption(graph_node->GetOptions()); | 4823 | GetThreadLocalContext().SetGraphOption(graph_node->GetOptions()); |
| 4824 | const auto compute_graph = graph_node->GetComputeGraph(); | 4824 | const auto compute_graph = graph_node->GetComputeGraph(); |
| 4825 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); | 4825 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); |
| 4826 | - GE_ASSERT_TRUE(!compute_graph->GetGraphUnknownFlag(), "Not support for dynamic compiled graph."); | 4826 | + GE_ASSERT_TRUE(!compute_graph->GetGraphUnknownFlag(), "Not supported for dynamic compiled graph."); |
| 4827 | 4827 | ||
| 4828 | bool has_been_set = false; | 4828 | bool has_been_set = false; |
| 4829 | bool user_alloc = false; | 4829 | bool user_alloc = false; |
| @@ -4866,7 +4866,7 @@ Status GraphManager::UpdateFeatureMemoryBase(uint32_t graph_id, const void *cons | |||
| 4866 | GE_ASSERT_SUCCESS(summary->GetFeatureMemoryBaseRefreshable(is_refreshable)); | 4866 | GE_ASSERT_SUCCESS(summary->GetFeatureMemoryBaseRefreshable(is_refreshable)); |
| 4867 | const auto queryed = graph_node->GetFeatureMemoryBase(); | 4867 | const auto queryed = graph_node->GetFeatureMemoryBase(); |
| 4868 | if (graph_node->GetLoadFlag()) { | 4868 | if (graph_node->GetLoadFlag()) { |
| 4869 | - GE_ASSERT_TRUE(is_refreshable, "Not support for ge.featureBaseRefreshable disabled."); | 4869 | + GE_ASSERT_TRUE(is_refreshable, "Not supported for ge.featureBaseRefreshable disabled."); |
| 4870 | GE_ASSERT_SUCCESS(executor_->UpdateFeatureMemoryBase(graph_node, PtrToValue(memory), size), "update mem failed."); | 4870 | GE_ASSERT_SUCCESS(executor_->UpdateFeatureMemoryBase(graph_node, PtrToValue(memory), size), "update mem failed."); |
| 4871 | } else { | 4871 | } else { |
| 4872 | if ((queryed.first != nullptr) && !is_refreshable) { | 4872 | if ((queryed.first != nullptr) && !is_refreshable) { |
| @@ -5035,7 +5035,7 @@ Status GraphManager::UpdateRefreshableFeatureMemoryBase(uint32_t graph_id, const | |||
| 5035 | 5035 | ||
| 5036 | const auto compute_graph = graph_node->GetComputeGraph(); | 5036 | const auto compute_graph = graph_node->GetComputeGraph(); |
| 5037 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); | 5037 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); |
| 5038 | - GE_ASSERT_TRUE(!compute_graph->GetGraphUnknownFlag(), "Not support for dynamic compiled graph."); | 5038 | + GE_ASSERT_TRUE(!compute_graph->GetGraphUnknownFlag(), "Not supported for dynamic compiled graph."); |
| 5039 | 5039 | ||
| 5040 | if (IsOm2OnlineMode()) { | 5040 | if (IsOm2OnlineMode()) { |
| 5041 | GELOGE(GE_GRAPH_UNSUPPORTED, | 5041 | GELOGE(GE_GRAPH_UNSUPPORTED, |
| @@ -5086,7 +5086,7 @@ Status GraphManager::UpdateRefreshableFeatureMemoryBase(uint32_t graph_id, const | |||
| 5086 | GE_ASSERT_SUCCESS(summary->GetFeatureMemoryBaseRefreshable(is_refreshable)); | 5086 | GE_ASSERT_SUCCESS(summary->GetFeatureMemoryBaseRefreshable(is_refreshable)); |
| 5087 | const auto queryed = graph_node->GetRefreshableFeatureMemoryBase(); | 5087 | const auto queryed = graph_node->GetRefreshableFeatureMemoryBase(); |
| 5088 | if (graph_node->GetLoadFlag()) { | 5088 | if (graph_node->GetLoadFlag()) { |
| 5089 | - GE_ASSERT_TRUE(is_refreshable, "Not support for ge.featureBaseRefreshable disabled."); | 5089 | + GE_ASSERT_TRUE(is_refreshable, "Not supported for ge.featureBaseRefreshable disabled."); |
| 5090 | // 加载状态下复用UpdateFeatureMemoryBase, update Refreshable Feature Memory | 5090 | // 加载状态下复用UpdateFeatureMemoryBase, update Refreshable Feature Memory |
| 5091 | GE_ASSERT_SUCCESS(executor_->UpdateFeatureMemoryBase(graph_node, PtrToValue(memory), size), "update mem failed."); | 5091 | GE_ASSERT_SUCCESS(executor_->UpdateFeatureMemoryBase(graph_node, PtrToValue(memory), size), "update mem failed."); |
| 5092 | } else { | 5092 | } else { |
| @@ -5361,7 +5361,7 @@ Status GraphManager::PaRemapped(const GraphId graph_id, const uint64_t va, const | |||
| 5361 | const auto compute_graph = graph_node->GetComputeGraph(); | 5361 | const auto compute_graph = graph_node->GetComputeGraph(); |
| 5362 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); | 5362 | GE_ASSERT_NOTNULL(compute_graph, "graph_id:%u.", graph_id); |
| 5363 | if (compute_graph->GetGraphUnknownFlag()) { | 5363 | if (compute_graph->GetGraphUnknownFlag()) { |
| 5364 | - GELOGW("[Check][PaRemapped] Not support for dynamic compiled graph, graph_id:%u.", graph_id); | 5364 | + GELOGW("[Check][PaRemapped] Not supported for dynamic compiled graph, graph_id:%u.", graph_id); |
| 5365 | return FAILED; | 5365 | return FAILED; |
| 5366 | } | 5366 | } |
| 5367 | 5367 | ||
| @@ -391,7 +391,7 @@ class AscOverrides final : public OpOverrides { | |||
| 391 | SET_MATMUL_ATTRS(MatMulOffset, mm, matmul_attr); | 391 | SET_MATMUL_ATTRS(MatMulOffset, mm, matmul_attr); |
| 392 | } | 392 | } |
| 393 | } else { | 393 | } else { |
| 394 | - GE_WARN_ASSERT(false, "Matmul attr info not match, input=3, bias=false, offset=false."); | 394 | + GE_WARN_ASSERT(false, "Matmul attr info does not match, input=3, bias=false, offset=false."); |
| 395 | } | 395 | } |
| 396 | } else if (inputs.size() == 4U) { | 396 | } else if (inputs.size() == 4U) { |
| 397 | if (matmul_attr.is_batch) { | 397 | if (matmul_attr.is_batch) { |
| @@ -427,7 +427,7 @@ class AscOverrides final : public OpOverrides { | |||
| 427 | conv = MakeAscVar<ascir_op::ExtendConv2DScale>(explicit_output_dtypes, inputs[0], inputs[1], inputs[2]); | 427 | conv = MakeAscVar<ascir_op::ExtendConv2DScale>(explicit_output_dtypes, inputs[0], inputs[1], inputs[2]); |
| 428 | SET_EXTEND_CONV2D_ATTRS(ExtendConv2DScale, conv, conv2d_attr); | 428 | SET_EXTEND_CONV2D_ATTRS(ExtendConv2DScale, conv, conv2d_attr); |
| 429 | } else { | 429 | } else { |
| 430 | - GE_WARN_ASSERT(false, "ExtendConv2D attr info not match, input=3, bias=false, scale0=false."); | 430 | + GE_WARN_ASSERT(false, "ExtendConv2D attr info does not match, input=3, bias=false, scale0=false."); |
| 431 | } | 431 | } |
| 432 | } else if (inputs.size() == 4U) { | 432 | } else if (inputs.size() == 4U) { |
| 433 | if (conv2d_attr.has_bias && conv2d_attr.has_scale0) { | 433 | if (conv2d_attr.has_bias && conv2d_attr.has_scale0) { |
| @@ -435,7 +435,7 @@ class AscOverrides final : public OpOverrides { | |||
| 435 | inputs[3]); | 435 | inputs[3]); |
| 436 | SET_EXTEND_CONV2D_ATTRS(ExtendConv2DBiasScale, conv, conv2d_attr); | 436 | SET_EXTEND_CONV2D_ATTRS(ExtendConv2DBiasScale, conv, conv2d_attr); |
| 437 | } else { | 437 | } else { |
| 438 | - GE_WARN_ASSERT(false, "ExtendConv2D attr info not match, input=4, bias or scale0 is false."); | 438 | + GE_WARN_ASSERT(false, "ExtendConv2D attr info does not match, input=4, bias or scale0 is false."); |
| 439 | } | 439 | } |
| 440 | } | 440 | } |
| 441 | } else if (inputs.size() == 2U) { | 441 | } else if (inputs.size() == 2U) { |
| @@ -449,7 +449,7 @@ class AscOverrides final : public OpOverrides { | |||
| 449 | conv = MakeAscVar<ascir_op::Conv2DOffset>(explicit_output_dtypes, inputs[0], inputs[1], inputs[2]); | 449 | conv = MakeAscVar<ascir_op::Conv2DOffset>(explicit_output_dtypes, inputs[0], inputs[1], inputs[2]); |
| 450 | SET_CONV2D_ATTRS(Conv2DOffset, conv, conv2d_attr); | 450 | SET_CONV2D_ATTRS(Conv2DOffset, conv, conv2d_attr); |
| 451 | } else { | 451 | } else { |
| 452 | - GE_WARN_ASSERT(false, "Conv2D attr info not match, input=3, bias=false, offset=false."); | 452 | + GE_WARN_ASSERT(false, "Conv2D attr info does not match, input=3, bias=false, offset=false."); |
| 453 | } | 453 | } |
| 454 | } else if (inputs.size() == 4U) { | 454 | } else if (inputs.size() == 4U) { |
| 455 | if (conv2d_attr.has_bias && conv2d_attr.has_offset_w) { | 455 | if (conv2d_attr.has_bias && conv2d_attr.has_offset_w) { |
| @@ -457,7 +457,7 @@ class AscOverrides final : public OpOverrides { | |||
| 457 | MakeAscVar<ascir_op::Conv2DOffsetBias>(explicit_output_dtypes, inputs[0], inputs[1], inputs[2], inputs[3]); | 457 | MakeAscVar<ascir_op::Conv2DOffsetBias>(explicit_output_dtypes, inputs[0], inputs[1], inputs[2], inputs[3]); |
| 458 | SET_CONV2D_ATTRS(Conv2DOffsetBias, conv, conv2d_attr); | 458 | SET_CONV2D_ATTRS(Conv2DOffsetBias, conv, conv2d_attr); |
| 459 | } else { | 459 | } else { |
| 460 | - GE_WARN_ASSERT(false, "Conv2D attr info not match, input=4, bias or offset is false."); | 460 | + GE_WARN_ASSERT(false, "Conv2D attr info does not match, input=4, bias or offset is false."); |
| 461 | } | 461 | } |
| 462 | } | 462 | } |
| 463 | conv.SetTensorLoop(asc_axis_, loop_desc.repeats, loop_desc.strides); | 463 | conv.SetTensorLoop(asc_axis_, loop_desc.repeats, loop_desc.strides); |
| @@ -600,7 +600,7 @@ KernelBox StoreConv2D(const ge::OutDataAnchorPtr &dst, const std::vector<ge::InD | |||
| 600 | return StoreExtern(dst); | 600 | return StoreExtern(dst); |
| 601 | } | 601 | } |
| 602 | if (dims.size() != 4U) { | 602 | if (dims.size() != 4U) { |
| 603 | - GELOGI("Drop lower result of %s as output shape dim=%zu not support", BufferName(dst).c_str(), dims.size()); | 603 | + GELOGI("Drop lower result of %s as output shape dim=%zu is not supported", BufferName(dst).c_str(), dims.size()); |
| 604 | return StoreExtern(dst); | 604 | return StoreExtern(dst); |
| 605 | } | 605 | } |
| 606 | std::vector<LoopOpPtr> input_buffers; | 606 | std::vector<LoopOpPtr> input_buffers; |
| @@ -88,7 +88,7 @@ bool KernelBoxHasSliceAndReduce(const NodePtr &node) { | |||
| 88 | GE_ASSERT_NOTNULL(out_node); | 88 | GE_ASSERT_NOTNULL(out_node); |
| 89 | if (find(reduce_types.begin(), reduce_types.end(), out_node->GetType()) != reduce_types.end()) { | 89 | if (find(reduce_types.begin(), reduce_types.end(), out_node->GetType()) != reduce_types.end()) { |
| 90 | out_node_is_reduce = true; | 90 | out_node_is_reduce = true; |
| 91 | - GELOGI("output nodes is reduce type: %s", node->GetName().c_str()); | 91 | + GELOGI("output nodes are reduce type: %s", node->GetName().c_str()); |
| 92 | break; | 92 | break; |
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| @@ -164,7 +164,7 @@ bool IsViewNodeShouldLowering(vector<const ge::Node *> origin_nodes) { | |||
| 164 | if (origin_nodes.size() != 1) { | 164 | if (origin_nodes.size() != 1) { |
| 165 | for (const auto &node : origin_nodes) { | 165 | for (const auto &node : origin_nodes) { |
| 166 | GraphFusionReasonStore::CountNodeFuseFailReason( | 166 | GraphFusionReasonStore::CountNodeFuseFailReason( |
| 167 | - node->GetName(), "View node num exceed one, Fall back lowering.", | 167 | + node->GetName(), "View node num exceeds one, Fall back lowering.", |
| 168 | GraphFusionReasonStore::FailReasonCategory::TEMPORARILY_NOT_SUPPORTED); | 168 | GraphFusionReasonStore::FailReasonCategory::TEMPORARILY_NOT_SUPPORTED); |
| 169 | } | 169 | } |
| 170 | return false; | 170 | return false; |
| @@ -222,12 +222,12 @@ bool LowerConcatHelper::CheckGraph() const { | |||
| 222 | GE_WARN_ASSERT(output_node != nullptr); | 222 | GE_WARN_ASSERT(output_node != nullptr); |
| 223 | auto in_num = graph_->GetInputNodes().size(); | 223 | auto in_num = graph_->GetInputNodes().size(); |
| 224 | auto parent_in_num = static_cast<size_t>(fused_asc_backend_node_->GetAllInDataAnchorsSize()); | 224 | auto parent_in_num = static_cast<size_t>(fused_asc_backend_node_->GetAllInDataAnchorsSize()); |
| 225 | - GE_WARN_ASSERT(in_num == parent_in_num, "[%s] input not match, in_num = %u, parent_node in_num = %u", | 225 | + GE_WARN_ASSERT(in_num == parent_in_num, "[%s] input does not match, in_num = %u, parent_node in_num = %u", |
| 226 | fused_asc_backend_node_->GetNamePtr(), in_num, parent_in_num); | 226 | fused_asc_backend_node_->GetNamePtr(), in_num, parent_in_num); |
| 227 | 227 | ||
| 228 | auto out_num = output_node->GetAllInDataAnchorsSize(); | 228 | auto out_num = output_node->GetAllInDataAnchorsSize(); |
| 229 | auto parent_out_num = fused_asc_backend_node_->GetAllOutDataAnchorsSize(); | 229 | auto parent_out_num = fused_asc_backend_node_->GetAllOutDataAnchorsSize(); |
| 230 | - GE_WARN_ASSERT(out_num == parent_out_num, "[%s] output not match, out_num = %u, parent out_num = %u", | 230 | + GE_WARN_ASSERT(out_num == parent_out_num, "[%s] output does not match, out_num = %u, parent out_num = %u", |
| 231 | fused_asc_backend_node_->GetNamePtr(), out_num, parent_out_num); | 231 | fused_asc_backend_node_->GetNamePtr(), out_num, parent_out_num); |
| 232 | return true; | 232 | return true; |
| 233 | } | 233 | } |
| @@ -323,7 +323,7 @@ graphStatus LowerTile(const NodePtr &node) { | |||
| 323 | 323 | ||
| 324 | // 3. 如果in_dims长度小,则需要从前往后补轴 | 324 | // 3. 如果in_dims长度小,则需要从前往后补轴 |
| 325 | LOWERING_WARN_RECORD_REASON(multiples.size() >= in_dims.size(), node, | 325 | LOWERING_WARN_RECORD_REASON(multiples.size() >= in_dims.size(), node, |
| 326 | - "Not support multiples.size=%zu < in_dims.size=%zu", multiples.size(), in_dims.size()); | 326 | + "Not supported multiples.size=%zu < in_dims.size=%zu", multiples.size(), in_dims.size()); |
| 327 | auto new_axis_count = multiples.size() - in_dims.size(); | 327 | auto new_axis_count = multiples.size() - in_dims.size(); |
| 328 | std::vector<loop::BroadcastOp::DimKind> brc_status{new_axis_count, loop::BroadcastOp::DimKind::NEW_AXIS}; | 328 | std::vector<loop::BroadcastOp::DimKind> brc_status{new_axis_count, loop::BroadcastOp::DimKind::NEW_AXIS}; |
| 329 | std::deque<size_t> concat_dims; | 329 | std::deque<size_t> concat_dims; |
| @@ -344,7 +344,7 @@ graphStatus LowerTile(const NodePtr &node) { | |||
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | // 支持Lowering成单个concat | 346 | // 支持Lowering成单个concat |
| 347 | - LOWERING_WARN_RECORD_REASON(concat_dims.size() == 1U, node, "Not support more than 1 axis to be tiled"); | 347 | + LOWERING_WARN_RECORD_REASON(concat_dims.size() == 1U, node, "Not supported more than 1 axis to be tiled"); |
| 348 | auto in_anchor = node->GetInDataAnchor(0); | 348 | auto in_anchor = node->GetInDataAnchor(0); |
| 349 | GE_ASSERT_NOTNULL(in_anchor); | 349 | GE_ASSERT_NOTNULL(in_anchor); |
| 350 | auto dim = concat_dims[0]; | 350 | auto dim = concat_dims[0]; |
| @@ -590,7 +590,7 @@ bool InputIsConditionNode(const NodePtr &node) { | |||
| 590 | GE_ASSERT_NOTNULL(in_node); | 590 | GE_ASSERT_NOTNULL(in_node); |
| 591 | if (find(kControlOpTypes.begin(), kControlOpTypes.end(), in_node->GetType()) != kControlOpTypes.end()) { | 591 | if (find(kControlOpTypes.begin(), kControlOpTypes.end(), in_node->GetType()) != kControlOpTypes.end()) { |
| 592 | node_peerin_node_is_branch = true; | 592 | node_peerin_node_is_branch = true; |
| 593 | - GELOGI("peerin nodes is branch type: %s", node->GetName().c_str()); | 593 | + GELOGI("peerin nodes are branch type: %s", node->GetName().c_str()); |
| 594 | break; | 594 | break; |
| 595 | } | 595 | } |
| 596 | } | 596 | } |
| @@ -990,7 +990,7 @@ graphStatus LowerGather(const NodePtr &node) { | |||
| 990 | negative_index_support == false || op_impl_mode != gather_mode_two, node, | 990 | negative_index_support == false || op_impl_mode != gather_mode_two, node, |
| 991 | "Gather with negative_index_support must be in high_precision mode, not high_performance mode"); | 991 | "Gather with negative_index_support must be in high_precision mode, not high_performance mode"); |
| 992 | LOWERING_WARN_RECORD_REASON(op_impl_mode != gather_mode_two, node, "Gather is in high_performance mode"); | 992 | LOWERING_WARN_RECORD_REASON(op_impl_mode != gather_mode_two, node, "Gather is in high_performance mode"); |
| 993 | - LOWERING_WARN_RECORD_REASON(batch_dims == 0, node, "Batch dims is not 0"); | 993 | + LOWERING_WARN_RECORD_REASON(batch_dims == 0, node, "Batch dims are not 0"); |
| 994 | std::vector<Expression> dims; | 994 | std::vector<Expression> dims; |
| 995 | for (auto &anchor : node->GetAllInDataAnchors()) { | 995 | for (auto &anchor : node->GetAllInDataAnchors()) { |
| 996 | if (anchor == nullptr || anchor->GetPeerOutAnchor() == nullptr) { | 996 | if (anchor == nullptr || anchor->GetPeerOutAnchor() == nullptr) { |
| @@ -123,7 +123,7 @@ ge::graphStatus GetConv2DWShapeDim(const gert::InferSymbolShapeContext *context, | |||
| 123 | // Get w shape | 123 | // Get w shape |
| 124 | const auto w_shape = context->GetInputSymbolShape(kWIdxConv2d); | 124 | const auto w_shape = context->GetInputSymbolShape(kWIdxConv2d); |
| 125 | GE_UNSUPPORTED_IF_NULL(w_shape); | 125 | GE_UNSUPPORTED_IF_NULL(w_shape); |
| 126 | - GE_ASSERT_TRUE(w_shape->GetDimNum() == kSupportedDimNumConv2d, "Not support input x_shape dim num %lu.", | 126 | + GE_ASSERT_TRUE(w_shape->GetDimNum() == kSupportedDimNumConv2d, "Not supported input x_shape dim num %lu.", |
| 127 | w_shape->GetDimNum()); | 127 | w_shape->GetDimNum()); |
| 128 | // Set shapes | 128 | // Set shapes |
| 129 | if (w_format == ge::Format::FORMAT_NCHW) { | 129 | if (w_format == ge::Format::FORMAT_NCHW) { |
| @@ -181,7 +181,7 @@ graphStatus InsertLabelToMap(const char label, const Expression &shape, std::map | |||
| 181 | graphStatus MapInputWithoutEllipsis(const std::string &equation_part, const gert::SymbolShape *input_shape, | 181 | graphStatus MapInputWithoutEllipsis(const std::string &equation_part, const gert::SymbolShape *input_shape, |
| 182 | std::map<char, Expression> &label_map) { | 182 | std::map<char, Expression> &label_map) { |
| 183 | if (input_shape->GetDimNum() != equation_part.size()) { | 183 | if (input_shape->GetDimNum() != equation_part.size()) { |
| 184 | - GELOGE(PARAM_INVALID, "Input dim num[%zu] not match equation[%s].", input_shape->GetDimNum(), | 184 | + GELOGE(PARAM_INVALID, "Input dim num[%zu] does not match equation[%s].", input_shape->GetDimNum(), |
| 185 | equation_part.c_str()); | 185 | equation_part.c_str()); |
| 186 | return PARAM_INVALID; | 186 | return PARAM_INVALID; |
| 187 | } | 187 | } |
| @@ -142,7 +142,7 @@ graphStatus InferShape4GatherNd(gert::InferSymbolShapeContext *context) { | |||
| 142 | const auto k_symbol = indices_shape->GetDim(indices_dim - 1); | 142 | const auto k_symbol = indices_shape->GetDim(indices_dim - 1); |
| 143 | int64_t k_value = -1; | 143 | int64_t k_value = -1; |
| 144 | if (!k_symbol.GetConstValue<int64_t>(k_value)) { | 144 | if (!k_symbol.GetConstValue<int64_t>(k_value)) { |
| 145 | - GELOGW("Last indices is not const in node %s.", context->GetNodeName()); | 145 | + GELOGW("Last indices are not const in node %s.", context->GetNodeName()); |
| 146 | return UNSUPPORTED; | 146 | return UNSUPPORTED; |
| 147 | } | 147 | } |
| 148 | ASSERT_SYMBOL_GE(k_symbol, Symbol(0)); | 148 | ASSERT_SYMBOL_GE(k_symbol, Symbol(0)); |
| @@ -117,7 +117,7 @@ bool IsSupportInfer(const ge::OpDescPtr &op_desc) { | |||
| 117 | graphStatus CreateExpression(const ge::DataType dtype, const uint8_t *ptr, size_t size, | 117 | graphStatus CreateExpression(const ge::DataType dtype, const uint8_t *ptr, size_t size, |
| 118 | std::vector<Expression> &const_symbol) { | 118 | std::vector<Expression> &const_symbol) { |
| 119 | if (kComputeSupportTypes.find(dtype) == kComputeSupportTypes.end()) { | 119 | if (kComputeSupportTypes.find(dtype) == kComputeSupportTypes.end()) { |
| 120 | - GELOGW("symbolic value generalize and compute not support data type %s", | 120 | + GELOGW("symbolic value generalize and compute does not support data type %s", |
| 121 | TypeUtils::DataTypeToSerialString(dtype).c_str()); | 121 | TypeUtils::DataTypeToSerialString(dtype).c_str()); |
| 122 | return UNSUPPORTED; | 122 | return UNSUPPORTED; |
| 123 | } | 123 | } |
| @@ -52,7 +52,8 @@ Status BuildDataSymbolizeInfo(const NodePtr &data_node, const std::vector<GeTens | |||
| 52 | GE_ASSERT_NOTNULL(td); | 52 | GE_ASSERT_NOTNULL(td); |
| 53 | info.dataShape = td->GetOriginShape(); | 53 | info.dataShape = td->GetOriginShape(); |
| 54 | if (!(info.dataShape == td->GetShape())) { | 54 | if (!(info.dataShape == td->GetShape())) { |
| 55 | - GELOGW("The origin/storage shape are different, not support symbolize yet, data node %s", op_desc->GetNamePtr()); | 55 | + GELOGW("The origin/storage shape are different, does not support symbolize yet, data node %s", |
| 56 | + op_desc->GetNamePtr()); | ||
| 56 | return ge::UNSUPPORTED; | 57 | return ge::UNSUPPORTED; |
| 57 | } | 58 | } |
| 58 | 59 | ||
| @@ -152,7 +153,7 @@ Status SymbolizeInputValueForRepeat(const GeTensor &tensor, SymbolicDescAttr *at | |||
| 152 | attr->symbolic_tensor.SetSymbolicValue(CreateSymbolValueSum<uint64_t>(shape_env_attr, tensor, data_index)); | 153 | attr->symbolic_tensor.SetSymbolicValue(CreateSymbolValueSum<uint64_t>(shape_env_attr, tensor, data_index)); |
| 153 | break; | 154 | break; |
| 154 | default: | 155 | default: |
| 155 | - GELOGE(ge::PARAM_INVALID, "symbolic value generalize and compute not support data type %s", | 156 | + GELOGE(ge::PARAM_INVALID, "symbolic value generalize and compute does not support data type %s", |
| 156 | TypeUtils::DataTypeToSerialString(tensor.GetTensorDesc().GetDataType()).c_str()); | 157 | TypeUtils::DataTypeToSerialString(tensor.GetTensorDesc().GetDataType()).c_str()); |
| 157 | return FAILED; | 158 | return FAILED; |
| 158 | } | 159 | } |
| @@ -173,7 +174,7 @@ bool SupportSymbolizeValue(const GeTensor &ge_tensor) { | |||
| 173 | return false; | 174 | return false; |
| 174 | } | 175 | } |
| 175 | if (kGeDType2CppDtype.find(tensor_desc.GetDataType()) == kGeDType2CppDtype.end()) { | 176 | if (kGeDType2CppDtype.find(tensor_desc.GetDataType()) == kGeDType2CppDtype.end()) { |
| 176 | - GELOGI("symbolic value generalize and compute not support data type %s", | 177 | + GELOGI("symbolic value generalize and compute does not support data type %s", |
| 177 | TypeUtils::DataTypeToSerialString(tensor_desc.GetDataType()).c_str()); | 178 | TypeUtils::DataTypeToSerialString(tensor_desc.GetDataType()).c_str()); |
| 178 | return false; | 179 | return false; |
| 179 | } | 180 | } |
| @@ -264,7 +265,8 @@ bool IsAippInput(const NodePtr &data_node) { | |||
| 264 | 265 | ||
| 265 | bool IsSupportSymbolize(const NodePtr &data_node) { | 266 | bool IsSupportSymbolize(const NodePtr &data_node) { |
| 266 | // data是aipp算子的输入暂不支持泛化 | 267 | // data是aipp算子的输入暂不支持泛化 |
| 267 | - GE_WARN_ASSERT(!IsAippInput(data_node), "Data[%s] not support symbolize, output is aipp", data_node->GetNamePtr()); | 268 | + GE_WARN_ASSERT(!IsAippInput(data_node), "Data[%s] does not support symbolize, output is aipp", |
| 269 | + data_node->GetNamePtr()); | ||
| 268 | return true; | 270 | return true; |
| 269 | } | 271 | } |
| 270 | 272 | ||
| @@ -75,7 +75,7 @@ inline Status ValidateSliceSpecCommon(const size_t start_size, const size_t end_ | |||
| 75 | const uint64_t new_axis = static_cast<uint64_t>(attr.new_axis_mask) & spec_mask; | 75 | const uint64_t new_axis = static_cast<uint64_t>(attr.new_axis_mask) & spec_mask; |
| 76 | const uint64_t consumed = spec_mask & ~(new_axis | ellipsis); | 76 | const uint64_t consumed = spec_mask & ~(new_axis | ellipsis); |
| 77 | GE_ASSERT_TRUE(__builtin_popcountll(consumed) <= static_cast<uint64_t>(input_rank), | 77 | GE_ASSERT_TRUE(__builtin_popcountll(consumed) <= static_cast<uint64_t>(input_rank), |
| 78 | - "StridedSlice index count exceeds input rank."); | 78 | + "StridedSlice index count(%d) exceeds input rank(%ld).", __builtin_popcountll(consumed), input_rank); |
| 79 | return SUCCESS; | 79 | return SUCCESS; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| @@ -179,7 +179,7 @@ static graphStatus ConcatV2DSymbolicKernelCompute(gert::InferSymbolComputeContex | |||
| 179 | if (ret != SUCCESS) { | 179 | if (ret != SUCCESS) { |
| 180 | return ret; | 180 | return ret; |
| 181 | } | 181 | } |
| 182 | - GE_ASSERT_TRUE(inputs_dims.size() > 0, "inputs_dims size not match, is %zu", inputs_dims.size()); | 182 | + GE_ASSERT_TRUE(inputs_dims.size() > 0, "inputs_dims size does not match, is %zu", inputs_dims.size()); |
| 183 | std::vector<int64_t> first_shape = inputs_dims[0]; | 183 | std::vector<int64_t> first_shape = inputs_dims[0]; |
| 184 | if (first_shape.empty()) { | 184 | if (first_shape.empty()) { |
| 185 | GE_ASSERT_TRUE(concat_dim == 0 || concat_dim == -1, "concat_dim=%lld must equal 0 or -1", concat_dim); | 185 | GE_ASSERT_TRUE(concat_dim == 0 || concat_dim == -1, "concat_dim=%lld must equal 0 or -1", concat_dim); |
| @@ -33,7 +33,8 @@ graphStatus GetInputSymbolsValue(const gert::InferSymbolComputeContext *context, | |||
| 33 | } | 33 | } |
| 34 | if (!input_symbols_value.empty() && input_symbols_value[0].size() != symbolic_value->size()) { | 34 | if (!input_symbols_value.empty() && input_symbols_value[0].size() != symbolic_value->size()) { |
| 35 | GELOGW( | 35 | GELOGW( |
| 36 | - "SymbolicKernel compute unsupported, reason: Get input symbolic value failed, node %s[%s], size not match " | 36 | + "SymbolicKernel compute is not supported, reason: Get input symbolic value failed, node %s[%s], size not " |
| 37 | + "match " | ||
| 37 | "%zu vs %zu", | 38 | "%zu vs %zu", |
| 38 | context->GetNodeName(), context->GetNodeType(), input_symbols_value[0].size(), symbolic_value->size()); | 39 | context->GetNodeName(), context->GetNodeType(), input_symbols_value[0].size(), symbolic_value->size()); |
| 39 | return UNSUPPORTED; | 40 | return UNSUPPORTED; |
| @@ -252,7 +252,7 @@ static graphStatus SelectSymbolicKernelCompute(gert::InferSymbolComputeContext * | |||
| 252 | const std::vector<ge::Expression> *x1_value = GetInputSymbolicValue(context, 1); | 252 | const std::vector<ge::Expression> *x1_value = GetInputSymbolicValue(context, 1); |
| 253 | const std::vector<ge::Expression> *x2_value = GetInputSymbolicValue(context, 2); | 253 | const std::vector<ge::Expression> *x2_value = GetInputSymbolicValue(context, 2); |
| 254 | if (!CheckInputsValue(condition_value, x1_value, x2_value)) { | 254 | if (!CheckInputsValue(condition_value, x1_value, x2_value)) { |
| 255 | - GELOGW("Select not support, inputs symbol value is empty."); | 255 | + GELOGW("Select is not supported, inputs symbol value is empty."); |
| 256 | return UNSUPPORTED; | 256 | return UNSUPPORTED; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| @@ -263,7 +263,7 @@ static graphStatus SelectSymbolicKernelCompute(gert::InferSymbolComputeContext * | |||
| 263 | GE_UNSUPPORTED_IF_NULL(x1_shape); | 263 | GE_UNSUPPORTED_IF_NULL(x1_shape); |
| 264 | GE_UNSUPPORTED_IF_NULL(x2_shape); | 264 | GE_UNSUPPORTED_IF_NULL(x2_shape); |
| 265 | if (*x1_shape != *x2_shape) { | 265 | if (*x1_shape != *x2_shape) { |
| 266 | - GELOGW("Select not support, check inputs shape failed, x1_shape: %s, x2_shape: %s.", | 266 | + GELOGW("Select is not supported, check inputs shape failed, x1_shape: %s, x2_shape: %s.", |
| 267 | SymbolicInferUtil::VectorExpressionToStr(x1_shape->GetDims()).c_str(), | 267 | SymbolicInferUtil::VectorExpressionToStr(x1_shape->GetDims()).c_str(), |
| 268 | SymbolicInferUtil::VectorExpressionToStr(x2_shape->GetDims()).c_str()); | 268 | SymbolicInferUtil::VectorExpressionToStr(x2_shape->GetDims()).c_str()); |
| 269 | return UNSUPPORTED; | 269 | return UNSUPPORTED; |
| @@ -273,20 +273,20 @@ static graphStatus SelectSymbolicKernelCompute(gert::InferSymbolComputeContext * | |||
| 273 | std::vector<int64_t> x1_shape_value; | 273 | std::vector<int64_t> x1_shape_value; |
| 274 | if (!(GetShapeValue(condition_shape->GetDims(), cond_shape_value)) || | 274 | if (!(GetShapeValue(condition_shape->GetDims(), cond_shape_value)) || |
| 275 | !(GetShapeValue(x1_shape->GetDims(), x1_shape_value))) { | 275 | !(GetShapeValue(x1_shape->GetDims(), x1_shape_value))) { |
| 276 | - GELOGW("Select not support, get condition_shape value: %s or x1_shape value: %s failed.", | 276 | + GELOGW("Select is not supported, get condition_shape value: %s or x1_shape value: %s failed.", |
| 277 | SymbolicInferUtil::VectorExpressionToStr(condition_shape->GetDims()).c_str(), | 277 | SymbolicInferUtil::VectorExpressionToStr(condition_shape->GetDims()).c_str(), |
| 278 | SymbolicInferUtil::VectorExpressionToStr(x1_shape->GetDims()).c_str()); | 278 | SymbolicInferUtil::VectorExpressionToStr(x1_shape->GetDims()).c_str()); |
| 279 | return UNSUPPORTED; | 279 | return UNSUPPORTED; |
| 280 | } | 280 | } |
| 281 | std::vector<Expression> after_bc_condition; | 281 | std::vector<Expression> after_bc_condition; |
| 282 | if (!Broadcast(*condition_value, cond_shape_value, x1_shape_value, after_bc_condition)) { | 282 | if (!Broadcast(*condition_value, cond_shape_value, x1_shape_value, after_bc_condition)) { |
| 283 | - GELOGW("Select not support, broadcast failed."); | 283 | + GELOGW("Select is not supported, broadcast failed."); |
| 284 | return UNSUPPORTED; | 284 | return UNSUPPORTED; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | std::vector<Expression> output_value; | 287 | std::vector<Expression> output_value; |
| 288 | if (!(CalOutputValue(after_bc_condition, *x1_value, *x2_value, output_value))) { | 288 | if (!(CalOutputValue(after_bc_condition, *x1_value, *x2_value, output_value))) { |
| 289 | - GELOGW("Select not support, cal output value failed."); | 289 | + GELOGW("Select is not supported, cal output value failed."); |
| 290 | return UNSUPPORTED; | 290 | return UNSUPPORTED; |
| 291 | } | 291 | } |
| 292 | 292 | ||
| @@ -340,7 +340,7 @@ bool BaseCluster::AddFrameInput(InDataAnchorPtr anchor) { | |||
| 340 | if (anchor != nullptr && anchor->GetPeerOutAnchor() != nullptr) { | 340 | if (anchor != nullptr && anchor->GetPeerOutAnchor() != nullptr) { |
| 341 | auto index = inputs_.size(); | 341 | auto index = inputs_.size(); |
| 342 | if (merge_inputs_) { | 342 | if (merge_inputs_) { |
| 343 | - GELOGD("Merge inputs is enabled"); | 343 | + GELOGD("Merge inputs are enabled"); |
| 344 | auto src_node = anchor->GetPeerOutAnchor()->GetOwnerNode(); | 344 | auto src_node = anchor->GetPeerOutAnchor()->GetOwnerNode(); |
| 345 | std::string src_key = src_node->GetName() + ":" + std::to_string(anchor->GetPeerOutAnchor()->GetIdx()); | 345 | std::string src_key = src_node->GetName() + ":" + std::to_string(anchor->GetPeerOutAnchor()->GetIdx()); |
| 346 | std::map<std::string, size_t>::const_iterator it = src_key_to_frame_input_.find(src_key); | 346 | std::map<std::string, size_t>::const_iterator it = src_key_to_frame_input_.find(src_key); |
| @@ -159,7 +159,7 @@ Status IsSupportTilingSink(gert::DataDependentInterpreter &ddi, bool &is_support | |||
| 159 | constexpr int32_t STUB_DEV_ID = 64; | 159 | constexpr int32_t STUB_DEV_ID = 64; |
| 160 | GE_CHK_ACL_RET(aclrtGetDeviceCapability(STUB_DEV_ID, ACL_FEATURE_TSCPU_TASK_UPDATE_SUPPORT_AIC_AIV, &value)); | 160 | GE_CHK_ACL_RET(aclrtGetDeviceCapability(STUB_DEV_ID, ACL_FEATURE_TSCPU_TASK_UPDATE_SUPPORT_AIC_AIV, &value)); |
| 161 | if (value != ACL_DEV_FEATURE_SUPPORT) { | 161 | if (value != ACL_DEV_FEATURE_SUPPORT) { |
| 162 | - GELOGD("tiling sink feature not support."); | 162 | + GELOGD("tiling sink feature is not supported."); |
| 163 | return SUCCESS; | 163 | return SUCCESS; |
| 164 | } | 164 | } |
| 165 | } | 165 | } |
| @@ -288,7 +288,7 @@ Status DynamicShapePartitioner::IsGraphNeedUnknownShapePartition(bool &need_unkn | |||
| 288 | if (is_single_op) { | 288 | if (is_single_op) { |
| 289 | need_unknown_shape_partition = false; | 289 | need_unknown_shape_partition = false; |
| 290 | for (const auto &sub_node : GetRootGraph()->GetDirectNode()) { | 290 | for (const auto &sub_node : GetRootGraph()->GetDirectNode()) { |
| 291 | - GELOGD("Set OwnerGraphIsUnknow attr to node[%s], graph [%s]", sub_node->GetName().c_str(), | 291 | + GELOGD("Set OwnerGraphIsUnknown attr to node[%s], graph [%s]", sub_node->GetName().c_str(), |
| 292 | GetRootGraph()->GetName().c_str()); | 292 | GetRootGraph()->GetName().c_str()); |
| 293 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); | 293 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); |
| 294 | } | 294 | } |
| @@ -298,7 +298,7 @@ Status DynamicShapePartitioner::IsGraphNeedUnknownShapePartition(bool &need_unkn | |||
| 298 | return SUCCESS; | 298 | return SUCCESS; |
| 299 | } | 299 | } |
| 300 | for (const auto &sub_node : GetRootGraph()->GetDirectNode()) { | 300 | for (const auto &sub_node : GetRootGraph()->GetDirectNode()) { |
| 301 | - GELOGD("Set OwnerGraphIsUnknow attr to node[%s], graph [%s]", sub_node->GetName().c_str(), | 301 | + GELOGD("Set OwnerGraphIsUnknown attr to node[%s], graph [%s]", sub_node->GetName().c_str(), |
| 302 | GetRootGraph()->GetName().c_str()); | 302 | GetRootGraph()->GetName().c_str()); |
| 303 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); | 303 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); |
| 304 | } | 304 | } |
| @@ -312,14 +312,14 @@ Status DynamicShapePartitioner::IsGraphNeedUnknownShapePartition(bool &need_unkn | |||
| 312 | void DynamicShapePartitioner::SetRootGraphUnknown() const { | 312 | void DynamicShapePartitioner::SetRootGraphUnknown() const { |
| 313 | GetRootGraph()->SetGraphUnknownFlag(true); | 313 | GetRootGraph()->SetGraphUnknownFlag(true); |
| 314 | for (const auto &sub_node : GetRootGraph()->GetDirectNode()) { | 314 | for (const auto &sub_node : GetRootGraph()->GetDirectNode()) { |
| 315 | - GELOGD("Set OwnerGraphIsUnknow attr to node[%s], graph [%s]", sub_node->GetName().c_str(), | 315 | + GELOGD("Set OwnerGraphIsUnknown attr to node[%s], graph [%s]", sub_node->GetName().c_str(), |
| 316 | GetRootGraph()->GetName().c_str()); | 316 | GetRootGraph()->GetName().c_str()); |
| 317 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); | 317 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); |
| 318 | } | 318 | } |
| 319 | for (const auto &sub_graph : GetRootGraph()->GetAllSubgraphs()) { | 319 | for (const auto &sub_graph : GetRootGraph()->GetAllSubgraphs()) { |
| 320 | sub_graph->SetGraphUnknownFlag(true); | 320 | sub_graph->SetGraphUnknownFlag(true); |
| 321 | for (const auto &sub_node : sub_graph->GetDirectNode()) { | 321 | for (const auto &sub_node : sub_graph->GetDirectNode()) { |
| 322 | - GELOGD("Set OwnerGraphIsUnknow attr to node[%s], graph [%s]", sub_node->GetName().c_str(), | 322 | + GELOGD("Set OwnerGraphIsUnknown attr to node[%s], graph [%s]", sub_node->GetName().c_str(), |
| 323 | sub_graph->GetName().c_str()); | 323 | sub_graph->GetName().c_str()); |
| 324 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); | 324 | (void)AttrUtils::SetBool(sub_node->GetOpDesc(), kOwnerGraphIsUnknown, true); |
| 325 | } | 325 | } |
| @@ -511,7 +511,7 @@ Status DynamicShapePartitioner::CtrlEdgeTransfer() const { | |||
| 511 | auto op_type = op_desc->GetType(); | 511 | auto op_type = op_desc->GetType(); |
| 512 | if (op_type == CONSTANT || op_type == CONSTANTOP) { | 512 | if (op_type == CONSTANT || op_type == CONSTANTOP) { |
| 513 | if (n->GetInAllNodes().empty()) { | 513 | if (n->GetInAllNodes().empty()) { |
| 514 | - GELOGD("[CtrlEdgeTransferPass] node [%s] in nodes is empty", n->GetName().c_str()); | 514 | + GELOGD("[CtrlEdgeTransferPass] node [%s] in nodes are empty", n->GetName().c_str()); |
| 515 | continue; | 515 | continue; |
| 516 | } | 516 | } |
| 517 | 517 | ||
| @@ -1010,7 +1010,7 @@ bool NoTilingCheckInputNodeUpdateShape(const ConstNodePtr &node) { | |||
| 1010 | (void)AttrUtils::GetListStr(peer_op_desc, ATTR_NAME_OP_EXPORT_SHAPE_ENGINE, update_shape_engine); | 1010 | (void)AttrUtils::GetListStr(peer_op_desc, ATTR_NAME_OP_EXPORT_SHAPE_ENGINE, update_shape_engine); |
| 1011 | auto it = find(update_shape_engine.begin(), update_shape_engine.end(), peer_engine_name); | 1011 | auto it = find(update_shape_engine.begin(), update_shape_engine.end(), peer_engine_name); |
| 1012 | if (it == update_shape_engine.end()) { | 1012 | if (it == update_shape_engine.end()) { |
| 1013 | - GELOGI("Op[%s] not support no tiling, cause parent node[%s] engine[%s] not support export shape.", | 1013 | + GELOGI("Op[%s] does not support no tiling, cause parent node[%s] engine[%s] does not support export shape.", |
| 1014 | op_desc->GetName().c_str(), peer_op_desc->GetName().c_str(), peer_engine_name.c_str()); | 1014 | op_desc->GetName().c_str(), peer_op_desc->GetName().c_str(), peer_engine_name.c_str()); |
| 1015 | return false; | 1015 | return false; |
| 1016 | } | 1016 | } |
| @@ -1046,8 +1046,8 @@ bool DynamicShapePartitioner::IsNodeSupportNoTiling(const ConstNodePtr &node) { | |||
| 1046 | (void)AttrUtils::GetListStr(op_desc, ATTR_NAME_OP_TILING_INLINE_ENGINE, tiling_inline_engine); | 1046 | (void)AttrUtils::GetListStr(op_desc, ATTR_NAME_OP_TILING_INLINE_ENGINE, tiling_inline_engine); |
| 1047 | auto it = find(tiling_inline_engine.begin(), tiling_inline_engine.end(), op_engine_name); | 1047 | auto it = find(tiling_inline_engine.begin(), tiling_inline_engine.end(), op_engine_name); |
| 1048 | if (it == tiling_inline_engine.end()) { | 1048 | if (it == tiling_inline_engine.end()) { |
| 1049 | - GELOGD("Op[%s] not support no tiling, cause engine[%s] not support tiling inline.", op_desc->GetName().c_str(), | 1049 | + GELOGD("Op[%s] does not support no tiling, cause engine[%s] does not support tiling inline.", |
| 1050 | - op_engine_name.c_str()); | 1050 | + op_desc->GetName().c_str(), op_engine_name.c_str()); |
| 1051 | return false; | 1051 | return false; |
| 1052 | } | 1052 | } |
| 1053 | 1053 | ||
| @@ -1056,8 +1056,8 @@ bool DynamicShapePartitioner::IsNodeSupportNoTiling(const ConstNodePtr &node) { | |||
| 1056 | (void)AttrUtils::GetListStr(op_desc, ATTR_NAME_OP_EXPORT_SHAPE_ENGINE, update_shape_engine); | 1056 | (void)AttrUtils::GetListStr(op_desc, ATTR_NAME_OP_EXPORT_SHAPE_ENGINE, update_shape_engine); |
| 1057 | it = find(update_shape_engine.begin(), update_shape_engine.end(), op_engine_name); | 1057 | it = find(update_shape_engine.begin(), update_shape_engine.end(), op_engine_name); |
| 1058 | if (it == update_shape_engine.end()) { | 1058 | if (it == update_shape_engine.end()) { |
| 1059 | - GELOGD("Op[%s] not support no tiling, cause engine[%s] not support update shape.", op_desc->GetName().c_str(), | 1059 | + GELOGD("Op[%s] does not support no tiling, cause engine[%s] does not support update shape.", |
| 1060 | - op_engine_name.c_str()); | 1060 | + op_desc->GetName().c_str(), op_engine_name.c_str()); |
| 1061 | return false; | 1061 | return false; |
| 1062 | } | 1062 | } |
| 1063 | } else { | 1063 | } else { |
| @@ -1074,17 +1074,17 @@ bool DynamicShapePartitioner::IsNodeSupportNoTiling(const ConstNodePtr &node) { | |||
| 1074 | continue; | 1074 | continue; |
| 1075 | } | 1075 | } |
| 1076 | if (out_tensor->GetShape().IsUnknownDimNum()) { | 1076 | if (out_tensor->GetShape().IsUnknownDimNum()) { |
| 1077 | - GELOGD("Op[%s] unknown dim num not support no tiling.", op_desc->GetNamePtr()); | 1077 | + GELOGD("Op[%s] unknown dim num does not support no tiling.", op_desc->GetNamePtr()); |
| 1078 | return false; | 1078 | return false; |
| 1079 | } | 1079 | } |
| 1080 | std::vector<std::pair<int64_t, int64_t>> range; | 1080 | std::vector<std::pair<int64_t, int64_t>> range; |
| 1081 | if (out_tensor->GetShapeRange(range) == GRAPH_FAILED || range.size() != out_tensor->GetShape().GetDimNum()) { | 1081 | if (out_tensor->GetShapeRange(range) == GRAPH_FAILED || range.size() != out_tensor->GetShape().GetDimNum()) { |
| 1082 | - GELOGD("Op[%s] not support no tiling, cause invalid shape range.", op_desc->GetName().c_str()); | 1082 | + GELOGD("Op[%s] does not support no tiling, cause invalid shape range.", op_desc->GetName().c_str()); |
| 1083 | return false; | 1083 | return false; |
| 1084 | } | 1084 | } |
| 1085 | for (const auto &it : range) { | 1085 | for (const auto &it : range) { |
| 1086 | if (it.second < 0) { | 1086 | if (it.second < 0) { |
| 1087 | - GELOGD("Op[%s] not support no tiling, cause shape range max has -1.", op_desc->GetName().c_str()); | 1087 | + GELOGD("Op[%s] does not support no tiling, cause shape range max has -1.", op_desc->GetName().c_str()); |
| 1088 | return false; | 1088 | return false; |
| 1089 | } | 1089 | } |
| 1090 | } | 1090 | } |
| @@ -465,7 +465,7 @@ Status EnginePartitioner::InheritOriginalAttr(const ComputeGraphPtr &original_co | |||
| 465 | output_merged_compute_graph->SetGraphUnknownFlag(true); | 465 | output_merged_compute_graph->SetGraphUnknownFlag(true); |
| 466 | for (const auto &node : output_merged_compute_graph->GetDirectNode()) { | 466 | for (const auto &node : output_merged_compute_graph->GetDirectNode()) { |
| 467 | ge::AttrUtils::SetBool(node->GetOpDesc(), "OwnerGraphIsUnknown", true); | 467 | ge::AttrUtils::SetBool(node->GetOpDesc(), "OwnerGraphIsUnknown", true); |
| 468 | - GELOGD("Set OwnerGraphIsUnknow attr to node[%s], graph [%s]", node->GetName().c_str(), | 468 | + GELOGD("Set OwnerGraphIsUnknown attr to node[%s], graph [%s]", node->GetName().c_str(), |
| 469 | output_merged_compute_graph->GetName().c_str()); | 469 | output_merged_compute_graph->GetName().c_str()); |
| 470 | } | 470 | } |
| 471 | } | 471 | } |
| @@ -146,7 +146,7 @@ Status AttachStreamLabelPass::AttachFlag(const NodePtr &node, std::string &strea | |||
| 146 | const std::string &type = node->GetType(); | 146 | const std::string &type = node->GetType(); |
| 147 | if (type == STREAMSWITCH) { | 147 | if (type == STREAMSWITCH) { |
| 148 | if (node->GetInDataNodes().empty()) { | 148 | if (node->GetInDataNodes().empty()) { |
| 149 | - REPORT_INNER_ERR_MSG("E19999", "In data nodes is empty of op:%s(%s), check invalid", node->GetName().c_str(), | 149 | + REPORT_INNER_ERR_MSG("E19999", "In data nodes are empty of op:%s(%s), check invalid", node->GetName().c_str(), |
| 150 | node->GetType().c_str()); | 150 | node->GetType().c_str()); |
| 151 | GELOGE(INTERNAL_ERROR, "[Get][InDataNodes] node %s has no input_data_node.", node->GetName().c_str()); | 151 | GELOGE(INTERNAL_ERROR, "[Get][InDataNodes] node %s has no input_data_node.", node->GetName().c_str()); |
| 152 | return INTERNAL_ERROR; | 152 | return INTERNAL_ERROR; |
| @@ -54,7 +54,7 @@ Status ControlTriggerPass::HandleDynamicCtrlEdges(ComputeGraphPtr &graph, NodePt | |||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | if (switch_node == nullptr) { | 56 | if (switch_node == nullptr) { |
| 57 | - GELOGI("Not find valid switch node."); | 57 | + GELOGI("Did not find valid switch node."); |
| 58 | return SUCCESS; | 58 | return SUCCESS; |
| 59 | } | 59 | } |
| 60 | auto iter1 = control_trigger_map_.find(node); | 60 | auto iter1 = control_trigger_map_.find(node); |
| @@ -115,7 +115,7 @@ graphStatus CompileNodesPass::GetSupportedKernel(const NodePtr &node, const std: | |||
| 115 | // begin accuracy supported check | 115 | // begin accuracy supported check |
| 116 | if (!CheckAccuracySupport(kernel_info, instance, node, unsupported_reason)) { | 116 | if (!CheckAccuracySupport(kernel_info, instance, node, unsupported_reason)) { |
| 117 | // if check accuracy support failed , try to go to other engine. | 117 | // if check accuracy support failed , try to go to other engine. |
| 118 | - GELOGD("Check Accuracy Supported return not support, node name is %s. Try to go to other engine.", | 118 | + GELOGD("Check Accuracy Supported returns not supported, node name is %s. Try to go to other engine.", |
| 119 | op_desc->GetName().c_str()); | 119 | op_desc->GetName().c_str()); |
| 120 | std::string kernel_name_origin = kernel_lib_name; | 120 | std::string kernel_name_origin = kernel_lib_name; |
| 121 | OpsKernelManager &ops_kernel_manager = instance->OpsKernelManagerObj(); | 121 | OpsKernelManager &ops_kernel_manager = instance->OpsKernelManagerObj(); |
| @@ -125,7 +125,7 @@ Status RecomputeRewriting::RewriteGraph(const ComputeGraphPtr &graph) { | |||
| 125 | GE_CHK_STATUS_RET(CopyAndFindNodes(graph, recompute_start_nodes, all_backward_nodes), | 125 | GE_CHK_STATUS_RET(CopyAndFindNodes(graph, recompute_start_nodes, all_backward_nodes), |
| 126 | "Find backward nodes and recompute start nodes failed."); | 126 | "Find backward nodes and recompute start nodes failed."); |
| 127 | 127 | ||
| 128 | - GE_CHK_STATUS_RET(RecordLastForwardNode(all_backward_nodes), "Not find last forward node."); | 128 | + GE_CHK_STATUS_RET(RecordLastForwardNode(all_backward_nodes), "Did not find last forward node."); |
| 129 | 129 | ||
| 130 | GE_CHK_STATUS_RET(HandleAllRecomputeNodeInputOutput(graph, recompute_start_nodes), | 130 | GE_CHK_STATUS_RET(HandleAllRecomputeNodeInputOutput(graph, recompute_start_nodes), |
| 131 | "HandleAllRecomputeNodeInputOutput failed"); | 131 | "HandleAllRecomputeNodeInputOutput failed"); |
| @@ -124,13 +124,13 @@ bool TransOpWithoutReshapeFusionPass::IsFormatContinuous(const OutDataAnchorPtr | |||
| 124 | 124 | ||
| 125 | if (IsTransOp(in_node) && in_op->GetType() != CAST) { | 125 | if (IsTransOp(in_node) && in_op->GetType() != CAST) { |
| 126 | if (in_op_desc->GetFormat() == FORMAT_ND) { | 126 | if (in_op_desc->GetFormat() == FORMAT_ND) { |
| 127 | - GELOGD("Node %s(%s) input format %s, not support fusion.", in_op->GetNamePtr(), in_op->GetTypePtr(), | 127 | + GELOGD("Node %s(%s) input format %s, does not support fusion.", in_op->GetNamePtr(), in_op->GetTypePtr(), |
| 128 | TypeUtils::FormatToSerialString(in_op_desc->GetFormat()).c_str()); | 128 | TypeUtils::FormatToSerialString(in_op_desc->GetFormat()).c_str()); |
| 129 | return false; | 129 | return false; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | if (!FusionFormatSupport(in_op_desc->GetFormat())) { | 132 | if (!FusionFormatSupport(in_op_desc->GetFormat())) { |
| 133 | - GELOGD("Node %s(%s) input format %s, not support fusion.", in_op->GetNamePtr(), in_op->GetTypePtr(), | 133 | + GELOGD("Node %s(%s) input format %s, does not support fusion.", in_op->GetNamePtr(), in_op->GetTypePtr(), |
| 134 | TypeUtils::FormatToSerialString(in_op_desc->GetFormat()).c_str()); | 134 | TypeUtils::FormatToSerialString(in_op_desc->GetFormat()).c_str()); |
| 135 | return false; | 135 | return false; |
| 136 | } | 136 | } |
| @@ -249,7 +249,7 @@ graphStatus TransOpWithoutReshapeFusionPass::NeedRemainNode(const OutDataAnchorP | |||
| 249 | auto out_node = out_anchor->GetOwnerNodeBarePtr(); | 249 | auto out_node = out_anchor->GetOwnerNodeBarePtr(); |
| 250 | GE_CHECK_NOTNULL(out_node); | 250 | GE_CHECK_NOTNULL(out_node); |
| 251 | if (!IsFormatContinuous(out_anchor, in_anchor)) { | 251 | if (!IsFormatContinuous(out_anchor, in_anchor)) { |
| 252 | - GELOGD("Abandoned Fusion node %s(%s) and node %s(%s) format is uncontinuous or not support.", | 252 | + GELOGD("Abandoned Fusion node %s(%s) and node %s(%s) format is uncontinuous or not supported.", |
| 253 | out_node->GetNamePtr(), out_node->GetTypePtr(), in_node->GetNamePtr(), in_node->GetTypePtr()); | 253 | out_node->GetNamePtr(), out_node->GetTypePtr(), in_node->GetNamePtr(), in_node->GetTypePtr()); |
| 254 | need_remain = true; | 254 | need_remain = true; |
| 255 | return GRAPH_SUCCESS; | 255 | return GRAPH_SUCCESS; |
| @@ -856,7 +856,7 @@ graphStatus TransOpWithoutReshapeFusionPass::FormatFusion(const int32_t index, O | |||
| 856 | ++fusion_op_count; | 856 | ++fusion_op_count; |
| 857 | GELOGI("support format transfer op %s", format_transfer_op->GetName().c_str()); | 857 | GELOGI("support format transfer op %s", format_transfer_op->GetName().c_str()); |
| 858 | } else { | 858 | } else { |
| 859 | - GELOGW("ability not support.src format:%d, src datatype:%d, dst format:%d, dst datatype:%d", | 859 | + GELOGW("ability is not supported.src format:%d, src datatype:%d, dst format:%d, dst datatype:%d", |
| 860 | format_transfer_input.GetFormat(), format_transfer_input.GetDataType(), format_transfer_output.GetFormat(), | 860 | format_transfer_input.GetFormat(), format_transfer_input.GetDataType(), format_transfer_output.GetFormat(), |
| 861 | format_transfer_output.GetDataType()); | 861 | format_transfer_output.GetDataType()); |
| 862 | fusion_op_count = kInvalidFusionOpCount; | 862 | fusion_op_count = kInvalidFusionOpCount; |
| @@ -895,7 +895,7 @@ graphStatus TransOpWithoutReshapeFusionPass::DataTypeFusion(const int32_t index, | |||
| 895 | cast_op->GetName().c_str(), cast_input.GetFormat(), cast_input.GetDataType(), cast_output.GetFormat(), | 895 | cast_op->GetName().c_str(), cast_input.GetFormat(), cast_input.GetDataType(), cast_output.GetFormat(), |
| 896 | cast_output.GetDataType()); | 896 | cast_output.GetDataType()); |
| 897 | } else { | 897 | } else { |
| 898 | - GELOGW("ability not support.src format:%d, src datatype:%d, dst format:%d, dst datatype:%d", | 898 | + GELOGW("ability is not supported.src format:%d, src datatype:%d, dst format:%d, dst datatype:%d", |
| 899 | cast_input.GetFormat(), cast_input.GetDataType(), cast_output.GetFormat(), cast_output.GetDataType()); | 899 | cast_input.GetFormat(), cast_input.GetDataType(), cast_output.GetFormat(), cast_output.GetDataType()); |
| 900 | fusion_op_count = kInvalidFusionOpCount; | 900 | fusion_op_count = kInvalidFusionOpCount; |
| 901 | } | 901 | } |
| @@ -45,7 +45,7 @@ Status MemcpyAddrAsyncPass::Run(ComputeGraphPtr graph) { | |||
| 45 | static_cast<uint32_t>(rt_ret)); | 45 | static_cast<uint32_t>(rt_ret)); |
| 46 | 46 | ||
| 47 | if (value == ACL_DEV_FEATURE_NOT_SUPPORT) { | 47 | if (value == ACL_DEV_FEATURE_NOT_SUPPORT) { |
| 48 | - GELOGW("Not support zero copy, skip it."); | 48 | + GELOGW("Zero copy is not supported, skip it."); |
| 49 | return SUCCESS; | 49 | return SUCCESS; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| @@ -80,7 +80,7 @@ Status MemcpyAddrAsyncPass::Run(ComputeGraphPtr graph) { | |||
| 80 | // Hccl tell ge through task def. In this stage, no way to | 80 | // Hccl tell ge through task def. In this stage, no way to |
| 81 | // known this information, hard code to mark. | 81 | // known this information, hard code to mark. |
| 82 | if (OpUtils::IsHcomNodeNotSupportAddrRefresh(node->GetOpDesc())) { | 82 | if (OpUtils::IsHcomNodeNotSupportAddrRefresh(node->GetOpDesc())) { |
| 83 | - GELOGD("hccl engine op[%s] not support zero copy, need insert identity", node->GetName().c_str()); | 83 | + GELOGD("hccl engine op[%s] does not support zero copy, need insert identity", node->GetName().c_str()); |
| 84 | auto sub_graph = node->GetOwnerComputeGraph(); | 84 | auto sub_graph = node->GetOwnerComputeGraph(); |
| 85 | if (!IsFeatureMapRefreshable(graph, sub_graph)) { | 85 | if (!IsFeatureMapRefreshable(graph, sub_graph)) { |
| 86 | GE_ASSERT_SUCCESS(InsertMemAddrAsyncNodeBetweenHcclAndRefdata(sub_graph, node), | 86 | GE_ASSERT_SUCCESS(InsertMemAddrAsyncNodeBetweenHcclAndRefdata(sub_graph, node), |
| @@ -59,7 +59,7 @@ Status UpdateTensorShape(GeTensorDescPtr &ge_tensor, const std::vector<int64_t> | |||
| 59 | } | 59 | } |
| 60 | size_t origin_dim = shape.GetDimNum(); | 60 | size_t origin_dim = shape.GetDimNum(); |
| 61 | if ((!shape.ToString().empty()) && (origin_dim != dims.size())) { | 61 | if ((!shape.ToString().empty()) && (origin_dim != dims.size())) { |
| 62 | - GELOGE(FAILED, "Original shape dim[%zu] and updated dim[%zu] not match", origin_dim, dims.size()); | 62 | + GELOGE(FAILED, "Original shape dim[%zu] and updated dim[%zu] do not match", origin_dim, dims.size()); |
| 63 | return FAILED; | 63 | return FAILED; |
| 64 | } | 64 | } |
| 65 | ge_tensor->SetShape(GeShape(dims)); | 65 | ge_tensor->SetShape(GeShape(dims)); |
| @@ -314,7 +314,7 @@ Status CreateSubGraphWithScopePass::UpdateDynamicConfigAttrs(const std::vector<N | |||
| 314 | (void)GetContext().GetOption(DYNAMIC_NODE_TYPE, dynamic_node_type); | 314 | (void)GetContext().GetOption(DYNAMIC_NODE_TYPE, dynamic_node_type); |
| 315 | const std::string node_type_str = (dynamic_node_type == "0" ? "dataset" : "placeholder"); | 315 | const std::string node_type_str = (dynamic_node_type == "0" ? "dataset" : "placeholder"); |
| 316 | GE_CHK_BOOL_RET_STATUS(user_shape_map.size() == input_count, FAILED, | 316 | GE_CHK_BOOL_RET_STATUS(user_shape_map.size() == input_count, FAILED, |
| 317 | - "user_shape_map size %zu and input count %zu not match, node type is %s.", | 317 | + "user_shape_map size %zu and input count %zu do not match, node type is %s.", |
| 318 | user_shape_map.size(), input_count, node_type_str.c_str()); | 318 | user_shape_map.size(), input_count, node_type_str.c_str()); |
| 319 | 319 | ||
| 320 | std::vector<std::string> subgraph_multi_dims_input_shape; | 320 | std::vector<std::string> subgraph_multi_dims_input_shape; |
| @@ -340,7 +340,7 @@ Status CreateSubGraphWithScopePass::UpdateDynamicConfigAttrs(const std::vector<N | |||
| 340 | (void)AttrUtils::GetStr(dst_node_desc, ATTR_NAME_SUBGRAPH_MULTI_DIMS_INPUT_SHAPE, pre_subgraph_input_shape); | 340 | (void)AttrUtils::GetStr(dst_node_desc, ATTR_NAME_SUBGRAPH_MULTI_DIMS_INPUT_SHAPE, pre_subgraph_input_shape); |
| 341 | (void)AttrUtils::GetStr(dst_node_desc, ATTR_NAME_SUBGRAPH_MULTI_DIMS_INPUT_DIMS, pre_subgraph_input_dims); | 341 | (void)AttrUtils::GetStr(dst_node_desc, ATTR_NAME_SUBGRAPH_MULTI_DIMS_INPUT_DIMS, pre_subgraph_input_dims); |
| 342 | GE_CHK_BOOL_RET_STATUS((pre_subgraph_input_shape.empty()) == (pre_subgraph_input_dims.empty()), FAILED, | 342 | GE_CHK_BOOL_RET_STATUS((pre_subgraph_input_shape.empty()) == (pre_subgraph_input_dims.empty()), FAILED, |
| 343 | - "pre_subgraph_input_shape[%s] and pre_subgraph_input_dims[%s] not match", | 343 | + "pre_subgraph_input_shape[%s] and pre_subgraph_input_dims[%s] do not match", |
| 344 | pre_subgraph_input_shape.c_str(), pre_subgraph_input_dims.c_str()); | 344 | pre_subgraph_input_shape.c_str(), pre_subgraph_input_dims.c_str()); |
| 345 | GE_CHK_BOOL_RET_STATUS((input_index < subgraph_multi_dims_input_shape.size()) && | 345 | GE_CHK_BOOL_RET_STATUS((input_index < subgraph_multi_dims_input_shape.size()) && |
| 346 | (input_index < subgraph_multi_dims_input_dims.size()), | 346 | (input_index < subgraph_multi_dims_input_dims.size()), |
| @@ -376,8 +376,8 @@ Status CreateSubGraphWithScopePass::UpdateSubgraphMultiDimsAttr(NodePtr node, co | |||
| 376 | std::vector<std::string> pre_input_dims_vec = ge::StringUtils::Split(pre_input_dims, ';'); | 376 | std::vector<std::string> pre_input_dims_vec = ge::StringUtils::Split(pre_input_dims, ';'); |
| 377 | std::vector<std::string> new_input_dims_vec = ge::StringUtils::Split(new_input_dims, ';'); | 377 | std::vector<std::string> new_input_dims_vec = ge::StringUtils::Split(new_input_dims, ';'); |
| 378 | GE_CHK_BOOL_RET_STATUS(pre_input_dims_vec.size() == new_input_dims_vec.size(), FAILED, | 378 | GE_CHK_BOOL_RET_STATUS(pre_input_dims_vec.size() == new_input_dims_vec.size(), FAILED, |
| 379 | - "pre_input_dims size[%zu] and new_input_dims size[%zu] not match", pre_input_dims_vec.size(), | 379 | + "pre_input_dims size[%zu] and new_input_dims size[%zu] do not match", |
| 380 | - new_input_dims_vec.size()); | 380 | + pre_input_dims_vec.size(), new_input_dims_vec.size()); |
| 381 | std::string update_input_dims; | 381 | std::string update_input_dims; |
| 382 | for (size_t i = 0U; i < new_input_dims_vec.size(); ++i) { | 382 | for (size_t i = 0U; i < new_input_dims_vec.size(); ++i) { |
| 383 | update_input_dims.append(pre_input_dims_vec[i]).append(",").append(new_input_dims_vec[i]).append(";"); | 383 | update_input_dims.append(pre_input_dims_vec[i]).append(",").append(new_input_dims_vec[i]).append(";"); |
| @@ -443,8 +443,8 @@ Status CreateSubGraphWithScopePass::CollectScopeNodesByIndex(const ComputeGraphP | |||
| 443 | int32_t node_index = -1; | 443 | int32_t node_index = -1; |
| 444 | if (AttrUtils::GetInt(op_desc, ATTR_NAME_SUBGRAPH_MULTI_DIMS_INDEX, node_index) && node_index >= 0) { | 444 | if (AttrUtils::GetInt(op_desc, ATTR_NAME_SUBGRAPH_MULTI_DIMS_INDEX, node_index) && node_index >= 0) { |
| 445 | if (OpTypeUtils::IsDataNode(node->GetType()) || (node->GetType() == NETOUTPUT)) { | 445 | if (OpTypeUtils::IsDataNode(node->GetType()) || (node->GetType() == NETOUTPUT)) { |
| 446 | - REPORT_INNER_ERR_MSG("E19999", "Not support DATA/NETOUTPUT node[%s] in scope.", node->GetName().c_str()); | 446 | + REPORT_INNER_ERR_MSG("E19999", "DATA/NETOUTPUT node[%s] in scope is not supported.", node->GetName().c_str()); |
| 447 | - GELOGE(PARAM_INVALID, "Not support DATA/NETOUTPUT node[%s] in scope.", node->GetName().c_str()); | 447 | + GELOGE(PARAM_INVALID, "DATA/NETOUTPUT node[%s] in scope is not supported.", node->GetName().c_str()); |
| 448 | return PARAM_INVALID; | 448 | return PARAM_INVALID; |
| 449 | } | 449 | } |
| 450 | scopes_[node_index].push_back(node); | 450 | scopes_[node_index].push_back(node); |
| @@ -722,7 +722,7 @@ Status CreateSubGraphWithScopePass::MergeNodesToSubgraph(const std::vector<NodeP | |||
| 722 | } | 722 | } |
| 723 | // if node has control anchor outside scope, return failed | 723 | // if node has control anchor outside scope, return failed |
| 724 | GE_CHK_STATUS_RET(CheckCtrlAnchorInvalid(node, scope_nodes), | 724 | GE_CHK_STATUS_RET(CheckCtrlAnchorInvalid(node, scope_nodes), |
| 725 | - "[CHECK]Not support control edge cross scope, error node[%s].", node->GetName().c_str()); | 725 | + "[CHECK]Control edge cross scope is not supported, error node[%s].", node->GetName().c_str()); |
| 726 | const auto &parent_graph = node->GetOwnerComputeGraph(); | 726 | const auto &parent_graph = node->GetOwnerComputeGraph(); |
| 727 | GE_CHECK_NOTNULL(parent_graph); | 727 | GE_CHECK_NOTNULL(parent_graph); |
| 728 | if (GraphUtils::RemoveJustNode(parent_graph, node) != GRAPH_SUCCESS) { | 728 | if (GraphUtils::RemoveJustNode(parent_graph, node) != GRAPH_SUCCESS) { |
| @@ -1119,7 +1119,7 @@ Status MultiBatchClonePass::SetMaxShapeToData(const NodePtr &node, size_t out_an | |||
| 1119 | if (IsGetNextType(node)) { | 1119 | if (IsGetNextType(node)) { |
| 1120 | data_name.append("_").append(std::to_string(out_anchor_index)); | 1120 | data_name.append("_").append(std::to_string(out_anchor_index)); |
| 1121 | } | 1121 | } |
| 1122 | - GELOGD("Update max shape of %s, shape dims is %s.", data_name.c_str(), ToString(data_shape.GetDims()).c_str()); | 1122 | + GELOGD("Update max shape of %s, shape dims are %s.", data_name.c_str(), ToString(data_shape.GetDims()).c_str()); |
| 1123 | const auto &dims = data_shape.GetDims(); | 1123 | const auto &dims = data_shape.GetDims(); |
| 1124 | if (!IsGetNextType(node)) { | 1124 | if (!IsGetNextType(node)) { |
| 1125 | if (std::all_of(dims.begin(), dims.end(), [](int64_t val) { return val >= 0; })) { | 1125 | if (std::all_of(dims.begin(), dims.end(), [](int64_t val) { return val >= 0; })) { |
| @@ -1298,7 +1298,7 @@ Status MultiBatchClonePass::UpdateSubgraphData(const NodePtr &data, size_t batch | |||
| 1298 | 1298 | ||
| 1299 | auto data_shape = NodeUtils::GetOutputDesc(*data, kDataOutIndex).GetShape(); | 1299 | auto data_shape = NodeUtils::GetOutputDesc(*data, kDataOutIndex).GetShape(); |
| 1300 | const auto &dims = data_shape.GetDims(); | 1300 | const auto &dims = data_shape.GetDims(); |
| 1301 | - GELOGD("Start update shape of %s , batch index is %zu, dims is %s.", data->GetName().c_str(), batch_index, | 1301 | + GELOGD("Start update shape of %s , batch index is %zu, dims are %s.", data->GetName().c_str(), batch_index, |
| 1302 | ToString(dims).c_str()); | 1302 | ToString(dims).c_str()); |
| 1303 | if (std::all_of(dims.begin(), dims.end(), [](int64_t val) { return val >= 0; })) { | 1303 | if (std::all_of(dims.begin(), dims.end(), [](int64_t val) { return val >= 0; })) { |
| 1304 | return SUCCESS; | 1304 | return SUCCESS; |
| @@ -191,7 +191,7 @@ Status SubexpressionMigrationPass::Run(ComputeGraphPtr graph) { | |||
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | if (graph_nodes.empty()) { | 193 | if (graph_nodes.empty()) { |
| 194 | - GELOGW("Graph: %s nodes is empty", graph->GetName().c_str()); | 194 | + GELOGW("Graph: %s nodes are empty", graph->GetName().c_str()); |
| 195 | break; | 195 | break; |
| 196 | } | 196 | } |
| 197 | // {subgraph0, {{1, Data}, {2, Data}, {3, Data}, {4, Data}, ..., {n, Data}}} | 197 | // {subgraph0, {{1, Data}, {2, Data}, {3, Data}, {4, Data}, ..., {n, Data}}} |
| @@ -631,8 +631,8 @@ Status SubexpressionMigrationPass::MoveNodeToParent(const ComputeGraphPtr &graph | |||
| 631 | uint32_t base_index, const std::map<uint32_t, uint32_t> &inputs, | 631 | uint32_t base_index, const std::map<uint32_t, uint32_t> &inputs, |
| 632 | const std::map<uint32_t, uint32_t> &outputs) const { | 632 | const std::map<uint32_t, uint32_t> &outputs) const { |
| 633 | if (inputs.empty()) { | 633 | if (inputs.empty()) { |
| 634 | - REPORT_INNER_ERR_MSG("E19999", "Param inputs is empty, check invalid"); | 634 | + REPORT_INNER_ERR_MSG("E19999", "Param inputs are empty, check invalid"); |
| 635 | - GELOGE(FAILED, "[Check][Param] Param inputs is empty"); | 635 | + GELOGE(FAILED, "[Check][Param] Param inputs are empty"); |
| 636 | return FAILED; | 636 | return FAILED; |
| 637 | } | 637 | } |
| 638 | 638 | ||
| @@ -360,11 +360,12 @@ graphStatus InferShapePass::UpdateOutputFromSubgraphsForMultiDims(const std::vec | |||
| 360 | for (auto dim : shape.GetDims()) { | 360 | for (auto dim : shape.GetDims()) { |
| 361 | if (dim < 0) { | 361 | if (dim < 0) { |
| 362 | REPORT_INNER_ERR_MSG("E19999", | 362 | REPORT_INNER_ERR_MSG("E19999", |
| 363 | - "Multi-batch not support middle dynamic shape. CurrentShape: [%s]. Please " | 363 | + "Multi-batch does not support middle dynamic shape. CurrentShape: [%s]. Please " |
| 364 | "check nodes in graph which cause dynamic shape.", | 364 | "check nodes in graph which cause dynamic shape.", |
| 365 | shape.ToString().c_str()); | 365 | shape.ToString().c_str()); |
| 366 | GELOGE(PARAM_INVALID, | 366 | GELOGE(PARAM_INVALID, |
| 367 | - "[Check][NotSupport] DynamicDims with multi-batch not support middle dynamic shape. CurrentShape: [%s]. " | 367 | + "[Check][NotSupport] DynamicDims with multi-batch does not support middle dynamic shape. CurrentShape: " |
| 368 | + "[%s]. " | ||
| 368 | "Please check nodes in graph which cause dynamic shape.", | 369 | "Please check nodes in graph which cause dynamic shape.", |
| 369 | shape.ToString().c_str()); | 370 | shape.ToString().c_str()); |
| 370 | return PARAM_INVALID; | 371 | return PARAM_INVALID; |
| @@ -64,7 +64,7 @@ Status MarkGraphUnknownStatusPass::Run(ComputeGraphPtr graph) { | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | GE_CHK_BOOL_RET_STATUS(!(is_graph_no_tiling && is_unknown_shape), PARAM_INVALID, | 66 | GE_CHK_BOOL_RET_STATUS(!(is_graph_no_tiling && is_unknown_shape), PARAM_INVALID, |
| 67 | - "No tiling graph[%s] not support unknown shape node", graph->GetName().c_str()); | 67 | + "No tiling graph[%s] does not support unknown shape node", graph->GetName().c_str()); |
| 68 | 68 | ||
| 69 | const auto &node = graph->GetParentNode(); | 69 | const auto &node = graph->GetParentNode(); |
| 70 | if (!is_unknown_shape && !is_graph_no_tiling && node != nullptr && node->GetType() == PARTITIONEDCALL) { | 70 | if (!is_unknown_shape && !is_graph_no_tiling && node != nullptr && node->GetType() == PARTITIONEDCALL) { |
| @@ -221,7 +221,7 @@ Status ConstantFoldingPass::ComputePotentialWeight(NodePtr &node, std::vector<Ge | |||
| 221 | } | 221 | } |
| 222 | auto inputs = OpDescUtils::GetWeightsFromNodes(input_nodes_2_out_anchors); | 222 | auto inputs = OpDescUtils::GetWeightsFromNodes(input_nodes_2_out_anchors); |
| 223 | if (inputs.size() != input_nodes_2_out_anchors.size()) { | 223 | if (inputs.size() != input_nodes_2_out_anchors.size()) { |
| 224 | - GELOGW("Get weights from const_inputs size %zu, not match with inputs size %zu. Ignore pass.", inputs.size(), | 224 | + GELOGW("Get weights from const_inputs size %zu, does not match with inputs size %zu. Ignore pass.", inputs.size(), |
| 225 | input_nodes_2_out_anchors.size()); | 225 | input_nodes_2_out_anchors.size()); |
| 226 | return NOT_CHANGED; | 226 | return NOT_CHANGED; |
| 227 | } | 227 | } |
| @@ -158,7 +158,7 @@ bool PotentialFoldingPass::IsKnownEmptyTenor(const ge::GeShape &shape) const { | |||
| 158 | Status PotentialFoldingPass::UpdatePeerShapeIfChanged(const NodePtr &node, | 158 | Status PotentialFoldingPass::UpdatePeerShapeIfChanged(const NodePtr &node, |
| 159 | const std::vector<GeTensorPtr> &outputs) const { | 159 | const std::vector<GeTensorPtr> &outputs) const { |
| 160 | if (node->GetOpDesc()->GetOutputsSize() != outputs.size()) { | 160 | if (node->GetOpDesc()->GetOutputsSize() != outputs.size()) { |
| 161 | - GELOGE(INTERNAL_ERROR, "Out anchor size %zu, outputs size %zu, not match.", node->GetOpDesc()->GetOutputsSize(), | 161 | + GELOGE(INTERNAL_ERROR, "Out anchor size %zu, outputs size %zu, do not match.", node->GetOpDesc()->GetOutputsSize(), |
| 162 | outputs.size()); | 162 | outputs.size()); |
| 163 | return INTERNAL_ERROR; | 163 | return INTERNAL_ERROR; |
| 164 | } | 164 | } |
| @@ -50,7 +50,7 @@ Status CtrlEdgeTransferPass::Run(ge::ComputeGraphPtr graph) { | |||
| 50 | auto op_type = op_desc->GetType(); | 50 | auto op_type = op_desc->GetType(); |
| 51 | if (op_type == CONSTANT || op_type == CONSTANTOP) { | 51 | if (op_type == CONSTANT || op_type == CONSTANTOP) { |
| 52 | if (n->GetInAllNodes().empty()) { | 52 | if (n->GetInAllNodes().empty()) { |
| 53 | - GELOGD("[CtrlEdgeTransferPass] node [%s] in nodes is empty", n->GetName().c_str()); | 53 | + GELOGD("[CtrlEdgeTransferPass] node [%s] in nodes are empty", n->GetName().c_str()); |
| 54 | continue; | 54 | continue; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| @@ -607,7 +607,7 @@ Status ModifyTensorDescStorageFormatAndShape(const OpDescPtr &op_desc, Idx2Tenso | |||
| 607 | "The user defined storage format " + TypeUtils::FormatToSerialString(storage_format) + " is not supported"; | 607 | "The user defined storage format " + TypeUtils::FormatToSerialString(storage_format) + " is not supported"; |
| 608 | REPORT_PREDEFINED_ERR_MSG("E10055", std::vector<const char *>({"reason"}), | 608 | REPORT_PREDEFINED_ERR_MSG("E10055", std::vector<const char *>({"reason"}), |
| 609 | std::vector<const char *>({reason.c_str()})); | 609 | std::vector<const char *>({reason.c_str()})); |
| 610 | - GELOGE(PARAM_INVALID, "Not support user define storage format %s", | 610 | + GELOGE(PARAM_INVALID, "User defined storage format %s is not supported", |
| 611 | TypeUtils::FormatToSerialString(storage_format).c_str()); | 611 | TypeUtils::FormatToSerialString(storage_format).c_str()); |
| 612 | return FAILED; | 612 | return FAILED; |
| 613 | } | 613 | } |
| @@ -1176,7 +1176,7 @@ Status UpdateDynamicInputShapeRange(const int64_t index, | |||
| 1176 | "The origin shape size does not match the current dynamic input shape range size."})); | 1176 | "The origin shape size does not match the current dynamic input shape range size."})); |
| 1177 | GELOGE(PARAM_INVALID, | 1177 | GELOGE(PARAM_INVALID, |
| 1178 | "[Check][Param] For node %s. Given shape_range dim num is %zu, current dim num is %zu, " | 1178 | "[Check][Param] For node %s. Given shape_range dim num is %zu, current dim num is %zu, " |
| 1179 | - "not match. Please Check.", | 1179 | + "does not match. Please Check.", |
| 1180 | op->GetName().c_str(), current_shape_range_vec.size(), origin_shape.GetDimNum()); | 1180 | op->GetName().c_str(), current_shape_range_vec.size(), origin_shape.GetDimNum()); |
| 1181 | return PARAM_INVALID; | 1181 | return PARAM_INVALID; |
| 1182 | } | 1182 | } |
| @@ -1194,7 +1194,7 @@ Status UpdateDynamicInputShapeRange(const int64_t index, | |||
| 1194 | std::to_string(right_range).c_str(), reason.c_str()})); | 1194 | std::to_string(right_range).c_str(), reason.c_str()})); |
| 1195 | GELOGE(PARAM_INVALID, | 1195 | GELOGE(PARAM_INVALID, |
| 1196 | "[Check][Param] Given shape range is %ld, current dim shape is %ld, " | 1196 | "[Check][Param] Given shape range is %ld, current dim shape is %ld, " |
| 1197 | - "not match. Please Check.", | 1197 | + "do not match. Please Check.", |
| 1198 | left_range, curr_dim); | 1198 | left_range, curr_dim); |
| 1199 | return PARAM_INVALID; | 1199 | return PARAM_INVALID; |
| 1200 | } | 1200 | } |
| @@ -134,7 +134,7 @@ Status GetDataDimN(const ge::NodePtr &data_node, ge::Format format, int64_t &bat | |||
| 134 | ("Only format " + TypeUtils::FormatToSerialString(FORMAT_NCHW) + " and " + | 134 | ("Only format " + TypeUtils::FormatToSerialString(FORMAT_NCHW) + " and " + |
| 135 | TypeUtils::FormatToSerialString(FORMAT_NHWC) + " are supported when dynamic AIPP is linked.") | 135 | TypeUtils::FormatToSerialString(FORMAT_NHWC) + " are supported when dynamic AIPP is linked.") |
| 136 | .c_str()})); | 136 | .c_str()})); |
| 137 | - GELOGE(PARAM_INVALID, "[Check][Param] Not support data format:%s, node:%s", | 137 | + GELOGE(PARAM_INVALID, "[Check][Param] Data format:%s is not supported, node:%s", |
| 138 | TypeUtils::FormatToSerialString(format).c_str(), data_node->GetName().c_str()); | 138 | TypeUtils::FormatToSerialString(format).c_str(), data_node->GetName().c_str()); |
| 139 | return PARAM_INVALID; | 139 | return PARAM_INVALID; |
| 140 | } | 140 | } |
| @@ -626,7 +626,7 @@ Status AippOp::GetTargetPosition(ComputeGraphPtr graph, NodePtr &target_input, | |||
| 626 | for (const auto &name : func_desc->GetSubgraphInstanceNames()) { | 626 | for (const auto &name : func_desc->GetSubgraphInstanceNames()) { |
| 627 | const auto &subgraph = graph->GetSubgraph(name); | 627 | const auto &subgraph = graph->GetSubgraph(name); |
| 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 found 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) is not found 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()); |
| @@ -310,9 +310,9 @@ Status InsertAippOpUtil::FindMaxSizeNode(const ComputeGraphPtr &graph, const Nod | |||
| 310 | for (const auto &name : func_desc->GetSubgraphInstanceNames()) { | 310 | for (const auto &name : func_desc->GetSubgraphInstanceNames()) { |
| 311 | const auto &subgraph = graph->GetSubgraph(name); | 311 | const auto &subgraph = graph->GetSubgraph(name); |
| 312 | if (subgraph == nullptr) { | 312 | if (subgraph == nullptr) { |
| 313 | - REPORT_INNER_ERR_MSG("E19999", "Subgraph:%s of op:%s(%s) not find in graph:%s, check invalid", name.c_str(), | 313 | + REPORT_INNER_ERR_MSG("E19999", "Subgraph:%s of op:%s(%s) not found in graph:%s, check invalid", name.c_str(), |
| 314 | func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str()); | 314 | func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str()); |
| 315 | - GELOGE(GE_GRAPH_EMPTY_SUBGRAPH, "[Get][SubGraph] failed, Subgraph:%s of op:%s(%s) not find in graph:%s", | 315 | + GELOGE(GE_GRAPH_EMPTY_SUBGRAPH, "[Get][SubGraph] failed, Subgraph:%s of op:%s(%s) not found in graph:%s", |
| 316 | name.c_str(), func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str()); | 316 | name.c_str(), func_desc->GetName().c_str(), func_desc->GetType().c_str(), graph->GetName().c_str()); |
| 317 | return GE_GRAPH_EMPTY_SUBGRAPH; | 317 | return GE_GRAPH_EMPTY_SUBGRAPH; |
| 318 | } | 318 | } |
| @@ -581,9 +581,9 @@ Status InsertAippOpUtil::GetAllAipps(const NodePtr &data_node, const NodePtr &no | |||
| 581 | for (const auto &name : op->GetSubgraphInstanceNames()) { | 581 | for (const auto &name : op->GetSubgraphInstanceNames()) { |
| 582 | const auto &subgraph = graph->GetSubgraph(name); | 582 | const auto &subgraph = graph->GetSubgraph(name); |
| 583 | if (subgraph == nullptr) { | 583 | if (subgraph == nullptr) { |
| 584 | - REPORT_INNER_ERR_MSG("E19999", "Subgraph:%s of op:%s(%s) not find in graph:%s, check invalid", name.c_str(), | 584 | + REPORT_INNER_ERR_MSG("E19999", "Subgraph:%s of op:%s(%s) not found in graph:%s, check invalid", name.c_str(), |
| 585 | op->GetName().c_str(), op->GetType().c_str(), graph->GetName().c_str()); | 585 | op->GetName().c_str(), op->GetType().c_str(), graph->GetName().c_str()); |
| 586 | - GELOGE(GE_GRAPH_EMPTY_SUBGRAPH, "[Get][SubGraph] Subgraph:%s of op:%s(%s) not find in graph:%s", name.c_str(), | 586 | + GELOGE(GE_GRAPH_EMPTY_SUBGRAPH, "[Get][SubGraph] Subgraph:%s of op:%s(%s) not found in graph:%s", name.c_str(), |
| 587 | op->GetName().c_str(), op->GetType().c_str(), graph->GetName().c_str()); | 587 | op->GetName().c_str(), op->GetType().c_str(), graph->GetName().c_str()); |
| 588 | return GE_GRAPH_EMPTY_SUBGRAPH; | 588 | return GE_GRAPH_EMPTY_SUBGRAPH; |
| 589 | } | 589 | } |
| @@ -171,11 +171,11 @@ Status CheckSequenceOfGetnext(const ComputeGraphPtr &graph, const std::vector<No | |||
| 171 | GELOGD("Start check input sequence from getnext sink nodes and input shape."); | 171 | GELOGD("Start check input sequence from getnext sink nodes and input shape."); |
| 172 | if (getnext_sink_node.size() != kNumOfGetnextNode) { | 172 | if (getnext_sink_node.size() != kNumOfGetnextNode) { |
| 173 | REPORT_INNER_ERR_MSG("E19999", | 173 | REPORT_INNER_ERR_MSG("E19999", |
| 174 | - "Not support dynamic dims when a graph with multi getnext nodes, graph:%s, " | 174 | + "Dynamic dims are not supported when a graph with multi getnext nodes, graph:%s, " |
| 175 | "num of getnext node:%zu, check invalid", | 175 | "num of getnext node:%zu, check invalid", |
| 176 | graph->GetName().c_str(), getnext_sink_node.size()); | 176 | graph->GetName().c_str(), getnext_sink_node.size()); |
| 177 | GELOGE(PARAM_INVALID, | 177 | GELOGE(PARAM_INVALID, |
| 178 | - "[Check][Param] Not support dynamic dims when a graph with multi getnext nodes, graph:%s, " | 178 | + "[Check][Param] Dynamic dims are not supported when a graph with multi getnext nodes, graph:%s, " |
| 179 | "num of getnext node:%zu", | 179 | "num of getnext node:%zu", |
| 180 | graph->GetName().c_str(), getnext_sink_node.size()); | 180 | graph->GetName().c_str(), getnext_sink_node.size()); |
| 181 | return PARAM_INVALID; | 181 | return PARAM_INVALID; |
| @@ -249,11 +249,11 @@ Status UpdateNameOfGetnext(const ComputeGraphPtr &graph, const std::vector<NodeP | |||
| 249 | GELOGD("Update first value of input shape by getnext sink nodes."); | 249 | GELOGD("Update first value of input shape by getnext sink nodes."); |
| 250 | if (getnext_sink_nodes.size() != kNumOfGetnextNode) { | 250 | if (getnext_sink_nodes.size() != kNumOfGetnextNode) { |
| 251 | REPORT_INNER_ERR_MSG("E19999", | 251 | REPORT_INNER_ERR_MSG("E19999", |
| 252 | - "Not support dynamic dims when a graph with multi getnext nodes, graph:%s, " | 252 | + "Dynamic dims are not supported when a graph with multi getnext nodes, graph:%s, " |
| 253 | "num of getnext node:%zu, check invalid", | 253 | "num of getnext node:%zu, check invalid", |
| 254 | graph->GetName().c_str(), getnext_sink_nodes.size()); | 254 | graph->GetName().c_str(), getnext_sink_nodes.size()); |
| 255 | GELOGE(PARAM_INVALID, | 255 | GELOGE(PARAM_INVALID, |
| 256 | - "[Check][Param] Not support dynamic dims when a graph with multi getnext nodes, graph:%s, " | 256 | + "[Check][Param] Dynamic dims are not supported when a graph with multi getnext nodes, graph:%s, " |
| 257 | "num of getnext node:%zu", | 257 | "num of getnext node:%zu", |
| 258 | graph->GetName().c_str(), getnext_sink_nodes.size()); | 258 | graph->GetName().c_str(), getnext_sink_nodes.size()); |
| 259 | return PARAM_INVALID; | 259 | return PARAM_INVALID; |
| @@ -792,7 +792,7 @@ Status ParseInputShapes(const std::string &input_shapes, | |||
| 792 | } | 792 | } |
| 793 | 793 | ||
| 794 | if (shape_pair_vec[1].empty()) { | 794 | if (shape_pair_vec[1].empty()) { |
| 795 | - GELOGE(INTERNAL_ERROR, "The shape [%s] has a name, it's value cannot be empty", shape.c_str()); | 795 | + GELOGE(INTERNAL_ERROR, "The shape [%s] has a name, its value cannot be empty", shape.c_str()); |
| 796 | return INTERNAL_ERROR; | 796 | return INTERNAL_ERROR; |
| 797 | } | 797 | } |
| 798 | 798 | ||
| @@ -839,7 +839,7 @@ Status BuildSubgraphMuliDimsInput(const std::vector<std::pair<std::string, std:: | |||
| 839 | std::string tmp_dims; | 839 | std::string tmp_dims; |
| 840 | for (size_t j = 0U; j < dynamic_count; ++j) { | 840 | for (size_t j = 0U; j < dynamic_count; ++j) { |
| 841 | if (tmp[j].empty()) { | 841 | if (tmp[j].empty()) { |
| 842 | - GELOGI("input_shapes: %zu matched dims is empty", i); | 842 | + GELOGI("input_shapes: %zu matched dims are empty", i); |
| 843 | tmp_dims.clear(); | 843 | tmp_dims.clear(); |
| 844 | break; | 844 | break; |
| 845 | } | 845 | } |
| @@ -25,7 +25,7 @@ Status IdentityKernel::Compute(const ge::OpDescPtr op_desc, const std::vector<ge | |||
| 25 | return NOT_CHANGED; | 25 | return NOT_CHANGED; |
| 26 | } | 26 | } |
| 27 | if (input.empty()) { | 27 | if (input.empty()) { |
| 28 | - GELOGE(PARAM_INVALID, "Node [%s] inputs is empty.", op_desc->GetName().c_str()); | 28 | + GELOGE(PARAM_INVALID, "Node [%s] inputs are empty.", op_desc->GetName().c_str()); |
| 29 | return NOT_CHANGED; | 29 | return NOT_CHANGED; |
| 30 | } | 30 | } |
| 31 | if (op_desc->GetOutputsSize() < 1) { | 31 | if (op_desc->GetOutputsSize() < 1) { |
| @@ -45,7 +45,7 @@ Status ReshapeKernel::Compute(const ge::OpDescPtr op_desc_ptr, const std::vector | |||
| 45 | auto out_shape_size = output_tensor_desc.GetShape().GetShapeSize(); | 45 | auto out_shape_size = output_tensor_desc.GetShape().GetShapeSize(); |
| 46 | // check input_shape_size should equal with output_shape_size except scalar | 46 | // check input_shape_size should equal with output_shape_size except scalar |
| 47 | if ((in_shape_size != out_shape_size) && ((in_shape_size + out_shape_size) != 1)) { | 47 | if ((in_shape_size != out_shape_size) && ((in_shape_size + out_shape_size) != 1)) { |
| 48 | - GELOGW("Reshape %s input shape size %ld not match with output shape size %ld", op_desc_ptr->GetName().c_str(), | 48 | + GELOGW("Reshape %s input shape size %ld does not match with output shape size %ld", op_desc_ptr->GetName().c_str(), |
| 49 | in_shape_size, out_shape_size); | 49 | in_shape_size, out_shape_size); |
| 50 | return NOT_CHANGED; | 50 | return NOT_CHANGED; |
| 51 | } | 51 | } |
| @@ -190,14 +190,14 @@ Status DynamicStitchKernel::StitchDataFollowIndices(int64_t data_unit, const std | |||
| 190 | // if index repeated, need new data replace old data , so give more allowance | 190 | // if index repeated, need new data replace old data , so give more allowance |
| 191 | if (indices_set.find(input_indices[j]) != indices_set.end()) { | 191 | if (indices_set.find(input_indices[j]) != indices_set.end()) { |
| 192 | if (ge::CheckInt64AddOverflow(input_indices[j], data_unit) != SUCCESS) { | 192 | if (ge::CheckInt64AddOverflow(input_indices[j], data_unit) != SUCCESS) { |
| 193 | - GELOGW("Check int64 mul overflow failed. Indices is %d, data_unit is %ld.", input_indices[j], data_unit); | 193 | + GELOGW("Check int64 mul overflow failed. Indices are %d, data_unit is %ld.", input_indices[j], data_unit); |
| 194 | return NOT_CHANGED; | 194 | return NOT_CHANGED; |
| 195 | } | 195 | } |
| 196 | allowance += data_unit; | 196 | allowance += data_unit; |
| 197 | } | 197 | } |
| 198 | indices_set.insert(input_indices[j]); | 198 | indices_set.insert(input_indices[j]); |
| 199 | if (CheckInt64MulOverflow(input_indices[j], data_unit) != SUCCESS) { | 199 | if (CheckInt64MulOverflow(input_indices[j], data_unit) != SUCCESS) { |
| 200 | - GELOGW("Check int64 mul overflow failed. Indices is %d, data_unit is %ld.", input_indices[j], data_unit); | 200 | + GELOGW("Check int64 mul overflow failed. Indices are %d, data_unit is %ld.", input_indices[j], data_unit); |
| 201 | return NOT_CHANGED; | 201 | return NOT_CHANGED; |
| 202 | } | 202 | } |
| 203 | dst_offset = input_indices[j] * data_unit; | 203 | dst_offset = input_indices[j] * data_unit; |
| @@ -261,7 +261,7 @@ Status AddKernel::Compute(const OpDescPtr op_desc_ptr, const std::vector<ConstGe | |||
| 261 | SET_BCAST_ADD_CASE(DT_FLOAT, float); | 261 | SET_BCAST_ADD_CASE(DT_FLOAT, float); |
| 262 | SET_BCAST_ADD_CASE(DT_DOUBLE, double); | 262 | SET_BCAST_ADD_CASE(DT_DOUBLE, double); |
| 263 | default: | 263 | default: |
| 264 | - GELOGI("Add kernel data type %s not support.", TypeUtils::DataTypeToSerialString(data_type).c_str()); | 264 | + GELOGI("Add kernel data type %s is not supported.", TypeUtils::DataTypeToSerialString(data_type).c_str()); |
| 265 | return NOT_CHANGED; | 265 | return NOT_CHANGED; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| @@ -77,7 +77,7 @@ Status FloorDivKernel::FloorDivCheck(const OpDescPtr &op_desc_ptr, | |||
| 77 | return PARAM_INVALID; | 77 | return PARAM_INVALID; |
| 78 | } | 78 | } |
| 79 | if (kFloorDivSupportedType.find(x_data_dtype) == kFloorDivSupportedType.end()) { | 79 | if (kFloorDivSupportedType.find(x_data_dtype) == kFloorDivSupportedType.end()) { |
| 80 | - GELOGW("FloorDivKernel data type %s not support, node name: %s", | 80 | + GELOGW("FloorDivKernel data type %s is not supported, node name: %s", |
| 81 | TypeUtils::DataTypeToSerialString(x_data_dtype).c_str(), op_desc_ptr->GetName().c_str()); | 81 | TypeUtils::DataTypeToSerialString(x_data_dtype).c_str(), op_desc_ptr->GetName().c_str()); |
| 82 | return PARAM_INVALID; | 82 | return PARAM_INVALID; |
| 83 | } | 83 | } |
| @@ -135,7 +135,7 @@ Status SubKernel::Compute(const ge::OpDescPtr op_desc_ptr, const std::vector<ge: | |||
| 135 | SET_BCAST_COMPUTE_CASE(DT_FLOAT, float); | 135 | SET_BCAST_COMPUTE_CASE(DT_FLOAT, float); |
| 136 | SET_BCAST_COMPUTE_CASE(DT_DOUBLE, double); | 136 | SET_BCAST_COMPUTE_CASE(DT_DOUBLE, double); |
| 137 | default: | 137 | default: |
| 138 | - GELOGI("Sub kernel data type %s not support.", TypeUtils::DataTypeToSerialString(data_type).c_str()); | 138 | + GELOGI("Sub kernel data type %s is not supported.", TypeUtils::DataTypeToSerialString(data_type).c_str()); |
| 139 | ret = NOT_CHANGED; | 139 | ret = NOT_CHANGED; |
| 140 | break; | 140 | break; |
| 141 | } | 141 | } |
| @@ -53,7 +53,7 @@ Status KernelUtils::ConstructTensorDescWithData(const GeTensorDesc &out_desc, co | |||
| 53 | } else { | 53 | } else { |
| 54 | REPORT_INNER_ERR_MSG("E19999", "Only DT_INT32 and DT_INT64 are supported. Input data_type:%s is not supported", | 54 | REPORT_INNER_ERR_MSG("E19999", "Only DT_INT32 and DT_INT64 are supported. Input data_type:%s is not supported", |
| 55 | ToString(data).c_str()); | 55 | ToString(data).c_str()); |
| 56 | - GELOGE(PARAM_INVALID, "[Check][Param] Only support DT_INT32 and DT_INT64. data_type:%s not support", | 56 | + GELOGE(PARAM_INVALID, "[Check][Param] Only supports DT_INT32 and DT_INT64. data_type:%s is not supported", |
| 57 | TypeUtils::DataTypeToSerialString(data_type).c_str()); | 57 | TypeUtils::DataTypeToSerialString(data_type).c_str()); |
| 58 | return PARAM_INVALID; | 58 | return PARAM_INVALID; |
| 59 | } | 59 | } |
| @@ -60,7 +60,7 @@ Status ReduceProdKernel::ReduceProdCheck(const ge::OpDescPtr &op_desc_ptr, | |||
| 60 | 60 | ||
| 61 | DataType data_type = data_tensor->GetTensorDesc().GetDataType(); | 61 | DataType data_type = data_tensor->GetTensorDesc().GetDataType(); |
| 62 | if (kReduceProdSupportedType.find(data_type) == kReduceProdSupportedType.end()) { | 62 | if (kReduceProdSupportedType.find(data_type) == kReduceProdSupportedType.end()) { |
| 63 | - GELOGW("ReduceProdKernel data type %s not support, node name: %s", | 63 | + GELOGW("ReduceProdKernel data type %s is not supported, node name: %s", |
| 64 | TypeUtils::DataTypeToSerialString(data_type).c_str(), op_desc_ptr->GetName().c_str()); | 64 | TypeUtils::DataTypeToSerialString(data_type).c_str(), op_desc_ptr->GetName().c_str()); |
| 65 | return PARAM_INVALID; | 65 | return PARAM_INVALID; |
| 66 | } | 66 | } |
| @@ -184,12 +184,12 @@ Status ReduceProdKernel::ComputeNoAxis(const ge::OpDescPtr &op_desc_ptr, const s | |||
| 184 | ConstGeTensorPtr data_tensor = input.at(kReduceProdDataIndex); | 184 | ConstGeTensorPtr data_tensor = input.at(kReduceProdDataIndex); |
| 185 | GE_CHECK_NOTNULL(data_tensor); | 185 | GE_CHECK_NOTNULL(data_tensor); |
| 186 | if (data_tensor->GetData().size() == 0) { | 186 | if (data_tensor->GetData().size() == 0) { |
| 187 | - GELOGW("ReduceProdKernel data size of inputs is 0, node node: %s", op_desc_ptr->GetName().c_str()); | 187 | + GELOGW("ReduceProdKernel data size of inputs is 0, node name: %s", op_desc_ptr->GetName().c_str()); |
| 188 | return PARAM_INVALID; | 188 | return PARAM_INVALID; |
| 189 | } | 189 | } |
| 190 | DataType data_type = data_tensor->GetTensorDesc().GetDataType(); | 190 | DataType data_type = data_tensor->GetTensorDesc().GetDataType(); |
| 191 | if (kReduceProdSupportedType.find(data_type) == kReduceProdSupportedType.end()) { | 191 | if (kReduceProdSupportedType.find(data_type) == kReduceProdSupportedType.end()) { |
| 192 | - GELOGW("ReduceProdKernel data type %s not support, node name: %s", | 192 | + GELOGW("ReduceProdKernel data type %s is not supported, node name: %s", |
| 193 | TypeUtils::DataTypeToSerialString(data_type).c_str(), op_desc_ptr->GetName().c_str()); | 193 | TypeUtils::DataTypeToSerialString(data_type).c_str(), op_desc_ptr->GetName().c_str()); |
| 194 | return PARAM_INVALID; | 194 | return PARAM_INVALID; |
| 195 | } | 195 | } |
| @@ -68,7 +68,7 @@ Status GetSliceDataParams(const ConstGeTensorPtr &x_tensor, const std::vector<in | |||
| 68 | const ge::GeShape &x_shape = x_tensor->GetTensorDesc().GetShape(); | 68 | const ge::GeShape &x_shape = x_tensor->GetTensorDesc().GetShape(); |
| 69 | const size_t dim_size = x_shape.GetDimNum(); | 69 | const size_t dim_size = x_shape.GetDimNum(); |
| 70 | if (dim_size != orig_begin_vec.size() || dim_size != orig_size_vec.size()) { | 70 | if (dim_size != orig_begin_vec.size() || dim_size != orig_size_vec.size()) { |
| 71 | - GELOGW("Rank of x input %zu not match with offset_size(%zu) or size_input size (%zu)", dim_size, | 71 | + GELOGW("Rank of x input %zu does not match with offset_size(%zu) or size_input size (%zu)", dim_size, |
| 72 | orig_begin_vec.size(), orig_size_vec.size()); | 72 | orig_begin_vec.size(), orig_size_vec.size()); |
| 73 | return NOT_CHANGED; | 73 | return NOT_CHANGED; |
| 74 | } | 74 | } |
| @@ -425,7 +425,7 @@ void TeJsonAssemble::GenBuildinOutdescJson(const InOutToJsonParam &outputPara, | |||
| 425 | auto all_output_desc = current_node_desc->GetAllOutputsDesc(); | 425 | auto all_output_desc = current_node_desc->GetAllOutputsDesc(); |
| 426 | auto all_output_anchors = outputPara.node->GetAllOutDataAnchors(); | 426 | auto all_output_anchors = outputPara.node->GetAllOutDataAnchors(); |
| 427 | if (all_output_desc.size() != all_output_anchors.size()) { | 427 | if (all_output_desc.size() != all_output_anchors.size()) { |
| 428 | - TE_FUSION_LOG_EXEC(TE_FUSION_LOG_WARNING, "Output description and out anchor size not match: %zu %zu", | 428 | + TE_FUSION_LOG_EXEC(TE_FUSION_LOG_WARNING, "Output description and out anchor size do not match: %zu %zu", |
| 429 | all_output_desc.size(), all_output_anchors.size()); | 429 | all_output_desc.size(), all_output_anchors.size()); |
| 430 | } | 430 | } |
| 431 | 431 | ||
| @@ -299,7 +299,7 @@ bool BinaryManager::GetBinaryVersionInfo(const std::string &verFilePath, std::st | |||
| 299 | 299 | ||
| 300 | std::ifstream ifs(binVerFilePath); | 300 | std::ifstream ifs(binVerFilePath); |
| 301 | if (!ifs.is_open()) { | 301 | if (!ifs.is_open()) { |
| 302 | - TE_WARNLOGF("Open binary version file(%s) failed, not exist or has been opened.", binVerFilePath.c_str()); | 302 | + TE_WARNLOGF("Open binary version file(%s) failed, does not exist or has been opened.", binVerFilePath.c_str()); |
| 303 | return false; | 303 | return false; |
| 304 | } | 304 | } |
| 305 | std::string line; | 305 | std::string line; |
| @@ -629,7 +629,7 @@ bool BinaryManager::MatchConstValue(const json &binValueJson) { | |||
| 629 | "parameter."); | 629 | "parameter."); |
| 630 | return true; | 630 | return true; |
| 631 | } | 631 | } |
| 632 | - TE_WARNLOG("Binary json has const value. Not support match yet."); | 632 | + TE_WARNLOG("Binary json has const value. Match is not supported yet."); |
| 633 | return false; | 633 | return false; |
| 634 | } | 634 | } |
| 635 | 635 | ||
| @@ -1144,7 +1144,7 @@ bool BinaryManager::MatchSingleAttr(const json &opAttr, const json &binAttr) { | |||
| 1144 | iter = opAttr.find(VALUE); | 1144 | iter = opAttr.find(VALUE); |
| 1145 | if (iter == opAttr.end() || iter.value().is_null()) { | 1145 | if (iter == opAttr.end() || iter.value().is_null()) { |
| 1146 | // attr value may be erased by generalized parse, it means support all | 1146 | // attr value may be erased by generalized parse, it means support all |
| 1147 | - TE_DBGLOGF("Op attr has no value or value is null, support all. But bin not support all."); | 1147 | + TE_DBGLOGF("Op attr has no value or value is null, support all. But bin does not support all."); |
| 1148 | return false; | 1148 | return false; |
| 1149 | } | 1149 | } |
| 1150 | const json &opValue = iter.value(); | 1150 | const json &opValue = iter.value(); |
| @@ -1219,19 +1219,19 @@ bool BinaryManager::MatchOpParams(const OpBuildTaskPtr &opTask, json &binListJso | |||
| 1219 | for (auto iter = binListJson.begin(); iter != binListJson.end(); ++iter) { | 1219 | for (auto iter = binListJson.begin(); iter != binListJson.end(); ++iter) { |
| 1220 | const json binJson = *iter; | 1220 | const json binJson = *iter; |
| 1221 | if (!MatchDeterministic(generalizedResult.dynamicJson, binJson)) { | 1221 | if (!MatchDeterministic(generalizedResult.dynamicJson, binJson)) { |
| 1222 | - TE_DBGLOG("Node(%s) not match deterministic mode.", GetTaskNodeName(opTask).c_str()); | 1222 | + TE_DBGLOG("Node(%s) does not match deterministic mode.", GetTaskNodeName(opTask).c_str()); |
| 1223 | continue; | 1223 | continue; |
| 1224 | } | 1224 | } |
| 1225 | 1225 | ||
| 1226 | if (!MatchInputsOutputs(INPUTS, generalizedResult.dynamicJson, binJson, generalizedResult.optionalInputIdx)) { | 1226 | if (!MatchInputsOutputs(INPUTS, generalizedResult.dynamicJson, binJson, generalizedResult.optionalInputIdx)) { |
| 1227 | - TE_DBGLOG("Node(%s) not match inputs params", GetTaskNodeName(opTask).c_str()); | 1227 | + TE_DBGLOG("Node(%s) does not match inputs params", GetTaskNodeName(opTask).c_str()); |
| 1228 | continue; | 1228 | continue; |
| 1229 | } | 1229 | } |
| 1230 | 1230 | ||
| 1231 | // current not support optional output, in order to share functions, define an empty vector | 1231 | // current not support optional output, in order to share functions, define an empty vector |
| 1232 | std::vector<uint32_t> optionalOutputIdx; | 1232 | std::vector<uint32_t> optionalOutputIdx; |
| 1233 | if (!MatchInputsOutputs(OUTPUTS, generalizedResult.dynamicJson, binJson, optionalOutputIdx)) { | 1233 | if (!MatchInputsOutputs(OUTPUTS, generalizedResult.dynamicJson, binJson, optionalOutputIdx)) { |
| 1234 | - TE_DBGLOG("Node(%s) not match outputs params", GetTaskNodeName(opTask).c_str()); | 1234 | + TE_DBGLOG("Node(%s) does not match outputs params", GetTaskNodeName(opTask).c_str()); |
| 1235 | continue; | 1235 | continue; |
| 1236 | } | 1236 | } |
| 1237 | 1237 | ||
| @@ -1350,20 +1350,20 @@ bool BinaryManager::BinaryMatchWithStaticKeyAndDynInfo(const OpBuildTaskPtr &opT | |||
| 1350 | TE_DBGLOGF("Node(%s) optional input is %s.", opName.c_str(), tmp.dump().c_str()); | 1350 | TE_DBGLOGF("Node(%s) optional input is %s.", opName.c_str(), tmp.dump().c_str()); |
| 1351 | if (!generalizedResult.optionalInputIdx.empty()) { | 1351 | if (!generalizedResult.optionalInputIdx.empty()) { |
| 1352 | if (!MatchStaticKeyWithOptionalInputNull(opTask, binListJsonTmp, generalizedResult)) { | 1352 | if (!MatchStaticKeyWithOptionalInputNull(opTask, binListJsonTmp, generalizedResult)) { |
| 1353 | - TE_DBGLOGF("Node(%s) static key(%s) with optional input null not match binJson(%s). Need to compile.", | 1353 | + TE_DBGLOGF("Node(%s) static key(%s) with optional input null does not match binJson(%s). Need to compile.", |
| 1354 | opName.c_str(), generalizedResult.staticJson.dump().c_str(), binListJsonTmp.dump().c_str()); | 1354 | opName.c_str(), generalizedResult.staticJson.dump().c_str(), binListJsonTmp.dump().c_str()); |
| 1355 | return false; | 1355 | return false; |
| 1356 | } | 1356 | } |
| 1357 | binListJson = binListJsonTmp; | 1357 | binListJson = binListJsonTmp; |
| 1358 | } else { | 1358 | } else { |
| 1359 | - TE_DBGLOGF("Node(%s) static key(%s) not match binJson(%s). Need to compile.", opName.c_str(), | 1359 | + TE_DBGLOGF("Node(%s) static key(%s) does not match binJson(%s). Need to compile.", opName.c_str(), |
| 1360 | generalizedResult.staticJson.dump().c_str(), binListJson.dump().c_str()); | 1360 | generalizedResult.staticJson.dump().c_str(), binListJson.dump().c_str()); |
| 1361 | return false; | 1361 | return false; |
| 1362 | } | 1362 | } |
| 1363 | } | 1363 | } |
| 1364 | 1364 | ||
| 1365 | if (!MatchOpParams(opTask, binListJson, generalizedResult)) { | 1365 | if (!MatchOpParams(opTask, binListJson, generalizedResult)) { |
| 1366 | - TE_DBGLOGF("Node(%s) not match dynamic info(%s) binJson(%s). Need to compile", opName.c_str(), | 1366 | + TE_DBGLOGF("Node(%s) does not match dynamic info(%s) binJson(%s). Need to compile", opName.c_str(), |
| 1367 | generalizedResult.dynamicJson.dump().c_str(), binListJson.dump().c_str()); | 1367 | generalizedResult.dynamicJson.dump().c_str(), binListJson.dump().c_str()); |
| 1368 | return false; | 1368 | return false; |
| 1369 | } | 1369 | } |
| @@ -1417,7 +1417,7 @@ bool BinaryManager::GenerateAndMatchSimpleKey(ge::Node *opNode, const TbeOpInfoP | |||
| 1417 | const std::string &opImplMode = opInfo->GetOpImplMode(); | 1417 | const std::string &opImplMode = opInfo->GetOpImplMode(); |
| 1418 | bool isUnknowShape = opInfo->GetIsUnknownShape(); | 1418 | bool isUnknowShape = opInfo->GetIsUnknownShape(); |
| 1419 | if (CheckMemoryL1MemoryL2(opType, inputs) || CheckMemoryL1MemoryL2(opType, outputs)) { | 1419 | if (CheckMemoryL1MemoryL2(opType, inputs) || CheckMemoryL1MemoryL2(opType, outputs)) { |
| 1420 | - TE_INFOLOG("Node[%s], opType[%s] has memoryL1 or MemoryL2, Not support simpleKey binary.", | 1420 | + TE_INFOLOG("Node[%s], opType[%s] has memoryL1 or MemoryL2, does not support simpleKey binary.", |
| 1421 | opNode->GetName().c_str(), opType.c_str()); | 1421 | opNode->GetName().c_str(), opType.c_str()); |
| 1422 | return false; | 1422 | return false; |
| 1423 | } | 1423 | } |
| @@ -1506,7 +1506,7 @@ bool BinaryManager::ReuseKernelBinaryCompileRes(const OpBuildTaskPtr &opTask) { | |||
| 1506 | } | 1506 | } |
| 1507 | 1507 | ||
| 1508 | if (!MatchFusionOpGraphPattern(opTask, binListJson)) { | 1508 | if (!MatchFusionOpGraphPattern(opTask, binListJson)) { |
| 1509 | - TE_INFOLOG("Node(%s) graph pattern not match. Need to compile", GetTaskNodeName(opTask).c_str()); | 1509 | + TE_INFOLOG("Node(%s) graph pattern does not match. Need to compile", GetTaskNodeName(opTask).c_str()); |
| 1510 | return false; | 1510 | return false; |
| 1511 | } | 1511 | } |
| 1512 | 1512 | ||
| @@ -1517,7 +1517,7 @@ bool BinaryManager::ReuseKernelBinaryCompileRes(const OpBuildTaskPtr &opTask) { | |||
| 1517 | } | 1517 | } |
| 1518 | 1518 | ||
| 1519 | if (!BinaryMatchWithStaticKeyAndDynInfo(opTask, generalizedResult, binListJson)) { | 1519 | if (!BinaryMatchWithStaticKeyAndDynInfo(opTask, generalizedResult, binListJson)) { |
| 1520 | - TE_INFOLOG("Node(%s) staticKey or dynInfo not match. Need to compile", GetTaskNodeName(opTask).c_str()); | 1520 | + TE_INFOLOG("Node(%s) staticKey or dynInfo does not match. Need to compile", GetTaskNodeName(opTask).c_str()); |
| 1521 | return false; | 1521 | return false; |
| 1522 | } | 1522 | } |
| 1523 | 1523 | ||
| @@ -1586,7 +1586,7 @@ bool BinaryManager::FusionOpReuseOmBinary(const OpBuildTaskPtr &opTask, json &bi | |||
| 1586 | } | 1586 | } |
| 1587 | 1587 | ||
| 1588 | if (!CheckMatchInBinListByKey(opTask, BINARY_OM_KEY_ID, omKeyId, binListJson)) { | 1588 | if (!CheckMatchInBinListByKey(opTask, BINARY_OM_KEY_ID, omKeyId, binListJson)) { |
| 1589 | - TE_DBGLOG("Node(%s) omKeyId(%s) not match in binary file. Not reuse om binary files", | 1589 | + TE_DBGLOG("Node(%s) omKeyId(%s) does not match in binary file. Not reuse om binary files", |
| 1590 | GetTaskNodeName(opTask).c_str(), omKeyId.c_str()); | 1590 | GetTaskNodeName(opTask).c_str(), omKeyId.c_str()); |
| 1591 | return false; | 1591 | return false; |
| 1592 | } | 1592 | } |
| @@ -1823,7 +1823,7 @@ void BinaryManager::GetBinaryVersion(const OpBuildTaskPtr &opTask, bool isOm, st | |||
| 1823 | adkVrsion.c_str(), oppVersion.c_str()); | 1823 | adkVrsion.c_str(), oppVersion.c_str()); |
| 1824 | return; | 1824 | return; |
| 1825 | } | 1825 | } |
| 1826 | - TE_DBGLOG("Not find op version!"); | 1826 | + TE_DBGLOG("Did not find op version!"); |
| 1827 | return; | 1827 | return; |
| 1828 | } | 1828 | } |
| 1829 | } // namespace fusion | 1829 | } // namespace fusion |
| @@ -312,7 +312,7 @@ bool BinaryInfoBase::GenerateDtypeFormatMode(const std::string &opType, const nl | |||
| 312 | DtypeFormatMode inputMode; | 312 | DtypeFormatMode inputMode; |
| 313 | DtypeFormatMode outputMode; | 313 | DtypeFormatMode outputMode; |
| 314 | if (binaryInfoParams.empty()) { | 314 | if (binaryInfoParams.empty()) { |
| 315 | - TE_ERRLOG("opType [%s], binaryInfo params is empty.", opType.c_str()); | 315 | + TE_ERRLOG("opType [%s], binaryInfo params are empty.", opType.c_str()); |
| 316 | return false; | 316 | return false; |
| 317 | } | 317 | } |
| 318 | GenerateInOutPutMode(opType, INPUTS, binaryInfoParams, inputMode); | 318 | GenerateInOutPutMode(opType, INPUTS, binaryInfoParams, inputMode); |
| @@ -404,7 +404,7 @@ bool BinaryInfoBase::ProcessSingleOpBinaryInfo(const std::string &opType, const | |||
| 404 | } | 404 | } |
| 405 | nlohmann::json binaryInfoParams = iterJsonValue[BINARY_INFO_CONFIG_PARAMS]; | 405 | nlohmann::json binaryInfoParams = iterJsonValue[BINARY_INFO_CONFIG_PARAMS]; |
| 406 | if (!GenerateDtypeFormatMode(opType, binaryInfoParams)) { | 406 | if (!GenerateDtypeFormatMode(opType, binaryInfoParams)) { |
| 407 | - TE_ERRLOG("opType [%s], params is empty. return failed.", opType.c_str()); | 407 | + TE_ERRLOG("opType [%s], params are empty. return failed.", opType.c_str()); |
| 408 | return false; | 408 | return false; |
| 409 | } | 409 | } |
| 410 | if (iterJsonValue.find(OP_BINARY_LIST) == iterJsonValue.end()) { | 410 | if (iterJsonValue.find(OP_BINARY_LIST) == iterJsonValue.end()) { |
| @@ -56,7 +56,7 @@ void BinaryManager::ShapeLimitedGeneralize(int64_t &shapeValue, const int64_t &v | |||
| 56 | if (item != rangeSection.end()) { | 56 | if (item != rangeSection.end()) { |
| 57 | newShapeRange.emplace_back(*item); | 57 | newShapeRange.emplace_back(*item); |
| 58 | } else { | 58 | } else { |
| 59 | - TE_WARNLOGF("Not find range for %ld in rangeSection.", shapeValue); | 59 | + TE_WARNLOGF("Did not find range for %ld in rangeSection.", shapeValue); |
| 60 | return; | 60 | return; |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| @@ -251,7 +251,7 @@ bool BinaryManager::IsSpecShapeAndRange(const OpBuildTaskPtr &opTask) { | |||
| 251 | for (const auto &node : opTask->opNodes) { | 251 | for (const auto &node : opTask->opNodes) { |
| 252 | auto opDesc = node->GetOpDesc(); | 252 | auto opDesc = node->GetOpDesc(); |
| 253 | if (!CheckIsSpecShape(opDesc)) { | 253 | if (!CheckIsSpecShape(opDesc)) { |
| 254 | - TE_DBGLOG("Node(%s) is not spec shape[-2,] or all dims is -1", node->GetName().c_str()); | 254 | + TE_DBGLOG("Node(%s) is not spec shape[-2,] or all dims are -1", node->GetName().c_str()); |
| 255 | return false; | 255 | return false; |
| 256 | } | 256 | } |
| 257 | } | 257 | } |
| @@ -311,7 +311,7 @@ bool BinaryManager::GetJsonFilePathInBinList(const OpBuildTaskPtr &opTask, const | |||
| 311 | try { | 311 | try { |
| 312 | binFilePath = iter.value().get<std::string>(); | 312 | binFilePath = iter.value().get<std::string>(); |
| 313 | } catch (const std::exception &e) { | 313 | } catch (const std::exception &e) { |
| 314 | - TE_WARNLOG("Not get node(%s) binFilePath value. reason is %s.", opName.c_str(), e.what()); | 314 | + TE_WARNLOG("Did not get node(%s) binFilePath value. reason is %s.", opName.c_str(), e.what()); |
| 315 | return false; | 315 | return false; |
| 316 | } | 316 | } |
| 317 | TE_DBGLOG("Node(%s) get bin info file path:%s.", opName.c_str(), binFilePath.c_str()); | 317 | TE_DBGLOG("Node(%s) get bin info file path:%s.", opName.c_str(), binFilePath.c_str()); |
| @@ -38,7 +38,7 @@ bool BinaryManager::SingleOpReuseOmBinary(const OpBuildTaskPtr &opTask, json &bi | |||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | if (!BinaryMatchWithStaticKeyAndDynInfo(opTask, generalizedResult, binListJson)) { | 40 | if (!BinaryMatchWithStaticKeyAndDynInfo(opTask, generalizedResult, binListJson)) { |
| 41 | - TE_DBGLOG("Node(%s) staticKey or dynInfo not match. Need to compile", GetTaskNodeName(opTask).c_str()); | 41 | + TE_DBGLOG("Node(%s) staticKey or dynInfo does not match. Need to compile", GetTaskNodeName(opTask).c_str()); |
| 42 | return false; | 42 | return false; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| @@ -689,7 +689,7 @@ bool ShapeGeneralization::GenerateNormalizeFusionOutputTmpJson(const ge::Node *c | |||
| 689 | auto allOutputDesc = nodeDesc->GetAllOutputsDesc(); | 689 | auto allOutputDesc = nodeDesc->GetAllOutputsDesc(); |
| 690 | auto allOutputAnchors = currentNode->GetAllOutDataAnchors(); | 690 | auto allOutputAnchors = currentNode->GetAllOutDataAnchors(); |
| 691 | if (allOutputDesc.size() != allOutputAnchors.size()) { | 691 | if (allOutputDesc.size() != allOutputAnchors.size()) { |
| 692 | - TE_FUSION_LOG_EXEC(TE_FUSION_LOG_WARNING, "Output description and out anchor size not match: %zu %zu", | 692 | + TE_FUSION_LOG_EXEC(TE_FUSION_LOG_WARNING, "Output description and out anchor size do not match: %zu %zu", |
| 693 | allOutputDesc.size(), allOutputAnchors.size()); | 693 | allOutputDesc.size(), allOutputAnchors.size()); |
| 694 | } | 694 | } |
| 695 | 695 | ||
| @@ -834,7 +834,7 @@ bool ShapeGeneralization::GenerateNormalizeFusionAttrTmpJsonPart1(const ConstTbe | |||
| 834 | ATTR_DTYPE attrType = item.GetType(); | 834 | ATTR_DTYPE attrType = item.GetType(); |
| 835 | std::map<ATTR_DTYPE, std::string>::const_iterator iter = g_attrDtypeToString.find(attrType); | 835 | std::map<ATTR_DTYPE, std::string>::const_iterator iter = g_attrDtypeToString.find(attrType); |
| 836 | if (iter == g_attrDtypeToString.end()) { | 836 | if (iter == g_attrDtypeToString.end()) { |
| 837 | - TE_WARNLOG("Not support attr dtype: %u.", attrType); | 837 | + TE_WARNLOG("Attr dtype %u is not supported.", attrType); |
| 838 | return false; | 838 | return false; |
| 839 | } | 839 | } |
| 840 | std::string attrDtype = iter->second; | 840 | std::string attrDtype = iter->second; |
| @@ -172,7 +172,7 @@ bool TeFileUtils::IsObjFileExsit(const std::string &opName, const std::string &j | |||
| 172 | TE_WARNLOG("o file path [%s] does not exist.", oFilePath.c_str()); | 172 | TE_WARNLOG("o file path [%s] does not exist.", oFilePath.c_str()); |
| 173 | return false; | 173 | return false; |
| 174 | } | 174 | } |
| 175 | - TE_DBGLOG("Check binary file invalid successfully."); | 175 | + TE_DBGLOG("Check binary file successfully."); |
| 176 | return true; | 176 | return true; |
| 177 | } | 177 | } |
| 178 | // mix pattern | 178 | // mix pattern |
| @@ -1177,7 +1177,7 @@ bool TeFusionManager::IsFusionCheckTask(const OpBuildTaskPtr &opTask) { | |||
| 1177 | * @return bool true: success, false: fail | 1177 | * @return bool true: success, false: fail |
| 1178 | */ | 1178 | */ |
| 1179 | bool TeFusionManager::BuildFusionOp(OpBuildTaskPtr &opTask, const std::string &opCompileStrategyStr) { | 1179 | bool TeFusionManager::BuildFusionOp(OpBuildTaskPtr &opTask, const std::string &opCompileStrategyStr) { |
| 1180 | - TE_INFOLOG("Build taskID:[%lu:%lu]. Nodes is [%s]. CompileStrategy is [%s].", opTask->graphId, opTask->taskId, | 1180 | + TE_INFOLOG("Build taskID:[%lu:%lu]. Nodes are [%s]. CompileStrategy is [%s].", opTask->graphId, opTask->taskId, |
| 1181 | GetNodesName(opTask->opNodes).c_str(), opCompileStrategyStr.c_str()); | 1181 | GetNodesName(opTask->opNodes).c_str(), opCompileStrategyStr.c_str()); |
| 1182 | 1182 | ||
| 1183 | opTask->opRes = nullptr; | 1183 | opTask->opRes = nullptr; |
| @@ -296,14 +296,14 @@ bool PluginManager::GetRequiredOppAbiVersion(std::vector<std::pair<uint32_t, uin | |||
| 296 | } else if (mmIsDir((model_path + kRuntimePath).c_str()) == EN_OK) { | 296 | } else if (mmIsDir((model_path + kRuntimePath).c_str()) == EN_OK) { |
| 297 | version_path = model_path + kRuntimePath + kVersionInfo; | 297 | version_path = model_path + kRuntimePath + kVersionInfo; |
| 298 | } else { | 298 | } else { |
| 299 | - GELOGW("compiler and runtime not exist"); | 299 | + GELOGW("compiler and runtime do not exist"); |
| 300 | return true; | 300 | return true; |
| 301 | } | 301 | } |
| 302 | 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()); |
| 303 | 303 | ||
| 304 | std::string version; | 304 | std::string version; |
| 305 | if (!PluginManager::GetVersionFromPathWithName(version_path, version, kRequiredOppAbiVersion)) { | 305 | if (!PluginManager::GetVersionFromPathWithName(version_path, version, kRequiredOppAbiVersion)) { |
| 306 | - GELOGW("Not get required_opp_abi_version from path:%s", version_path.c_str()); | 306 | + GELOGW("Failed to get required_opp_abi_version from path:%s", version_path.c_str()); |
| 307 | return true; | 307 | return true; |
| 308 | } | 308 | } |
| 309 | 309 | ||
| @@ -1067,7 +1067,7 @@ void PluginManager::GetCurEnvPackageOsAndCpuType(std::string &host_env_os, std:: | |||
| 1067 | } 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) { |
| 1068 | scene = model_path + kRuntimePath + kScene; | 1068 | scene = model_path + kRuntimePath + kScene; |
| 1069 | } else { | 1069 | } else { |
| 1070 | - GELOGW("opp and runtime not exist"); | 1070 | + GELOGW("opp and runtime do not exist"); |
| 1071 | return; | 1071 | return; |
| 1072 | } | 1072 | } |
| 1073 | GELOGI("extract os and cpu info from %s", scene.c_str()); | 1073 | GELOGI("extract os and cpu info from %s", scene.c_str()); |
| @@ -313,7 +313,7 @@ DataType TypeUtilsInner::SerialStringToDataType(const std::string &str) { | |||
| 313 | if (it != kStringTodataTypeMap.end()) { | 313 | if (it != kStringTodataTypeMap.end()) { |
| 314 | return it->second; | 314 | return it->second; |
| 315 | } | 315 | } |
| 316 | - GELOGW("[Check][Param] SerialStringToDataType: datatype not support %s", str.c_str()); | 316 | + GELOGW("[Check][Param] SerialStringToDataType: datatype %s is not supported", str.c_str()); |
| 317 | return DT_UNDEFINED; | 317 | return DT_UNDEFINED; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| @@ -330,7 +330,7 @@ Format TypeUtilsInner::SerialStringToFormat(const std::string &str) { | |||
| 330 | int32_t primary_format = it->second; | 330 | int32_t primary_format = it->second; |
| 331 | return static_cast<Format>(GetFormatFromSub(primary_format, sub_format)); | 331 | return static_cast<Format>(GetFormatFromSub(primary_format, sub_format)); |
| 332 | } else { | 332 | } else { |
| 333 | - GELOGW("[Check][Param] Format not support %s", str.c_str()); | 333 | + GELOGW("[Check][Param] Format %s is not supported", str.c_str()); |
| 334 | return FORMAT_RESERVED; | 334 | return FORMAT_RESERVED; |
| 335 | } | 335 | } |
| 336 | } | 336 | } |
| @@ -343,7 +343,7 @@ std::string TypeUtilsInner::FormatToSerialString(const Format format) { | |||
| 343 | } | 343 | } |
| 344 | return it->second.c_str(); | 344 | return it->second.c_str(); |
| 345 | } else { | 345 | } else { |
| 346 | - GELOGW("[Check][Param] Format not support %d", format); | 346 | + GELOGW("[Check][Param] Format %d is not supported", format); |
| 347 | return "RESERVED"; | 347 | return "RESERVED"; |
| 348 | } | 348 | } |
| 349 | } | 349 | } |
| @@ -353,7 +353,7 @@ std::string TypeUtilsInner::DataTypeToSerialString(const DataType data_type) { | |||
| 353 | if (it != kDataTypeToStringMap.end()) { | 353 | if (it != kDataTypeToStringMap.end()) { |
| 354 | return it->second.c_str(); | 354 | return it->second.c_str(); |
| 355 | } else { | 355 | } else { |
| 356 | - GELOGW("DataTypeToSerialString: datatype not support %d", data_type); | 356 | + GELOGW("DataTypeToSerialString: datatype %d is not supported", data_type); |
| 357 | return "UNDEFINED"; | 357 | return "UNDEFINED"; |
| 358 | } | 358 | } |
| 359 | } | 359 | } |
| @@ -1009,7 +1009,7 @@ std::string AttrUtils::ValueTypeToSerialString(const AnyValue::ValueType value_t | |||
| 1009 | return it->second; | 1009 | return it->second; |
| 1010 | } else { | 1010 | } else { |
| 1011 | REPORT_INNER_ERR_MSG("E18888", "value_type %d is not supported", 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 %d is not supported", value_type); |
| 1013 | return ""; | 1013 | return ""; |
| 1014 | } | 1014 | } |
| 1015 | } | 1015 | } |
| @@ -1020,7 +1020,7 @@ AnyValue::ValueType AttrUtils::SerialStringToValueType(const string &value_type_ | |||
| 1020 | return it->second; | 1020 | return it->second; |
| 1021 | } else { | 1021 | } else { |
| 1022 | REPORT_INNER_ERR_MSG("E18888", "value_type_string %s is not supported", 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 %s is not supported", value_type_string.c_str()); |
| 1024 | return AnyValue::VT_NONE; | 1024 | return AnyValue::VT_NONE; |
| 1025 | } | 1025 | } |
| 1026 | } | 1026 | } |
| @@ -196,12 +196,12 @@ bool TensorInfoArgs::IsShapeInRange(const TensorInfoArgs &other) const { | |||
| 196 | // check shape range when shape is dynamic | 196 | // check shape range when shape is dynamic |
| 197 | if (this->IsUnknownShape()) { | 197 | if (this->IsUnknownShape()) { |
| 198 | if (this->shape_.size() != this->shape_range_.size()) { | 198 | if (this->shape_.size() != this->shape_range_.size()) { |
| 199 | - GELOGD("shape size %zu is not match shape range size %zu", this->shape_.size(), this->shape_range_.size()); | 199 | + GELOGD("shape size %zu does not match shape range size %zu", this->shape_.size(), this->shape_range_.size()); |
| 200 | return false; | 200 | return false; |
| 201 | } | 201 | } |
| 202 | for (size_t i = 0U; i < this->shape_range_.size(); ++i) { | 202 | for (size_t i = 0U; i < this->shape_range_.size(); ++i) { |
| 203 | if (this->shape_range_[i].first > other.shape_[i]) { | 203 | if (this->shape_range_[i].first > other.shape_[i]) { |
| 204 | - GELOGD("shape range is not match, first is %" PRId64 ", other is %" PRId64 ", index is %zu", | 204 | + GELOGD("shape range does not match, first is %" PRId64 ", other is %" PRId64 ", index is %zu", |
| 205 | this->shape_range_[i].first, other.shape_[i], i); | 205 | this->shape_range_[i].first, other.shape_[i], i); |
| 206 | return false; | 206 | return false; |
| 207 | } | 207 | } |
| @@ -211,7 +211,7 @@ bool TensorInfoArgs::IsShapeInRange(const TensorInfoArgs &other) const { | |||
| 211 | continue; | 211 | continue; |
| 212 | } | 212 | } |
| 213 | if (this->shape_range_[i].second < other.shape_[i]) { | 213 | if (this->shape_range_[i].second < other.shape_[i]) { |
| 214 | - GELOGD("shape range is not match, second is %" PRId64 ", other is %" PRId64 ", index is %zu", | 214 | + GELOGD("shape range does not match, second is %" PRId64 ", other is %" PRId64 ", index is %zu", |
| 215 | this->shape_range_[i].second, other.shape_[i], i); | 215 | this->shape_range_[i].second, other.shape_[i], i); |
| 216 | return false; | 216 | return false; |
| 217 | } | 217 | } |
| @@ -263,21 +263,21 @@ void CompileCacheDesc::SetScopeId(const std::initializer_list<uint64_t> scope_id | |||
| 263 | bool CompileCacheDesc::CheckWithoutTensorInfo(const CompileCacheDesc *first, const CompileCacheDesc *second) const { | 263 | bool CompileCacheDesc::CheckWithoutTensorInfo(const CompileCacheDesc *first, const CompileCacheDesc *second) const { |
| 264 | if ((first->op_type_ != second->op_type_) || | 264 | if ((first->op_type_ != second->op_type_) || |
| 265 | (first->tensor_info_args_vec_.size() != second->tensor_info_args_vec_.size())) { | 265 | (first->tensor_info_args_vec_.size() != second->tensor_info_args_vec_.size())) { |
| 266 | - GELOGD("op_type_ %s, %s is not match or size %zu %zu is not match", first->op_type_.c_str(), | 266 | + GELOGD("op_type_ %s, %s does not match or size %zu %zu does not match", first->op_type_.c_str(), |
| 267 | second->op_type_.c_str(), first->tensor_info_args_vec_.size(), second->tensor_info_args_vec_.size()); | 267 | second->op_type_.c_str(), first->tensor_info_args_vec_.size(), second->tensor_info_args_vec_.size()); |
| 268 | return false; | 268 | return false; |
| 269 | } | 269 | } |
| 270 | if (first->scope_id_ != second->scope_id_) { | 270 | if (first->scope_id_ != second->scope_id_) { |
| 271 | - GELOGD("scope id is not match"); | 271 | + GELOGD("scope id does not match"); |
| 272 | return false; | 272 | return false; |
| 273 | } | 273 | } |
| 274 | if (first->other_desc_.size() != second->other_desc_.size()) { | 274 | if (first->other_desc_.size() != second->other_desc_.size()) { |
| 275 | - GELOGD("other_desc_ size %zu, %zu is not match ", first->other_desc_.size(), second->other_desc_.size()); | 275 | + GELOGD("other_desc_ size %zu, %zu does not match ", first->other_desc_.size(), second->other_desc_.size()); |
| 276 | return false; | 276 | return false; |
| 277 | } | 277 | } |
| 278 | for (size_t i = 0U; i < first->other_desc_.size(); ++i) { | 278 | for (size_t i = 0U; i < first->other_desc_.size(); ++i) { |
| 279 | if (first->other_desc_[i].GetDataLen() != second->other_desc_[i].GetDataLen()) { | 279 | if (first->other_desc_[i].GetDataLen() != second->other_desc_[i].GetDataLen()) { |
| 280 | - GELOGD("other_desc_ mem size %zu, %zu is not match ", first->other_desc_[i].GetDataLen(), | 280 | + GELOGD("other_desc_ mem size %zu, %zu does not match ", first->other_desc_[i].GetDataLen(), |
| 281 | second->other_desc_[i].GetDataLen()); | 281 | second->other_desc_[i].GetDataLen()); |
| 282 | return false; | 282 | return false; |
| 283 | } | 283 | } |
| @@ -422,20 +422,20 @@ graphStatus ShapeEnvAttr::AppendReplacement(const ge::Expression &target, const | |||
| 422 | // 仅支持 符号->常量,符号->表达式,符号->符号 映射 | 422 | // 仅支持 符号->常量,符号->表达式,符号->符号 映射 |
| 423 | if (expr1.IsConstExpr()) { | 423 | if (expr1.IsConstExpr()) { |
| 424 | if (!expr2.IsVariableExpr()) { | 424 | if (!expr2.IsVariableExpr()) { |
| 425 | - GELOGW("Unsupport append replacement %s to %s", SymbolicUtils::ToString(expr1).c_str(), | 425 | + GELOGW("Unsupported append replacement %s to %s", SymbolicUtils::ToString(expr1).c_str(), |
| 426 | SymbolicUtils::ToString(expr2).c_str()); | 426 | SymbolicUtils::ToString(expr2).c_str()); |
| 427 | return GRAPH_SUCCESS; | 427 | return GRAPH_SUCCESS; |
| 428 | } | 428 | } |
| 429 | } else if (!expr1.IsVariableExpr()) { | 429 | } else if (!expr1.IsVariableExpr()) { |
| 430 | if (!expr2.IsVariableExpr()) { | 430 | if (!expr2.IsVariableExpr()) { |
| 431 | - GELOGW("Unsupport append replacement %s to %s", SymbolicUtils::ToString(expr1).c_str(), | 431 | + GELOGW("Unsupported append replacement %s to %s", SymbolicUtils::ToString(expr1).c_str(), |
| 432 | SymbolicUtils::ToString(expr2).c_str()); | 432 | SymbolicUtils::ToString(expr2).c_str()); |
| 433 | return GRAPH_SUCCESS; | 433 | return GRAPH_SUCCESS; |
| 434 | } | 434 | } |
| 435 | } | 435 | } |
| 436 | // 判断replacement是否成环 | 436 | // 判断replacement是否成环 |
| 437 | if (CheckReplacementCycle(expr1, expr2)) { | 437 | if (CheckReplacementCycle(expr1, expr2)) { |
| 438 | - GELOGW("Unsupport append replacement %s to %s, replacement contains the other.", | 438 | + GELOGW("Unsupported append replacement %s to %s, replacement contains the other.", |
| 439 | SymbolicUtils::ToString(expr1).c_str(), SymbolicUtils::ToString(expr2).c_str()); | 439 | SymbolicUtils::ToString(expr1).c_str(), SymbolicUtils::ToString(expr2).c_str()); |
| 440 | return GRAPH_SUCCESS; | 440 | return GRAPH_SUCCESS; |
| 441 | } | 441 | } |
| @@ -145,7 +145,7 @@ ge::graphStatus ValidateIrInputOutputOrderCompatibility(const ge::OpDescPtr &des | |||
| 145 | // 验证输入顺序兼容性 | 145 | // 验证输入顺序兼容性 |
| 146 | GE_ASSERT_TRUE(ValidateIrOrderCompatibility(ir_inputs_in_node, ir_def.inputs), | 146 | GE_ASSERT_TRUE(ValidateIrOrderCompatibility(ir_inputs_in_node, ir_def.inputs), |
| 147 | "Compatibility failed: operator[%s][%s] input order or type has changed. " | 147 | "Compatibility failed: operator[%s][%s] input order or type has changed. " |
| 148 | - "ir_inputs_in_node is [%s], ir_def.inputs is [%s]", | 148 | + "ir_inputs_in_node are [%s], ir_def.inputs are [%s]", |
| 149 | desc->GetName().c_str(), desc->GetType().c_str(), | 149 | desc->GetName().c_str(), desc->GetType().c_str(), |
| 150 | IrDefsToString<ge::RecoverIrUtils::InputIrDefs>(ir_inputs_in_node).c_str(), | 150 | IrDefsToString<ge::RecoverIrUtils::InputIrDefs>(ir_inputs_in_node).c_str(), |
| 151 | IrDefsToString<ge::RecoverIrUtils::InputIrDefs>(ir_def.inputs).c_str()); | 151 | IrDefsToString<ge::RecoverIrUtils::InputIrDefs>(ir_def.inputs).c_str()); |
| @@ -157,7 +157,7 @@ ge::graphStatus ValidateIrInputOutputOrderCompatibility(const ge::OpDescPtr &des | |||
| 157 | desc->GetName().c_str(), desc->GetType().c_str(), ir_outputs_in_node.size(), ir_def.outputs.size()); | 157 | desc->GetName().c_str(), desc->GetType().c_str(), ir_outputs_in_node.size(), ir_def.outputs.size()); |
| 158 | GE_ASSERT_TRUE(ValidateIrOrderCompatibility(ir_outputs_in_node, ir_def.outputs), | 158 | GE_ASSERT_TRUE(ValidateIrOrderCompatibility(ir_outputs_in_node, ir_def.outputs), |
| 159 | "Compatibility failed: operator[%s][%s] output order or type has changed. " | 159 | "Compatibility failed: operator[%s][%s] output order or type has changed. " |
| 160 | - "ir_outputs_in_node is [%s], ir_def.outputs is [%s]", | 160 | + "ir_outputs_in_node are [%s], ir_def.outputs are [%s]", |
| 161 | desc->GetName().c_str(), desc->GetType().c_str(), | 161 | desc->GetName().c_str(), desc->GetType().c_str(), |
| 162 | IrDefsToString<ge::RecoverIrUtils::OutputIrDefs>(ir_outputs_in_node).c_str(), | 162 | IrDefsToString<ge::RecoverIrUtils::OutputIrDefs>(ir_outputs_in_node).c_str(), |
| 163 | IrDefsToString<ge::RecoverIrUtils::OutputIrDefs>(ir_def.outputs).c_str()); | 163 | IrDefsToString<ge::RecoverIrUtils::OutputIrDefs>(ir_def.outputs).c_str()); |
| @@ -834,7 +834,7 @@ bool ComputeGraphImpl::operator==(const ComputeGraphImpl &r_graph) const { | |||
| 834 | const auto &node_name = left_node->GetName(); | 834 | const auto &node_name = left_node->GetName(); |
| 835 | // After TopologicalSorting, node order can change, so find node by name | 835 | // After TopologicalSorting, node order can change, so find node by name |
| 836 | const auto &right_node = r_graph.FindNode(node_name); | 836 | const auto &right_node = r_graph.FindNode(node_name); |
| 837 | - GE_IF_BOOL_EXEC(right_node == nullptr, REPORT_INNER_ERR_MSG("E18888", "left_node:%s not find in r_graph:%s", | 837 | + GE_IF_BOOL_EXEC(right_node == nullptr, REPORT_INNER_ERR_MSG("E18888", "left_node:%s not found in r_graph:%s", |
| 838 | node_name.c_str(), r_graph.GetName().c_str()); | 838 | node_name.c_str(), r_graph.GetName().c_str()); |
| 839 | GELOGE(GRAPH_FAILED, "[Check][Param] right_node is NULL!!!"); return false); | 839 | GELOGE(GRAPH_FAILED, "[Check][Param] right_node is NULL!!!"); return false); |
| 840 | if (!((*right_node) == (*left_node))) { | 840 | if (!((*right_node) == (*left_node))) { |
| @@ -1854,7 +1854,7 @@ graphStatus ComputeGraphImpl::AddInOutForNetOutputOp(const ge::OpDescPtr &net_ou | |||
| 1854 | continue; | 1854 | continue; |
| 1855 | } | 1855 | } |
| 1856 | GE_ASSERT_TRUE((src_node != nullptr) && (src_node->GetOpDesc() != nullptr) && (net_output_desc != nullptr), | 1856 | GE_ASSERT_TRUE((src_node != nullptr) && (src_node->GetOpDesc() != nullptr) && (net_output_desc != nullptr), |
| 1857 | - "Param output_nodes_info has RetvalInfo item, which src_node is invalid; " | 1857 | + "Param output_nodes_info has RetvalInfo item, whose src_node is invalid; " |
| 1858 | "or Param net_output_desc is nullptr, check invalid"); | 1858 | "or Param net_output_desc is nullptr, check invalid"); |
| 1859 | is_input_const.push_back(ConstantUtils::IsRealConst(src_node->GetOpDesc())); | 1859 | is_input_const.push_back(ConstantUtils::IsRealConst(src_node->GetOpDesc())); |
| 1860 | ++iter; | 1860 | ++iter; |
| @@ -840,7 +840,7 @@ graphStatus GNode::SetAttr(const AscendString &name, std::vector<AscendString> & | |||
| 840 | for (auto &attr_val : attr_values) { | 840 | for (auto &attr_val : attr_values) { |
| 841 | const char_t *const ascend_attr_value = attr_val.GetString(); | 841 | const char_t *const ascend_attr_value = attr_val.GetString(); |
| 842 | if (std::string(ascend_attr_value).empty()) { | 842 | if (std::string(ascend_attr_value).empty()) { |
| 843 | - REPORT_INNER_ERR_MSG("E18888", "param attr values is invalid"); | 843 | + REPORT_INNER_ERR_MSG("E18888", "param attr values are invalid"); |
| 844 | GELOGE(GRAPH_PARAM_INVALID, "[Check][Param] SetAttr: attr val error."); | 844 | GELOGE(GRAPH_PARAM_INVALID, "[Check][Param] SetAttr: attr val error."); |
| 845 | return GRAPH_PARAM_INVALID; | 845 | return GRAPH_PARAM_INVALID; |
| 846 | } | 846 | } |
| @@ -1702,7 +1702,7 @@ graphStatus Operator::GetAttr(const std::string &name, std::vector<std::string> | |||
| 1702 | Operator &Operator::SetAttr(const char_t *name, const char_t *attr_value) { | 1702 | Operator &Operator::SetAttr(const char_t *name, const char_t *attr_value) { |
| 1703 | if ((name == nullptr) || (attr_value == nullptr)) { | 1703 | if ((name == nullptr) || (attr_value == nullptr)) { |
| 1704 | REPORT_INNER_ERR_MSG("E18888", "param name is nullptr or attr_value is nullptr, check invalid"); | 1704 | REPORT_INNER_ERR_MSG("E18888", "param name is nullptr or attr_value is nullptr, check invalid"); |
| 1705 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 1705 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 1706 | return *this; | 1706 | return *this; |
| 1707 | } | 1707 | } |
| 1708 | 1708 | ||
| @@ -1721,8 +1721,8 @@ Operator &Operator::SetAttr(const char_t *name, const char_t *attr_value) { | |||
| 1721 | 1721 | ||
| 1722 | Operator &Operator::SetInputAttr(const int32_t index, const char_t *name, const char_t *attr_value) { | 1722 | Operator &Operator::SetInputAttr(const int32_t index, const char_t *name, const char_t *attr_value) { |
| 1723 | if ((name == nullptr) || (attr_value == nullptr)) { | 1723 | if ((name == nullptr) || (attr_value == nullptr)) { |
| 1724 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1724 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1725 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 1725 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 1726 | return *this; | 1726 | return *this; |
| 1727 | } | 1727 | } |
| 1728 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1728 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -1746,8 +1746,8 @@ Operator &Operator::SetInputAttr(const int32_t index, const char_t *name, const | |||
| 1746 | 1746 | ||
| 1747 | Operator &Operator::SetInputAttr(const char_t *dst_name, const char_t *name, const char_t *attr_value) { | 1747 | Operator &Operator::SetInputAttr(const char_t *dst_name, const char_t *name, const char_t *attr_value) { |
| 1748 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value == nullptr)) { | 1748 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value == nullptr)) { |
| 1749 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1749 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1750 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 1750 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 1751 | return *this; | 1751 | return *this; |
| 1752 | } | 1752 | } |
| 1753 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1753 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -1771,8 +1771,8 @@ Operator &Operator::SetInputAttr(const char_t *dst_name, const char_t *name, con | |||
| 1771 | 1771 | ||
| 1772 | Operator &Operator::SetOutputAttr(const int32_t index, const char_t *name, const char_t *attr_value) { | 1772 | Operator &Operator::SetOutputAttr(const int32_t index, const char_t *name, const char_t *attr_value) { |
| 1773 | if ((name == nullptr) || (attr_value == nullptr)) { | 1773 | if ((name == nullptr) || (attr_value == nullptr)) { |
| 1774 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1774 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1775 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator parameters is nullptr."); | 1775 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator parameters are nullptr."); |
| 1776 | return *this; | 1776 | return *this; |
| 1777 | } | 1777 | } |
| 1778 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1778 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -1796,8 +1796,8 @@ Operator &Operator::SetOutputAttr(const int32_t index, const char_t *name, const | |||
| 1796 | 1796 | ||
| 1797 | Operator &Operator::SetOutputAttr(const char_t *dst_name, const char_t *name, const char_t *attr_value) { | 1797 | Operator &Operator::SetOutputAttr(const char_t *dst_name, const char_t *name, const char_t *attr_value) { |
| 1798 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value == nullptr)) { | 1798 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value == nullptr)) { |
| 1799 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1799 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1800 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters is nullptr."); | 1800 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters are nullptr."); |
| 1801 | return *this; | 1801 | return *this; |
| 1802 | } | 1802 | } |
| 1803 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1803 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -1821,8 +1821,8 @@ Operator &Operator::SetOutputAttr(const char_t *dst_name, const char_t *name, co | |||
| 1821 | 1821 | ||
| 1822 | Operator &Operator::SetInputAttr(const int32_t index, const char_t *name, const AscendString &attr_value) { | 1822 | Operator &Operator::SetInputAttr(const int32_t index, const char_t *name, const AscendString &attr_value) { |
| 1823 | if ((name == nullptr) || (attr_value.GetString() == nullptr)) { | 1823 | if ((name == nullptr) || (attr_value.GetString() == nullptr)) { |
| 1824 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1824 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1825 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 1825 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 1826 | return *this; | 1826 | return *this; |
| 1827 | } | 1827 | } |
| 1828 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1828 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -1846,8 +1846,8 @@ Operator &Operator::SetInputAttr(const int32_t index, const char_t *name, const | |||
| 1846 | 1846 | ||
| 1847 | Operator &Operator::SetInputAttr(const char_t *dst_name, const char_t *name, const AscendString &attr_value) { | 1847 | Operator &Operator::SetInputAttr(const char_t *dst_name, const char_t *name, const AscendString &attr_value) { |
| 1848 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value.GetString() == nullptr)) { | 1848 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value.GetString() == nullptr)) { |
| 1849 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1849 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1850 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 1850 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 1851 | return *this; | 1851 | return *this; |
| 1852 | } | 1852 | } |
| 1853 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1853 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -1978,8 +1978,8 @@ graphStatus Operator::GetOutputAttr(const int32_t index, const char_t *name, | |||
| 1978 | 1978 | ||
| 1979 | Operator &Operator::SetOutputAttr(const int32_t index, const char_t *name, const AscendString &attr_value) { | 1979 | Operator &Operator::SetOutputAttr(const int32_t index, const char_t *name, const AscendString &attr_value) { |
| 1980 | if ((name == nullptr) || (attr_value.GetString() == nullptr)) { | 1980 | if ((name == nullptr) || (attr_value.GetString() == nullptr)) { |
| 1981 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 1981 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 1982 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters is nullptr."); | 1982 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters are nullptr."); |
| 1983 | return *this; | 1983 | return *this; |
| 1984 | } | 1984 | } |
| 1985 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 1985 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2003,8 +2003,8 @@ Operator &Operator::SetOutputAttr(const int32_t index, const char_t *name, const | |||
| 2003 | 2003 | ||
| 2004 | Operator &Operator::SetOutputAttr(const char_t *dst_name, const char_t *name, const AscendString &attr_value) { | 2004 | Operator &Operator::SetOutputAttr(const char_t *dst_name, const char_t *name, const AscendString &attr_value) { |
| 2005 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value.GetString() == nullptr)) { | 2005 | if ((dst_name == nullptr) || (name == nullptr) || (attr_value.GetString() == nullptr)) { |
| 2006 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 2006 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 2007 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters is nullptr."); | 2007 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters are nullptr."); |
| 2008 | return *this; | 2008 | return *this; |
| 2009 | } | 2009 | } |
| 2010 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2010 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2028,8 +2028,8 @@ Operator &Operator::SetOutputAttr(const char_t *dst_name, const char_t *name, co | |||
| 2028 | 2028 | ||
| 2029 | graphStatus Operator::GetOutputAttr(const char_t *dst_name, const char_t *name, AscendString &attr_value) const { | 2029 | graphStatus Operator::GetOutputAttr(const char_t *dst_name, const char_t *name, AscendString &attr_value) const { |
| 2030 | if ((dst_name == nullptr) || (name == nullptr)) { | 2030 | if ((dst_name == nullptr) || (name == nullptr)) { |
| 2031 | - REPORT_INNER_ERR_MSG("E18888", "Operator name parameters is nullptr, check invalid"); | 2031 | + REPORT_INNER_ERR_MSG("E18888", "Operator name parameters are nullptr, check invalid"); |
| 2032 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters is nullptr."); | 2032 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters are nullptr."); |
| 2033 | return GRAPH_FAILED; | 2033 | return GRAPH_FAILED; |
| 2034 | } | 2034 | } |
| 2035 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2035 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2055,8 +2055,8 @@ graphStatus Operator::GetOutputAttr(const char_t *dst_name, const char_t *name, | |||
| 2055 | 2055 | ||
| 2056 | graphStatus Operator::GetInputAttr(const char_t *dst_name, const char_t *name, AscendString &attr_value) const { | 2056 | graphStatus Operator::GetInputAttr(const char_t *dst_name, const char_t *name, AscendString &attr_value) const { |
| 2057 | if ((dst_name == nullptr) || (name == nullptr)) { | 2057 | if ((dst_name == nullptr) || (name == nullptr)) { |
| 2058 | - REPORT_INNER_ERR_MSG("E18888", "Operator name parameters is nullptr, check invalid"); | 2058 | + REPORT_INNER_ERR_MSG("E18888", "Operator name parameters are nullptr, check invalid"); |
| 2059 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 2059 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 2060 | return GRAPH_FAILED; | 2060 | return GRAPH_FAILED; |
| 2061 | } | 2061 | } |
| 2062 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2062 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2082,8 +2082,8 @@ graphStatus Operator::GetInputAttr(const char_t *dst_name, const char_t *name, A | |||
| 2082 | 2082 | ||
| 2083 | graphStatus Operator::GetInputAttr(const int32_t index, const char_t *name, AscendString &attr_value) const { | 2083 | graphStatus Operator::GetInputAttr(const int32_t index, const char_t *name, AscendString &attr_value) const { |
| 2084 | if (name == nullptr) { | 2084 | if (name == nullptr) { |
| 2085 | - REPORT_INNER_ERR_MSG("E18888", "Operator name parameters is nullptr, check invalid"); | 2085 | + REPORT_INNER_ERR_MSG("E18888", "Operator name parameters are nullptr, check invalid"); |
| 2086 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 2086 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 2087 | return GRAPH_FAILED; | 2087 | return GRAPH_FAILED; |
| 2088 | } | 2088 | } |
| 2089 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2089 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2109,8 +2109,8 @@ graphStatus Operator::GetInputAttr(const int32_t index, const char_t *name, Asce | |||
| 2109 | 2109 | ||
| 2110 | graphStatus Operator::GetOutputAttr(const int32_t index, const char_t *name, AscendString &attr_value) const { | 2110 | graphStatus Operator::GetOutputAttr(const int32_t index, const char_t *name, AscendString &attr_value) const { |
| 2111 | if (name == nullptr) { | 2111 | if (name == nullptr) { |
| 2112 | - REPORT_INNER_ERR_MSG("E18888", "Operator parameters is nullptr, check invalid"); | 2112 | + REPORT_INNER_ERR_MSG("E18888", "Operator parameters are nullptr, check invalid"); |
| 2113 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters is nullptr."); | 2113 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator output parameters are nullptr."); |
| 2114 | return GRAPH_FAILED; | 2114 | return GRAPH_FAILED; |
| 2115 | } | 2115 | } |
| 2116 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2116 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2136,8 +2136,8 @@ graphStatus Operator::GetOutputAttr(const int32_t index, const char_t *name, Asc | |||
| 2136 | 2136 | ||
| 2137 | Operator &Operator::SetAttr(const char_t *name, const AscendString &attr_value) { | 2137 | Operator &Operator::SetAttr(const char_t *name, const AscendString &attr_value) { |
| 2138 | if ((name == nullptr) || (attr_value.GetString() == nullptr)) { | 2138 | if ((name == nullptr) || (attr_value.GetString() == nullptr)) { |
| 2139 | - REPORT_INNER_ERR_MSG("E18888", "Operator input parameters is nullptr, check invalid"); | 2139 | + REPORT_INNER_ERR_MSG("E18888", "Operator input parameters are nullptr, check invalid"); |
| 2140 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 2140 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 2141 | return *this; | 2141 | return *this; |
| 2142 | } | 2142 | } |
| 2143 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2143 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -2156,7 +2156,7 @@ Operator &Operator::SetAttr(const char_t *name, const AscendString &attr_value) | |||
| 2156 | graphStatus Operator::GetAttr(const char_t *name, AscendString &attr_value) const { | 2156 | graphStatus Operator::GetAttr(const char_t *name, AscendString &attr_value) const { |
| 2157 | if (name == nullptr) { | 2157 | if (name == nullptr) { |
| 2158 | REPORT_INNER_ERR_MSG("E18888", "Operator input parameters name is nullptr, check invalid"); | 2158 | REPORT_INNER_ERR_MSG("E18888", "Operator input parameters name is nullptr, check invalid"); |
| 2159 | - GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters is nullptr."); | 2159 | + GELOGE(GRAPH_FAILED, "[Check][Param] Operator input parameters are nullptr."); |
| 2160 | return GRAPH_FAILED; | 2160 | return GRAPH_FAILED; |
| 2161 | } | 2161 | } |
| 2162 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { | 2162 | if ((operator_impl_ == nullptr) || (operator_impl_->GetOpDescImpl() == nullptr)) { |
| @@ -190,7 +190,7 @@ graphStatus UpdateParentNodeForWhile(const ConstNodePtr &node, std::vector<std:: | |||
| 190 | auto data_shape = tensor.MutableShape(); | 190 | auto data_shape = tensor.MutableShape(); |
| 191 | // input is dynamic, here use dim_num | 191 | // input is dynamic, here use dim_num |
| 192 | if (data_shape.GetDims() != out_shape.GetDims()) { | 192 | if (data_shape.GetDims() != out_shape.GetDims()) { |
| 193 | - GELOGI("After infer, While %s %zu output shape [%s] is not match with input shape [%s].Need infer again.", | 193 | + GELOGI("After infer, While %s %zu output shape [%s] does not match with input shape [%s].Need infer again.", |
| 194 | node->GetName().c_str(), i, out_shape.ToString().c_str(), data_shape.ToString().c_str()); | 194 | node->GetName().c_str(), i, out_shape.ToString().c_str(), data_shape.ToString().c_str()); |
| 195 | if (data_shape.GetDimNum() != out_shape.GetDimNum()) { | 195 | if (data_shape.GetDimNum() != out_shape.GetDimNum()) { |
| 196 | ref_out_tensor.SetUnknownDimNumShape(); | 196 | ref_out_tensor.SetUnknownDimNumShape(); |
| @@ -48,7 +48,7 @@ graphStatus ListValueSerializer::Serialize(const AnyValue &av, proto::AttrDef &d | |||
| 48 | 48 | ||
| 49 | const auto iter = type_serializer_map.find(av.GetValueType()); | 49 | const auto iter = type_serializer_map.find(av.GetValueType()); |
| 50 | if (iter == type_serializer_map.end()) { | 50 | if (iter == type_serializer_map.end()) { |
| 51 | - GELOGE(GRAPH_FAILED, "Value type [%d] not support.", static_cast<int32_t>(av.GetValueType())); | 51 | + GELOGE(GRAPH_FAILED, "Value type [%d] is not supported.", static_cast<int32_t>(av.GetValueType())); |
| 52 | return GRAPH_FAILED; | 52 | return GRAPH_FAILED; |
| 53 | } | 53 | } |
| 54 | return iter->second(av, def); | 54 | return iter->second(av, def); |
| @@ -70,7 +70,7 @@ graphStatus ListValueSerializer::Deserialize(const proto::AttrDef &def, AnyValue | |||
| 70 | 70 | ||
| 71 | const auto iter = type_deserializer_map.find(def.list().val_type()); | 71 | const auto iter = type_deserializer_map.find(def.list().val_type()); |
| 72 | if (iter == type_deserializer_map.end()) { | 72 | if (iter == type_deserializer_map.end()) { |
| 73 | - GELOGE(GRAPH_FAILED, "Value type [%d] not support.", static_cast<int32_t>(def.list().val_type())); | 73 | + GELOGE(GRAPH_FAILED, "Value type [%d] is not supported.", static_cast<int32_t>(def.list().val_type())); |
| 74 | return GRAPH_FAILED; | 74 | return GRAPH_FAILED; |
| 75 | } | 75 | } |
| 76 | return iter->second(def, av); | 76 | return iter->second(def, av); |
| @@ -123,7 +123,7 @@ int64_t GetSizeInBytes(int64_t element_count, DataType data_type) { | |||
| 123 | } | 123 | } |
| 124 | uint32_t type_size = 0U; | 124 | uint32_t type_size = 0U; |
| 125 | if (!TypeUtils::GetDataTypeLength(data_type, type_size)) { | 125 | if (!TypeUtils::GetDataTypeLength(data_type, type_size)) { |
| 126 | - GELOGW("[Check][DataType]GetSizeInBytes failed, data_type:%d not support.", data_type); | 126 | + GELOGW("[Check][DataType]GetSizeInBytes failed, data_type:%d is not supported.", data_type); |
| 127 | return -1; | 127 | return -1; |
| 128 | } else if (type_size > kDataTypeSizeBitOffset) { | 128 | } else if (type_size > kDataTypeSizeBitOffset) { |
| 129 | const auto bit_size = type_size - kDataTypeSizeBitOffset; | 129 | const auto bit_size = type_size - kDataTypeSizeBitOffset; |
| @@ -389,7 +389,7 @@ static graphStatus OutputParser(const OpDescPtr &op_desc, const std::string &pat | |||
| 389 | static graphStatus InputDescCalcSize(const OpDescPtr &op_desc, const ArgDesc &arg_desc, size_t &size) { | 389 | static graphStatus InputDescCalcSize(const OpDescPtr &op_desc, const ArgDesc &arg_desc, size_t &size) { |
| 390 | const auto &ir_inputs = op_desc->GetIrInputs(); | 390 | const auto &ir_inputs = op_desc->GetIrInputs(); |
| 391 | GE_ASSERT((arg_desc.ir_idx >= 0 && static_cast<size_t>(arg_desc.ir_idx) < ir_inputs.size()), | 391 | GE_ASSERT((arg_desc.ir_idx >= 0 && static_cast<size_t>(arg_desc.ir_idx) < ir_inputs.size()), |
| 392 | - "ir_index is out of range"); | 392 | + "ir_index(%d) is out of range [0, %zu)", arg_desc.ir_idx, ir_inputs.size()); |
| 393 | auto ir_name = ir_inputs[static_cast<size_t>(arg_desc.ir_idx)].first; | 393 | auto ir_name = ir_inputs[static_cast<size_t>(arg_desc.ir_idx)].first; |
| 394 | if (arg_desc.folded) { | 394 | if (arg_desc.folded) { |
| 395 | size += sizeof(uintptr_t); // pointer to desc | 395 | size += sizeof(uintptr_t); // pointer to desc |
| @@ -117,7 +117,7 @@ bool ConstantUtils::GetPotentialWeight(const OpDescPtr &op_desc, std::vector<uin | |||
| 117 | return false; | 117 | return false; |
| 118 | } | 118 | } |
| 119 | if (weight_indices.size() != weights.size()) { | 119 | if (weight_indices.size() != weights.size()) { |
| 120 | - GELOGW("Weight indices not match with weight size on potential const %s.", op_desc->GetName().c_str()); | 120 | + GELOGW("Weight indices do not match with weight size on potential const %s.", op_desc->GetName().c_str()); |
| 121 | return false; | 121 | return false; |
| 122 | } | 122 | } |
| 123 | return true; | 123 | return true; |
| @@ -135,7 +135,7 @@ bool ConstantUtils::MutablePotentialWeight(const OpDescPtr &op_desc, std::vector | |||
| 135 | return false; | 135 | return false; |
| 136 | } | 136 | } |
| 137 | if (weight_indices.size() != weights.size()) { | 137 | if (weight_indices.size() != weights.size()) { |
| 138 | - GELOGW("Weight indices not match with weight size on potential const %s.", op_desc->GetName().c_str()); | 138 | + GELOGW("Weight indices do not match with weight size on potential const %s.", op_desc->GetName().c_str()); |
| 139 | return false; | 139 | return false; |
| 140 | } | 140 | } |
| 141 | return true; | 141 | return true; |
| @@ -336,7 +336,8 @@ graphStatus FftsGraphUtils::GraphPartition(ComputeGraph &graph, const CalcFunc & | |||
| 336 | "[Calculate][Value] failed for graph %s", ffts_plus_graph->GetName().c_str()); | 336 | "[Calculate][Value] failed for graph %s", ffts_plus_graph->GetName().c_str()); |
| 337 | if (!IsValueValid(ffts_plus_graph, upper_limit, node_value, graph_value)) { | 337 | if (!IsValueValid(ffts_plus_graph, upper_limit, node_value, graph_value)) { |
| 338 | REPORT_INNER_ERR_MSG("E18888", "Check value invalid"); | 338 | REPORT_INNER_ERR_MSG("E18888", "Check value invalid"); |
| 339 | - GELOGE(GRAPH_FAILED, "[Check][Value] invalid"); | 339 | + GELOGE(GRAPH_FAILED, "[Check][Value] invalid for graph %s, upper limit size %zu", |
| 340 | + ffts_plus_graph->GetName().c_str(), upper_limit.size()); | ||
| 340 | return GRAPH_FAILED; | 341 | return GRAPH_FAILED; |
| 341 | } | 342 | } |
| 342 | 343 | ||
| @@ -400,12 +401,12 @@ graphStatus FftsGraphUtils::Calculate(const ComputeGraphPtr &graph, const CalcFu | |||
| 400 | cur_graph_value = cur_node_value; | 401 | cur_graph_value = cur_node_value; |
| 401 | } else if (cur_graph_value.size() != cur_node_value.size()) { | 402 | } else if (cur_graph_value.size() != cur_node_value.size()) { |
| 402 | REPORT_INNER_ERR_MSG("E18888", | 403 | REPORT_INNER_ERR_MSG("E18888", |
| 403 | - "Value size not match, value size of graph %s is %zu, " | 404 | + "Value size does not match, value size of graph %s is %zu, " |
| 404 | "value size of node %s is %zu", | 405 | "value size of node %s is %zu", |
| 405 | graph->GetName().c_str(), cur_graph_value.size(), node->GetName().c_str(), | 406 | graph->GetName().c_str(), cur_graph_value.size(), node->GetName().c_str(), |
| 406 | cur_node_value.size()); | 407 | cur_node_value.size()); |
| 407 | GELOGE(GRAPH_FAILED, | 408 | GELOGE(GRAPH_FAILED, |
| 408 | - "[Check][Param] Value size not match, value size of graph %s is %zu, " | 409 | + "[Check][Param] Value size does not match, value size of graph %s is %zu, " |
| 409 | "value size of node %s is %zu", | 410 | "value size of node %s is %zu", |
| 410 | graph->GetName().c_str(), cur_graph_value.size(), node->GetName().c_str(), cur_node_value.size()); | 411 | graph->GetName().c_str(), cur_graph_value.size(), node->GetName().c_str(), cur_node_value.size()); |
| 411 | return GRAPH_FAILED; | 412 | return GRAPH_FAILED; |
| @@ -449,12 +450,12 @@ std::vector<uint32_t> FftsGraphUtils::Calculate(const NodePtr &node, const CalcF | |||
| 449 | cur_node_value = subgraph_value; | 450 | cur_node_value = subgraph_value; |
| 450 | } else if (cur_node_value.size() != subgraph_value.size()) { | 451 | } else if (cur_node_value.size() != subgraph_value.size()) { |
| 451 | REPORT_INNER_ERR_MSG("E18888", | 452 | REPORT_INNER_ERR_MSG("E18888", |
| 452 | - "Value size not match, value size of node %s is %zu, value size of subgraph %s " | 453 | + "Value size does not match, value size of node %s is %zu, value size of subgraph %s " |
| 453 | "is %zu", | 454 | "is %zu", |
| 454 | node->GetName().c_str(), cur_node_value.size(), subgraph->GetName().c_str(), | 455 | node->GetName().c_str(), cur_node_value.size(), subgraph->GetName().c_str(), |
| 455 | subgraph_value.size()); | 456 | subgraph_value.size()); |
| 456 | GELOGE(GRAPH_FAILED, | 457 | GELOGE(GRAPH_FAILED, |
| 457 | - "[Check][Param] Value size not match, value size of node %s is %zu, " | 458 | + "[Check][Param] Value size does not match, value size of node %s is %zu, " |
| 458 | "value size of subgraph %s is %zu", | 459 | "value size of subgraph %s is %zu", |
| 459 | node->GetName().c_str(), cur_node_value.size(), subgraph->GetName().c_str(), subgraph_value.size()); | 460 | node->GetName().c_str(), cur_node_value.size(), subgraph->GetName().c_str(), subgraph_value.size()); |
| 460 | return {}; | 461 | return {}; |
| @@ -497,8 +498,8 @@ bool FftsGraphUtils::IsValueValid(const ComputeGraphPtr &graph, const std::vecto | |||
| 497 | return pair_item.second.size() != upper_limit.size(); | 498 | return pair_item.second.size() != upper_limit.size(); |
| 498 | }; | 499 | }; |
| 499 | if (std::find_if(node_value.begin(), node_value.end(), is_node_value_match) != node_value.end()) { | 500 | if (std::find_if(node_value.begin(), node_value.end(), is_node_value_match) != node_value.end()) { |
| 500 | - REPORT_INNER_ERR_MSG("E18888", "Node value size not match"); | 501 | + REPORT_INNER_ERR_MSG("E18888", "Node value size does not match"); |
| 501 | - GELOGE(GRAPH_FAILED, "[Check][Param] Node value size not match"); | 502 | + GELOGE(GRAPH_FAILED, "[Check][Param] Node value size does not match"); |
| 502 | return false; | 503 | return false; |
| 503 | } | 504 | } |
| 504 | 505 | ||
| @@ -506,8 +507,8 @@ bool FftsGraphUtils::IsValueValid(const ComputeGraphPtr &graph, const std::vecto | |||
| 506 | return pair_item.second.size() != upper_limit.size(); | 507 | return pair_item.second.size() != upper_limit.size(); |
| 507 | }; | 508 | }; |
| 508 | if (std::find_if(graph_value.begin(), graph_value.end(), is_graph_value_match) != graph_value.end()) { | 509 | if (std::find_if(graph_value.begin(), graph_value.end(), is_graph_value_match) != graph_value.end()) { |
| 509 | - REPORT_INNER_ERR_MSG("E18888", "Graph value size not match"); | 510 | + REPORT_INNER_ERR_MSG("E18888", "Graph value size does not match"); |
| 510 | - GELOGE(GRAPH_FAILED, "[Check][Param] Graph value size not match"); | 511 | + GELOGE(GRAPH_FAILED, "[Check][Param] Graph value size does not match"); |
| 511 | return false; | 512 | return false; |
| 512 | } | 513 | } |
| 513 | 514 | ||
| @@ -101,7 +101,7 @@ onnx::TensorProto_DataType OnnxUtils::EncodeDataType(const DataType data_type) { | |||
| 101 | if (it != kGeDataTypeToOnnxMap.end()) { | 101 | if (it != kGeDataTypeToOnnxMap.end()) { |
| 102 | return it->second; | 102 | return it->second; |
| 103 | } else { | 103 | } else { |
| 104 | - GELOGW("[Encode][DataType] Datatype %u not support", data_type); | 104 | + GELOGW("[Encode][DataType] Datatype %u is not supported", data_type); |
| 105 | return onnx::TensorProto_DataType_UNDEFINED; | 105 | return onnx::TensorProto_DataType_UNDEFINED; |
| 106 | } | 106 | } |
| 107 | } | 107 | } |
| @@ -3602,7 +3602,7 @@ ComputeGraphPtr GraphUtils::BuildSubgraphWithNodes(const ComputeGraphPtr &graph, | |||
| 3602 | ComputeGraphPtr GraphUtils::BuildSubgraphWithNodes(ComputeGraph &graph, const std::set<NodePtr> &nodes, | 3602 | ComputeGraphPtr GraphUtils::BuildSubgraphWithNodes(ComputeGraph &graph, const std::set<NodePtr> &nodes, |
| 3603 | const std::string &subgraph_name) { | 3603 | const std::string &subgraph_name) { |
| 3604 | if (nodes.empty()) { | 3604 | if (nodes.empty()) { |
| 3605 | - GELOGW("nodes is empty, no need to build subgraph"); | 3605 | + GELOGW("nodes are empty, no need to build subgraph"); |
| 3606 | return nullptr; | 3606 | return nullptr; |
| 3607 | } | 3607 | } |
| 3608 | 3608 | ||
| @@ -4435,7 +4435,7 @@ void CompleteGraphBuilder::AddDataNodes(graphStatus &error_code, std::string &er | |||
| 4435 | const std::vector<uint32_t> anchor_indes = input.second.second; | 4435 | const std::vector<uint32_t> anchor_indes = input.second.second; |
| 4436 | if (input_names.size() != anchor_indes.size()) { | 4436 | if (input_names.size() != anchor_indes.size()) { |
| 4437 | error_code = GRAPH_FAILED; | 4437 | error_code = GRAPH_FAILED; |
| 4438 | - error_msg = "AddDataNodes failed: num of input_names and indexs not equal."; | 4438 | + error_msg = "AddDataNodes failed: num of input_names and indexes not equal."; |
| 4439 | return; | 4439 | return; |
| 4440 | } | 4440 | } |
| 4441 | if (input_names.empty()) { | 4441 | if (input_names.empty()) { |
| @@ -5002,7 +5002,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY graphStatus GraphUtils::GetSuppor | |||
| 5002 | GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY ComputeGraphPtr | 5002 | GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY ComputeGraphPtr |
| 5003 | GraphUtils::BuildGraphFromNodes(const std::unordered_set<NodePtr> &nodes, const std::string &name) { | 5003 | GraphUtils::BuildGraphFromNodes(const std::unordered_set<NodePtr> &nodes, const std::string &name) { |
| 5004 | if (nodes.empty()) { | 5004 | if (nodes.empty()) { |
| 5005 | - GELOGW("nodes is empty, no need to build subgraph"); | 5005 | + GELOGW("nodes are empty, no need to build subgraph"); |
| 5006 | return nullptr; | 5006 | return nullptr; |
| 5007 | } | 5007 | } |
| 5008 | 5008 | ||
| @@ -319,7 +319,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool NodeUtils::ClearInputDesc(co | |||
| 319 | if (iter < op_desc->impl_->inputs_desc_.end()) { | 319 | if (iter < op_desc->impl_->inputs_desc_.end()) { |
| 320 | (void)op_desc->impl_->inputs_desc_.erase(iter); | 320 | (void)op_desc->impl_->inputs_desc_.erase(iter); |
| 321 | } else { | 321 | } else { |
| 322 | - GELOGW("[Clear][InputDesc] inputs_desc_ iterator out of range."); | 322 | + GELOGW("[Clear][InputDesc] index %u out of range [0, %zu)", index, op_desc->impl_->inputs_desc_.size()); |
| 323 | } | 323 | } |
| 324 | return true; | 324 | return true; |
| 325 | } | 325 | } |
| @@ -338,7 +338,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool NodeUtils::ClearOutputDesc(c | |||
| 338 | if (iter < op_desc->impl_->outputs_desc_.end()) { | 338 | if (iter < op_desc->impl_->outputs_desc_.end()) { |
| 339 | (void)op_desc->impl_->outputs_desc_.erase(iter); | 339 | (void)op_desc->impl_->outputs_desc_.erase(iter); |
| 340 | } else { | 340 | } else { |
| 341 | - GELOGW("[Clear][OutputDesc] outputs_desc_ iterator out of range."); | 341 | + GELOGW("[Clear][OutputDesc] index %u out of range [0, %zu)", index, op_desc->impl_->outputs_desc_.size()); |
| 342 | } | 342 | } |
| 343 | return true; | 343 | return true; |
| 344 | } | 344 | } |
| @@ -1141,7 +1141,7 @@ graphStatus NodeUtils::GetInNodeCrossPartionedCallNode(const NodePtr &node, uint | |||
| 1141 | return GRAPH_SUCCESS; | 1141 | return GRAPH_SUCCESS; |
| 1142 | } | 1142 | } |
| 1143 | // other subgraph(if,while,case) currently not support, return node and warn | 1143 | // other subgraph(if,while,case) currently not support, return node and warn |
| 1144 | - GELOGW("Node [%s] type [%s], real peer in node [%s] type[%s] has subgraph. Current not support.", | 1144 | + GELOGW("Node [%s] type [%s], real peer in node [%s] type[%s] has subgraph. Current is not supported.", |
| 1145 | node->GetName().c_str(), node->GetType().c_str(), peer_node->GetName().c_str(), | 1145 | node->GetName().c_str(), node->GetType().c_str(), peer_node->GetName().c_str(), |
| 1146 | peer_node->GetType().c_str()); | 1146 | peer_node->GetType().c_str()); |
| 1147 | 1147 | ||
| @@ -104,7 +104,8 @@ bool OpDescUtils::ClearInputDesc(const NodePtr &node) { | |||
| 104 | if (iter < node->GetOpDesc()->impl_->inputs_desc_.end()) { | 104 | if (iter < node->GetOpDesc()->impl_->inputs_desc_.end()) { |
| 105 | (void)node->GetOpDesc()->impl_->inputs_desc_.erase(iter); | 105 | (void)node->GetOpDesc()->impl_->inputs_desc_.erase(iter); |
| 106 | } else { | 106 | } else { |
| 107 | - GELOGW("[Clear][InputDesc] inputs_desc_ iterator out of range."); | 107 | + GELOGW("[Clear][InputDesc] index %d out of range [0, %zu)", index_list[i], |
| 108 | + node->GetOpDesc()->impl_->inputs_desc_.size()); | ||
| 108 | } | 109 | } |
| 109 | } | 110 | } |
| 110 | 111 | ||
| @@ -146,7 +147,8 @@ bool OpDescUtils::ClearOutputDesc(const NodePtr &node) { | |||
| 146 | if (iter < node->GetOpDesc()->impl_->outputs_desc_.end()) { | 147 | if (iter < node->GetOpDesc()->impl_->outputs_desc_.end()) { |
| 147 | (void)node->GetOpDesc()->impl_->outputs_desc_.erase(iter); | 148 | (void)node->GetOpDesc()->impl_->outputs_desc_.erase(iter); |
| 148 | } else { | 149 | } else { |
| 149 | - GELOGW("[Clear][OutputDesc] outputs_desc_ iterator out of range."); | 150 | + GELOGW("[Clear][OutputDesc] index %d out of range [0, %zu)", index_list[i], |
| 151 | + node->GetOpDesc()->impl_->outputs_desc_.size()); | ||
| 150 | } | 152 | } |
| 151 | } | 153 | } |
| 152 | 154 | ||
| @@ -364,7 +364,7 @@ TensorUtils::CheckShapeByShapeRange(const GeShape &shape, const std::vector<std: | |||
| 364 | std::vector<const char *>({std::to_string(shape_range.size()).c_str(), | 364 | std::vector<const char *>({std::to_string(shape_range.size()).c_str(), |
| 365 | std::to_string(shape.GetDimNum()).c_str()})); | 365 | std::to_string(shape.GetDimNum()).c_str()})); |
| 366 | GELOGE(PARAM_INVALID, | 366 | GELOGE(PARAM_INVALID, |
| 367 | - "[Check][Param] Given shape_range dim num [%zu] and current dim num [%zu] are not match. " | 367 | + "[Check][Param] Given shape_range dim num [%zu] and current dim num [%zu] do not match. " |
| 368 | "Please check", | 368 | "Please check", |
| 369 | shape_range.size(), shape.GetDimNum()); | 369 | shape_range.size(), shape.GetDimNum()); |
| 370 | return PARAM_INVALID; | 370 | return PARAM_INVALID; |
| @@ -102,9 +102,9 @@ std::string TypeUtilsInner::ImplyTypeToSerialString(const domi::ImplyType imply_ | |||
| 102 | if (it != kImplyTypeToString.end()) { | 102 | if (it != kImplyTypeToString.end()) { |
| 103 | return it->second; | 103 | return it->second; |
| 104 | } else { | 104 | } else { |
| 105 | - REPORT_INNER_ERR_MSG("E18888", "ImplyTypeToSerialString: imply_type not support %u", | 105 | + REPORT_INNER_ERR_MSG("E18888", "ImplyTypeToSerialString: imply_type %u is not supported", |
| 106 | static_cast<uint32_t>(imply_type)); | 106 | static_cast<uint32_t>(imply_type)); |
| 107 | - GELOGE(GRAPH_FAILED, "[Check][Param] ImplyTypeToSerialString: imply_type not support %u", | 107 | + GELOGE(GRAPH_FAILED, "[Check][Param] ImplyTypeToSerialString: imply_type %u is not supported", |
| 108 | static_cast<uint32_t>(imply_type)); | 108 | static_cast<uint32_t>(imply_type)); |
| 109 | return "UNDEFINED"; | 109 | return "UNDEFINED"; |
| 110 | } | 110 | } |
| @@ -131,7 +131,7 @@ std::string TypeUtilsInner::FmkTypeToSerialString(const domi::FrameworkType fmk_ | |||
| 131 | if (it != kFmkTypeToString.end()) { | 131 | if (it != kFmkTypeToString.end()) { |
| 132 | return it->second; | 132 | return it->second; |
| 133 | } else { | 133 | } else { |
| 134 | - GELOGW("[Util][Serialize] Framework type %d not support.", fmk_type); | 134 | + GELOGW("[Util][Serialize] Framework type %d is not supported.", fmk_type); |
| 135 | return ""; | 135 | return ""; |
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| @@ -79,7 +79,8 @@ void AutoMappingUtil::ConvertTensorList(const domi::tensorflow::AttrValue_ListVa | |||
| 79 | void AutoMappingUtil::ConvertFunc(const domi::tensorflow::NameAttrList &tf_func, ge::NamedAttrs &ge_func, | 79 | void AutoMappingUtil::ConvertFunc(const domi::tensorflow::NameAttrList &tf_func, ge::NamedAttrs &ge_func, |
| 80 | const int32_t recursive_depth) { | 80 | const int32_t recursive_depth) { |
| 81 | if (recursive_depth >= kMaxFuncRecursiveDepth) { | 81 | if (recursive_depth >= kMaxFuncRecursiveDepth) { |
| 82 | - GELOGW("The call stack has exceeded the maximum recursive depth"); | 82 | + GELOGW("The call stack has exceeded the maximum recursive depth(%d), max(%d)", recursive_depth, |
| 83 | + kMaxFuncRecursiveDepth); | ||
| 83 | return; | 84 | return; |
| 84 | } | 85 | } |
| 85 | ge_func.SetName(tf_func.name()); | 86 | ge_func.SetName(tf_func.name()); |
| @@ -110,7 +111,8 @@ void AutoMappingUtil::ConvertShapeList(const domi::tensorflow::AttrValue_ListVal | |||
| 110 | void AutoMappingUtil::ConvertFuncList(const domi::tensorflow::AttrValue_ListValue &list, | 111 | void AutoMappingUtil::ConvertFuncList(const domi::tensorflow::AttrValue_ListValue &list, |
| 111 | std::vector<ge::NamedAttrs> &vec, const int32_t recursive_depth) { | 112 | std::vector<ge::NamedAttrs> &vec, const int32_t recursive_depth) { |
| 112 | if (recursive_depth >= kMaxFuncRecursiveDepth) { | 113 | if (recursive_depth >= kMaxFuncRecursiveDepth) { |
| 113 | - GELOGW("The call stack has exceeded the maximum recursive depth"); | 114 | + GELOGW("The call stack has exceeded the maximum recursive depth(%d), max(%d)", recursive_depth, |
| 115 | + kMaxFuncRecursiveDepth); | ||
| 114 | return; | 116 | return; |
| 115 | } | 117 | } |
| 116 | vec.clear(); | 118 | vec.clear(); |
| @@ -518,7 +518,7 @@ void GraphPassUtil::RecordOriginalOpAttrs(const std::vector<ge::NodePtr> &origin | |||
| 518 | } | 518 | } |
| 519 | for (const auto &pass_name_tmp : pass_names) { | 519 | for (const auto &pass_name_tmp : pass_names) { |
| 520 | if (op_attrs_maps_tmp->find(pass_name_tmp) == op_attrs_maps_tmp->cend()) { | 520 | if (op_attrs_maps_tmp->find(pass_name_tmp) == op_attrs_maps_tmp->cend()) { |
| 521 | - GELOGD("Not find pass_name[%s] in ATTR_NAME_ORIGIN_OP_ATTRS_MAP", pass_name_tmp.c_str()); | 521 | + GELOGD("Not found pass_name[%s] in ATTR_NAME_ORIGIN_OP_ATTRS_MAP", pass_name_tmp.c_str()); |
| 522 | continue; | 522 | continue; |
| 523 | } | 523 | } |
| 524 | (void)origin_op_attrs_map->insert( | 524 | (void)origin_op_attrs_map->insert( |
| @@ -1395,7 +1395,7 @@ int TbeOpTilingPyInterfaceEx2BackUpInner(const char *const optype, const char *c | |||
| 1395 | size_t run_info_len, const char *const compile_info_hash, uint64_t *elapse, | 1395 | size_t run_info_len, const char *const compile_info_hash, uint64_t *elapse, |
| 1396 | const OpTilingFunc &tiling_func) { | 1396 | const OpTilingFunc &tiling_func) { |
| 1397 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { | 1397 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { |
| 1398 | - REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs is null, %s, %s, %s, %s", optype, compile_info, | 1398 | + REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs are null, %s, %s, %s, %s", optype, compile_info, |
| 1399 | inputs, outputs); | 1399 | inputs, outputs); |
| 1400 | return 0; | 1400 | return 0; |
| 1401 | } | 1401 | } |
| @@ -1475,7 +1475,7 @@ int TbeOpTilingPyInterfaceEx2NewInner(const char *const optype, const char *cons | |||
| 1475 | size_t run_info_len, const char *const compile_info_hash, uint64_t *elapse, | 1475 | size_t run_info_len, const char *const compile_info_hash, uint64_t *elapse, |
| 1476 | const OpTilingFuncV2 &tiling_func, const char *const attrs) { | 1476 | const OpTilingFuncV2 &tiling_func, const char *const attrs) { |
| 1477 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { | 1477 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { |
| 1478 | - REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs is null, %s, %s, %s, %s", optype, compile_info, | 1478 | + REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs are null, %s, %s, %s, %s", optype, compile_info, |
| 1479 | inputs, outputs); | 1479 | inputs, outputs); |
| 1480 | return 0; | 1480 | return 0; |
| 1481 | } | 1481 | } |
| @@ -1535,7 +1535,7 @@ int TbeOpTilingPyInterfaceEx3Inner(const char *const optype, const char *const c | |||
| 1535 | const OpTilingFuncV3 &tiling_func, const OpParseFuncV3 &parse_func, | 1535 | const OpTilingFuncV3 &tiling_func, const OpParseFuncV3 &parse_func, |
| 1536 | const char *const attrs) { | 1536 | const char *const attrs) { |
| 1537 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { | 1537 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { |
| 1538 | - REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs is null, %s, %s, %s, %s", optype, compile_info, | 1538 | + REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs are null, %s, %s, %s, %s", optype, compile_info, |
| 1539 | inputs, outputs); | 1539 | inputs, outputs); |
| 1540 | return 0; | 1540 | return 0; |
| 1541 | } | 1541 | } |
| @@ -1594,7 +1594,7 @@ int TbeOpTilingPyInterfaceEx4Inner(const char *const optype, const char *const c | |||
| 1594 | const OpTilingFuncV4 &tiling_func, const OpParseFuncV4 &parse_func, | 1594 | const OpTilingFuncV4 &tiling_func, const OpParseFuncV4 &parse_func, |
| 1595 | const char *const attrs) { | 1595 | const char *const attrs) { |
| 1596 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { | 1596 | if ((optype == nullptr) || (compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { |
| 1597 | - REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs is null, %s, %s, %s, %s", optype, compile_info, | 1597 | + REPORT_INNER_ERR_MSG("E19999", "optype/compile_info/inputs/outputs are null, %s, %s, %s, %s", optype, compile_info, |
| 1598 | inputs, outputs); | 1598 | inputs, outputs); |
| 1599 | return 0; | 1599 | return 0; |
| 1600 | } | 1600 | } |
| @@ -1863,8 +1863,8 @@ int TbeOptilingPyInterfaceNew(const char *const op_type, const char *const compi | |||
| 1863 | const char *const outputs, char *run_info_json, size_t run_info_len, uint64_t *elapse, | 1863 | const char *const outputs, char *run_info_json, size_t run_info_len, uint64_t *elapse, |
| 1864 | const char *const attrs, const char *const extra_info) { | 1864 | const char *const attrs, const char *const extra_info) { |
| 1865 | if ((compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { | 1865 | if ((compile_info == nullptr) || (inputs == nullptr) || (outputs == nullptr)) { |
| 1866 | - GELOGE(ge::GRAPH_FAILED, "compile_info/inputs/outputs is null."); | 1866 | + GELOGE(ge::GRAPH_FAILED, "compile_info/inputs/outputs are null."); |
| 1867 | - REPORT_INNER_ERR_MSG("E19999", "compile_info/inputs/outputs is null."); | 1867 | + REPORT_INNER_ERR_MSG("E19999", "compile_info/inputs/outputs are null."); |
| 1868 | return 0; | 1868 | return 0; |
| 1869 | } | 1869 | } |
| 1870 | 1870 | ||
| @@ -100,7 +100,7 @@ void GetInOutStr(const GraphNodesInOut &in_out_map, const string &node_name, std | |||
| 100 | std::vector<std::string> &outputs) { | 100 | std::vector<std::string> &outputs) { |
| 101 | const auto in_out_iter = in_out_map.find(node_name); | 101 | const auto in_out_iter = in_out_map.find(node_name); |
| 102 | if (in_out_iter == in_out_map.end()) { | 102 | if (in_out_iter == in_out_map.end()) { |
| 103 | - GELOGI("Not find input or output info for node:%s.", node_name.c_str()); | 103 | + GELOGI("Not found input or output info for node:%s.", node_name.c_str()); |
| 104 | return; | 104 | return; |
| 105 | } | 105 | } |
| 106 | const auto inputs_data = in_out_iter->second.first; | 106 | const auto inputs_data = in_out_iter->second.first; |
| @@ -146,7 +146,7 @@ Status ScopeBasePass::ScopeBasePassImpl::Run(std::shared_ptr<ScopeGraph> &scope_ | |||
| 146 | return domi::SCOPE_NOT_CHANGED; | 146 | return domi::SCOPE_NOT_CHANGED; |
| 147 | } | 147 | } |
| 148 | } else { | 148 | } else { |
| 149 | - GELOGI("[scope_fusion] Scope pass %s not match any scope.", parent_->PassName().c_str()); | 149 | + GELOGI("[scope_fusion] Scope pass %s does not match any scope.", parent_->PassName().c_str()); |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | ret = PrintFusionScopeInfo(scope_graph); | 152 | ret = PrintFusionScopeInfo(scope_graph); |
| @@ -493,7 +493,7 @@ Status TensorAssign::SetGeTensor(const TensorProto &tensor, GeTensorPtr &weight) | |||
| 493 | datatype_val_size = iter->second; | 493 | datatype_val_size = iter->second; |
| 494 | } else { | 494 | } else { |
| 495 | GE_CHECK_GE(data_type, 0); | 495 | GE_CHECK_GE(data_type, 0); |
| 496 | - GE_LOGE("datatype:%s not support.", DataType_Name(data_type).c_str()); | 496 | + GE_LOGE("datatype:%s is not supported.", DataType_Name(data_type).c_str()); |
| 497 | return FAILED; | 497 | return FAILED; |
| 498 | } | 498 | } |
| 499 | 499 | ||
| @@ -20,7 +20,12 @@ from ctypes import POINTER, c_char_p, c_int, c_size_t, c_uint8, c_void_p | |||
| 20 | from pathlib import Path | 20 | from pathlib import Path |
| 21 | 21 | ||
| 22 | import tensorflow as tf | 22 | import tensorflow as tf |
| 23 | -from tensorflow.core.framework import graph_pb2, tensor_shape_pb2, types_pb2, versions_pb2 | 23 | +from tensorflow.core.framework import ( |
| 24 | + graph_pb2, | ||
| 25 | + tensor_shape_pb2, | ||
| 26 | + types_pb2, | ||
| 27 | + versions_pb2, | ||
| 28 | +) | ||
| 24 | from tensorflow.python.eager import context | 29 | from tensorflow.python.eager import context |
| 25 | from tensorflow.python.framework import ops, versions | 30 | from tensorflow.python.framework import ops, versions |
| 26 | from tensorflow.python.framework.errors_impl import NotFoundError | 31 | from tensorflow.python.framework.errors_impl import NotFoundError |
| @@ -72,7 +77,9 @@ def create_retval_for_output_nodes(fdef, graph_def, nested_to_flat_tensor_name): | |||
| 72 | node_def.op = "_Retval" | 77 | node_def.op = "_Retval" |
| 73 | node_def.attr["T"].type = arg_def.type | 78 | node_def.attr["T"].type = arg_def.type |
| 74 | node_def.attr["index"].i = i | 79 | node_def.attr["index"].i = i |
| 75 | - node_def.attr["op_def"].s = ops.get_default_graph()._get_op_def(node_def.op).SerializeToString() | 80 | + node_def.attr["op_def"].s = ( |
| 81 | + ops.get_default_graph()._get_op_def(node_def.op).SerializeToString() | ||
| 82 | + ) | ||
| 76 | 83 | ||
| 77 | ret_name = fdef.ret[arg_def.name] | 84 | ret_name = fdef.ret[arg_def.name] |
| 78 | node_def.input.append(nested_to_flat_tensor_name[ret_name]) | 85 | node_def.input.append(nested_to_flat_tensor_name[ret_name]) |
| @@ -186,7 +193,9 @@ def convert_function_def_to_graph_def(fdef, input_shapes=None, copy_functions=Tr | |||
| 186 | # Build the tensor name mapping then flatten the tensor names. | 193 | # Build the tensor name mapping then flatten the tensor names. |
| 187 | # See comment on `FunctionDef.node_def` on how the tensor naming in | 194 | # See comment on `FunctionDef.node_def` on how the tensor naming in |
| 188 | # FunctionDefs is different from GraphDefs. | 195 | # FunctionDefs is different from GraphDefs. |
| 189 | - nested_to_flat_tensor_name = build_tensor_name(fdef, default_graph, copied_functions, graph_def) | 196 | + nested_to_flat_tensor_name = build_tensor_name( |
| 197 | + fdef, default_graph, copied_functions, graph_def | ||
| 198 | + ) | ||
| 190 | 199 | ||
| 191 | # Update inputs of all nodes in graph. | 200 | # Update inputs of all nodes in graph. |
| 192 | for node_def in graph_def.node: | 201 | for node_def in graph_def.node: |
| @@ -207,7 +216,9 @@ def convert_graphs(filename): | |||
| 207 | graph_def.ParseFromString(f.read()) | 216 | graph_def.ParseFromString(f.read()) |
| 208 | tf.import_graph_def(graph_def, name="") | 217 | tf.import_graph_def(graph_def, name="") |
| 209 | if len(graph_def.library.function) == 0: | 218 | if len(graph_def.library.function) == 0: |
| 210 | - print("INFO: The input model does not contain a functionDef and does not require conversion.") | 219 | + print( |
| 220 | + "INFO: The input model does not contain a functionDef and does not require conversion." | ||
| 221 | + ) | ||
| 211 | return | 222 | return |
| 212 | try: | 223 | try: |
| 213 | convert_subgraphs(graph_def, filename) | 224 | convert_subgraphs(graph_def, filename) |
| @@ -298,7 +309,11 @@ def convert_subgraphs(graph_def, filename): | |||
| 298 | return | 309 | return |
| 299 | for i, fdef in enumerate(graph_def.library.function): | 310 | for i, fdef in enumerate(graph_def.library.function): |
| 300 | sub_graph, _ = convert_function_def_to_graph_def(fdef, copy_functions=False) | 311 | sub_graph, _ = convert_function_def_to_graph_def(fdef, copy_functions=False) |
| 301 | - print("INFO: Convert FunctionDef, index:{}, name:{}".format(str(i), fdef.signature.name)) | 312 | + print( |
| 313 | + "INFO: Convert FunctionDef, index:{}, name:{}".format( | ||
| 314 | + str(i), fdef.signature.name | ||
| 315 | + ) | ||
| 316 | + ) | ||
| 302 | sub_graph_name = "{}.pb".format(fdef.signature.name) | 317 | sub_graph_name = "{}.pb".format(fdef.signature.name) |
| 303 | result_path = "{}/results".format(os.path.dirname(os.path.abspath(filename))) | 318 | result_path = "{}/results".format(os.path.dirname(os.path.abspath(filename))) |
| 304 | tf.io.write_graph(sub_graph, result_path, sub_graph_name, as_text=False) | 319 | tf.io.write_graph(sub_graph, result_path, sub_graph_name, as_text=False) |
| @@ -315,10 +330,16 @@ def convert_subgraphs(graph_def, filename): | |||
| 315 | lib.GeGraphDefSetGraph(ge_graph_def, data_buffer, data_len) | 330 | lib.GeGraphDefSetGraph(ge_graph_def, data_buffer, data_len) |
| 316 | 331 | ||
| 317 | lib.GraphDefLibAddGraphDef(graph_def_library, ge_graph_def) | 332 | lib.GraphDefLibAddGraphDef(graph_def_library, ge_graph_def) |
| 318 | - print(lib.GeGraphDefToString(lib.GraphDefLibGetGraphDef(graph_def_library, i)).decode("utf-8")) | 333 | + print( |
| 334 | + lib.GeGraphDefToString( | ||
| 335 | + lib.GraphDefLibGetGraphDef(graph_def_library, i) | ||
| 336 | + ).decode("utf-8") | ||
| 337 | + ) | ||
| 319 | 338 | ||
| 320 | # Write to prototxt | 339 | # Write to prototxt |
| 321 | - graph_def_file = "{}/graph_def_library.pbtxt".format(os.path.dirname(os.path.abspath(filename))) | 340 | + graph_def_file = "{}/graph_def_library.pbtxt".format( |
| 341 | + os.path.dirname(os.path.abspath(filename)) | ||
| 342 | + ) | ||
| 322 | print("graph_def_file: ", graph_def_file) | 343 | print("graph_def_file: ", graph_def_file) |
| 323 | try: | 344 | try: |
| 324 | with open(graph_def_file, "w") as f: | 345 | with open(graph_def_file, "w") as f: |
| @@ -352,9 +373,11 @@ def usage(): | |||
| 352 | if __name__ == "__main__": | 373 | if __name__ == "__main__": |
| 353 | model = "" | 374 | model = "" |
| 354 | try: | 375 | try: |
| 355 | - opts, args = getopt.getopt(sys.argv[1:], "-v-h-m:", ["version", "help", "model="]) | 376 | + opts, args = getopt.getopt( |
| 377 | + sys.argv[1:], "-v-h-m:", ["version", "help", "model="] | ||
| 378 | + ) | ||
| 356 | except getopt.GetoptError: | 379 | except getopt.GetoptError: |
| 357 | - print("ERROR: Input parameters is invalid, use '--help' to view the help.") | 380 | + print("ERROR: Input parameters are invalid, use '--help' to view the help.") |
| 358 | sys.exit() | 381 | sys.exit() |
| 359 | for opt_name, opt_value in opts: | 382 | for opt_name, opt_value in opts: |
| 360 | if opt_name in ("-m", "--model"): | 383 | if opt_name in ("-m", "--model"): |
| @@ -368,4 +391,6 @@ if __name__ == "__main__": | |||
| 368 | print("version 1.0.0") | 391 | print("version 1.0.0") |
| 369 | break | 392 | break |
| 370 | if len(sys.argv) == 1: | 393 | if len(sys.argv) == 1: |
| 371 | - print("INFO: Please specify the input parameters, and use '--help' to view the help.") | 394 | + print( |
| 395 | + "INFO: Please specify the input parameters, and use '--help' to view the help." | ||
| 396 | + ) | ||
| @@ -35,8 +35,8 @@ const char *kConstant = "Const"; | |||
| 35 | Status OnnxConstantParser::ParseConvertData(const ge::onnx::TensorProto &tensor_proto, ge::Tensor &tensor, int count) { | 35 | Status OnnxConstantParser::ParseConvertData(const ge::onnx::TensorProto &tensor_proto, ge::Tensor &tensor, int count) { |
| 36 | int64_t data_type = tensor_proto.data_type(); | 36 | int64_t data_type = tensor_proto.data_type(); |
| 37 | if (ge::OnnxUtil::ConvertOnnxDataType(data_type) == ge::DataType::DT_UNDEFINED) { | 37 | if (ge::OnnxUtil::ConvertOnnxDataType(data_type) == ge::DataType::DT_UNDEFINED) { |
| 38 | - REPORT_INNER_ERR_MSG("E19999", "data_type %" PRId64 " not support.", data_type); | 38 | + REPORT_INNER_ERR_MSG("E19999", "data_type %" PRId64 " is not supported.", data_type); |
| 39 | - GELOGE(FAILED, "[Check][Param] data_type %" PRId64 " not support.", data_type); | 39 | + GELOGE(FAILED, "[Check][Param] data_type %" PRId64 " is not supported.", data_type); |
| 40 | return FAILED; | 40 | return FAILED; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| @@ -77,8 +77,8 @@ Status OnnxConstantParser::ParseConvertData(const ge::onnx::TensorProto &tensor_ | |||
| 77 | if (iter != datatype_val_size_map.end()) { | 77 | if (iter != datatype_val_size_map.end()) { |
| 78 | datatype_val_size = iter->second; | 78 | datatype_val_size = iter->second; |
| 79 | } else { | 79 | } else { |
| 80 | - REPORT_INNER_ERR_MSG("E19999", "data_type %" PRId64 " not support.", data_type); | 80 | + REPORT_INNER_ERR_MSG("E19999", "data_type %" PRId64 " is not supported.", data_type); |
| 81 | - GELOGE(domi::PARAM_INVALID, "[Find][DataType]data_type %" PRId64 " not support.", data_type); | 81 | + GELOGE(domi::PARAM_INVALID, "[Find][DataType]data_type %" PRId64 " is not supported.", data_type); |
| 82 | return FAILED; | 82 | return FAILED; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| @@ -223,7 +223,7 @@ Status ParserGraphOptimizer::UpdateGraph(vector<NodePtr> &nodes) { | |||
| 223 | GELOGE(PARAM_INVALID, "Serialize func_def to string failed."); return PARAM_INVALID); | 223 | GELOGE(PARAM_INVALID, "Serialize func_def to string failed."); return PARAM_INVALID); |
| 224 | 224 | ||
| 225 | if (nodes.size() == 0) { | 225 | if (nodes.size() == 0) { |
| 226 | - GELOGE(FAILED, "nodes is empty."); | 226 | + GELOGE(FAILED, "nodes are empty."); |
| 227 | return PARAM_INVALID; | 227 | return PARAM_INVALID; |
| 228 | } | 228 | } |
| 229 | 229 | ||
| @@ -38,9 +38,10 @@ Status TensorFlowDataParser::ParseParams(const Message *op_src, ge::OpDescPtr &o | |||
| 38 | GE_RETURN_WITH_LOG_IF_ERROR(ParseInputFromUser(op_src, op_def), "parse shape of data op %s from user failed", | 38 | GE_RETURN_WITH_LOG_IF_ERROR(ParseInputFromUser(op_src, op_def), "parse shape of data op %s from user failed", |
| 39 | op_def->GetName().c_str()); | 39 | op_def->GetName().c_str()); |
| 40 | 40 | ||
| 41 | - GE_RETURN_WITH_LOG_IF_ERROR(CheckInputShape(op_def->GetName()), | 41 | + GE_RETURN_WITH_LOG_IF_ERROR( |
| 42 | - "input node %s :check user designated input shape not match input shape defined in model", | 42 | + CheckInputShape(op_def->GetName()), |
| 43 | - op_def->GetName().c_str()); | 43 | + "input node %s :check user designated input shape does not match input shape defined in model", |
| 44 | + op_def->GetName().c_str()); | ||
| 44 | 45 | ||
| 45 | // Parse data dimension values and add them to op_def | 46 | // Parse data dimension values and add them to op_def |
| 46 | GE_RETURN_WITH_LOG_IF_ERROR(ParseShape(user_input_dims_v, op_def), "TensorFlowDataParser::ParseShape failed"); | 47 | GE_RETURN_WITH_LOG_IF_ERROR(ParseShape(user_input_dims_v, op_def), "TensorFlowDataParser::ParseShape failed"); |
| @@ -1341,7 +1341,7 @@ Status TensorFlowModelParser::ParseFromMemory(const char *data, uint32_t size, g | |||
| 1341 | if (tensorflow_op_map.find(node_op) == tensorflow_op_map.cend()) { | 1341 | if (tensorflow_op_map.find(node_op) == tensorflow_op_map.cend()) { |
| 1342 | DeleteFuisonNodeDef(); | 1342 | DeleteFuisonNodeDef(); |
| 1343 | REPORT_INNER_ERR_MSG("E19999", "Op type %s is unsupported", node_op.c_str()); | 1343 | REPORT_INNER_ERR_MSG("E19999", "Op type %s is unsupported", node_op.c_str()); |
| 1344 | - GELOGE(FAILED, "Unsupport op type %s", node_op.c_str()); | 1344 | + GELOGE(FAILED, "Unsupported op type %s", node_op.c_str()); |
| 1345 | return INTERNAL_ERROR; | 1345 | return INTERNAL_ERROR; |
| 1346 | } | 1346 | } |
| 1347 | 1347 | ||
| @@ -2478,7 +2478,7 @@ Status TensorFlowModelParser::ParseProto(const std::vector<std::string> &partiti | |||
| 2478 | return FAILED; | 2478 | return FAILED; |
| 2479 | } | 2479 | } |
| 2480 | if (partitioned_serialized.size() > 1UL) { | 2480 | if (partitioned_serialized.size() > 1UL) { |
| 2481 | - GELOGE(FAILED, "Partition graphDef vector size is beyond 1, it's not support now"); | 2481 | + GELOGE(FAILED, "Partition graphDef vector size is beyond 1, it's not supported now"); |
| 2482 | return FAILED; | 2482 | return FAILED; |
| 2483 | } | 2483 | } |
| 2484 | if (partitioned_serialized.front().empty()) { | 2484 | if (partitioned_serialized.front().empty()) { |
| @@ -32,7 +32,7 @@ int32_t ReportDfxTaskPreprocess(uint32_t model_id, void *instance_handle, const | |||
| 32 | (void)model_id; | 32 | (void)model_id; |
| 33 | 33 | ||
| 34 | if ((extended_attrs != nullptr) || (extended_attrs_size != 0U)) { | 34 | if ((extended_attrs != nullptr) || (extended_attrs_size != 0U)) { |
| 35 | - GELOGW("Extended attrs is not supported in preprocess"); | 35 | + GELOGW("Extended attrs are not supported in preprocess"); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | if ((instance_handle == nullptr) || (task_info == nullptr)) { | 38 | if ((instance_handle == nullptr) || (task_info == nullptr)) { |
| @@ -53,7 +53,7 @@ int32_t ReportDfxTaskPostprocess(uint32_t model_id, void *instance_handle, const | |||
| 53 | (void)model_id; | 53 | (void)model_id; |
| 54 | 54 | ||
| 55 | if ((extended_attrs != nullptr) || (extended_attrs_size != 0U)) { | 55 | if ((extended_attrs != nullptr) || (extended_attrs_size != 0U)) { |
| 56 | - GELOGW("Extended attrs is not supported in postprocess"); | 56 | + GELOGW("Extended attrs are not supported in postprocess"); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | if ((instance_handle == nullptr) || (task_info == nullptr)) { | 59 | if ((instance_handle == nullptr) || (task_info == nullptr)) { |
| @@ -342,7 +342,7 @@ Status TransFormatFromFracZzToNd(const TransArgs &args, TransResult &result, con | |||
| 342 | Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult &result) { | 342 | Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult &result) { |
| 343 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { | 343 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { |
| 344 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, | 344 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, |
| 345 | - "[Check][Datatype]Failed, not support trans format from %s to %s, " | 345 | + "[Check][Datatype]Failed, does not support trans format from %s to %s, " |
| 346 | "src shape %s, dst shape %s, data type %s", | 346 | "src shape %s, dst shape %s, data type %s", |
| 347 | TypeUtilsInner::FormatToSerialString(args.src_format).c_str(), | 347 | TypeUtilsInner::FormatToSerialString(args.src_format).c_str(), |
| 348 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 348 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -358,7 +358,7 @@ Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult & | |||
| 358 | } | 358 | } |
| 359 | if ((!CheckShape(args.src_primary_format, args.src_shape)) || (!IsShapeValid(args.dst_shape))) { | 359 | if ((!CheckShape(args.src_primary_format, args.src_shape)) || (!IsShapeValid(args.dst_shape))) { |
| 360 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | 360 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, |
| 361 | - "[Check][Shape]Failed, not support trans format from %s to %s, " | 361 | + "[Check][Shape]Failed, does not support trans format from %s to %s, " |
| 362 | "src shape %s, dst shape %s, data type %s", | 362 | "src shape %s, dst shape %s, data type %s", |
| 363 | TypeUtilsInner::FormatToSerialString(args.src_primary_format).c_str(), | 363 | TypeUtilsInner::FormatToSerialString(args.src_primary_format).c_str(), |
| 364 | TypeUtilsInner::FormatToSerialString(args.dst_primary_format).c_str(), ShapeToString(args.src_shape).c_str(), | 364 | TypeUtilsInner::FormatToSerialString(args.dst_primary_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -394,7 +394,7 @@ Status FormatTransferFractalZz::TransShape(const Format src_format, const std::v | |||
| 394 | std::vector<int64_t> &dst_shape) { | 394 | std::vector<int64_t> &dst_shape) { |
| 395 | if (!CheckDataTypeSupportForFractalZz(data_type)) { | 395 | if (!CheckDataTypeSupportForFractalZz(data_type)) { |
| 396 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, | 396 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, |
| 397 | - "[Check][Datatype]Failed, not support trans format from %s to %s, " | 397 | + "[Check][Datatype]Failed, does not support trans format from %s to %s, " |
| 398 | "src shape %s, data type %s", | 398 | "src shape %s, data type %s", |
| 399 | TypeUtilsInner::FormatToSerialString(src_format).c_str(), | 399 | TypeUtilsInner::FormatToSerialString(src_format).c_str(), |
| 400 | TypeUtilsInner::FormatToSerialString(dst_format).c_str(), ShapeToString(src_shape).c_str(), | 400 | TypeUtilsInner::FormatToSerialString(dst_format).c_str(), ShapeToString(src_shape).c_str(), |
| @@ -411,7 +411,7 @@ Status FormatTransferFractalZz::TransShape(const Format src_format, const std::v | |||
| 411 | const Format dst_primary_format = static_cast<Format>(GetPrimaryFormat(static_cast<int32_t>(dst_format))); | 411 | const Format dst_primary_format = static_cast<Format>(GetPrimaryFormat(static_cast<int32_t>(dst_format))); |
| 412 | if (!CheckShape(src_primary_format, src_shape)) { | 412 | if (!CheckShape(src_primary_format, src_shape)) { |
| 413 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | 413 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, |
| 414 | - "[Check][Shape]Failed, not support trans format from %s to %s, " | 414 | + "[Check][Shape]Failed, does not support trans format from %s to %s, " |
| 415 | "src shape %s, data type %s", | 415 | "src shape %s, data type %s", |
| 416 | TypeUtilsInner::FormatToSerialString(src_primary_format).c_str(), | 416 | TypeUtilsInner::FormatToSerialString(src_primary_format).c_str(), |
| 417 | TypeUtilsInner::FormatToSerialString(dst_primary_format).c_str(), ShapeToString(src_shape).c_str(), | 417 | TypeUtilsInner::FormatToSerialString(dst_primary_format).c_str(), ShapeToString(src_shape).c_str(), |
| @@ -432,7 +432,7 @@ Status FormatTransferFractalZz::TransShape(const Format src_format, const std::v | |||
| 432 | Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult &result) { | 432 | Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult &result) { |
| 433 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { | 433 | if (!CheckDataTypeSupportForFractalZz(args.src_data_type)) { |
| 434 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, | 434 | GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, |
| 435 | - "[Check][Datatype]Failed, not support trans format from %s to %s, " | 435 | + "[Check][Datatype]Failed, does not support trans format from %s to %s, " |
| 436 | "src shape %s, dst shape %s, data type %s", | 436 | "src shape %s, dst shape %s, data type %s", |
| 437 | TypeUtilsInner::FormatToSerialString(args.src_format).c_str(), | 437 | TypeUtilsInner::FormatToSerialString(args.src_format).c_str(), |
| 438 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 438 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -449,7 +449,7 @@ Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult | |||
| 449 | 449 | ||
| 450 | if ((!IsShapeValid(args.src_shape)) || (!CheckShape(args.dst_primary_format, args.dst_shape))) { | 450 | if ((!IsShapeValid(args.src_shape)) || (!CheckShape(args.dst_primary_format, args.dst_shape))) { |
| 451 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | 451 | GELOGE(ACL_ERROR_GE_SHAPE_INVALID, |
| 452 | - "[Check][Shape]Failed, not support trans format " | 452 | + "[Check][Shape]Failed, does not support trans format " |
| 453 | "from %s to %s, src shape %s, dst shape %s, data type %s", | 453 | "from %s to %s, src shape %s, dst shape %s, data type %s", |
| 454 | TypeUtilsInner::FormatToSerialString(args.src_format).c_str(), | 454 | TypeUtilsInner::FormatToSerialString(args.src_format).c_str(), |
| 455 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 455 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| @@ -46,7 +46,7 @@ Status CheckGroupsSupport(const int32_t groups) { | |||
| 46 | if (groups == 0 || groups == 1) { | 46 | if (groups == 0 || groups == 1) { |
| 47 | return SUCCESS; | 47 | return SUCCESS; |
| 48 | } | 48 | } |
| 49 | - GELOGW("Currently groups %ld not support, should be 1 on fzc04 format transfer.", groups); | 49 | + GELOGW("Currently groups %ld are not supported, should be 1 on fzc04 format transfer.", groups); |
| 50 | return ACL_ERROR_GE_PARAM_INVALID; | 50 | return ACL_ERROR_GE_PARAM_INVALID; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| @@ -150,7 +150,7 @@ Status TransFormatNchwToFzC04(const TransArgs &args, TransResult &result) { | |||
| 150 | const size_t expect_size = static_cast<size_t>(sum_size); | 150 | const size_t expect_size = static_cast<size_t>(sum_size); |
| 151 | if (trans_result_1.length != expect_size) { | 151 | if (trans_result_1.length != expect_size) { |
| 152 | GELOGE(ACL_ERROR_GE_PARAM_INVALID, | 152 | GELOGE(ACL_ERROR_GE_PARAM_INVALID, |
| 153 | - "[Check][Shape]size %zu is not match expect size %zu " | 153 | + "[Check][Shape]size %zu does not match expect size %zu " |
| 154 | "after transpose", | 154 | "after transpose", |
| 155 | trans_result_1.length, expect_size); | 155 | trans_result_1.length, expect_size); |
| 156 | return ACL_ERROR_GE_PARAM_INVALID; | 156 | return ACL_ERROR_GE_PARAM_INVALID; |
| @@ -392,7 +392,7 @@ Status FormatTransfer4DToFZC04::BuildTransArgsNchwToFzC04(const ge::formats::Tra | |||
| 392 | static_cast<Format>(GetFormatFromSub(FORMAT_NCHW, GetSubFormat(src_dst_args.dst_sub_format))); | 392 | static_cast<Format>(GetFormatFromSub(FORMAT_NCHW, GetSubFormat(src_dst_args.dst_sub_format))); |
| 393 | src_to_nchw_args.dst_primary_format = FORMAT_NCHW; | 393 | src_to_nchw_args.dst_primary_format = FORMAT_NCHW; |
| 394 | if (!ge::formats::IsTransFormatSupport(src_to_nchw_args)) { | 394 | if (!ge::formats::IsTransFormatSupport(src_to_nchw_args)) { |
| 395 | - GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Not support trans format from %s to %s.", | 395 | + GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Does not support trans format from %s to %s.", |
| 396 | TypeUtilsInner::FormatToSerialString(src_dst_args.src_format).c_str(), | 396 | TypeUtilsInner::FormatToSerialString(src_dst_args.src_format).c_str(), |
| 397 | TypeUtilsInner::FormatToSerialString(src_to_nchw_args.dst_format).c_str()); | 397 | TypeUtilsInner::FormatToSerialString(src_to_nchw_args.dst_format).c_str()); |
| 398 | return ACL_ERROR_GE_FORMAT_INVALID; | 398 | return ACL_ERROR_GE_FORMAT_INVALID; |
| @@ -431,7 +431,7 @@ Status FormatTransfer4DToFZC04::TransShapeFromSrcToNchw(const Format src_format, | |||
| 431 | FORMAT_NCHW, FORMAT_RESERVED, FORMAT_RESERVED, kC0Size, | 431 | FORMAT_NCHW, FORMAT_RESERVED, FORMAT_RESERVED, kC0Size, |
| 432 | kC0Size, src_shape, nchw_shape, data_type}; | 432 | kC0Size, src_shape, nchw_shape, data_type}; |
| 433 | if (!ge::formats::IsTransFormatSupport(args)) { | 433 | if (!ge::formats::IsTransFormatSupport(args)) { |
| 434 | - GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Not support trans shape from %s to %s", | 434 | + GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Does not support trans shape from %s to %s", |
| 435 | ge::TypeUtilsInner::FormatToSerialString(src_format).c_str(), | 435 | ge::TypeUtilsInner::FormatToSerialString(src_format).c_str(), |
| 436 | ge::TypeUtilsInner::FormatToSerialString(FORMAT_NCHW).c_str()); | 436 | ge::TypeUtilsInner::FormatToSerialString(FORMAT_NCHW).c_str()); |
| 437 | return ACL_ERROR_GE_FORMAT_INVALID; | 437 | return ACL_ERROR_GE_FORMAT_INVALID; |
| @@ -507,7 +507,7 @@ Status FormatTransferFZC04To4D::TransFormat(const TransArgs &args, TransResult & | |||
| 507 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), | 507 | TypeUtilsInner::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), |
| 508 | TypeUtilsInner::DataTypeToSerialString(args.src_data_type).c_str(), ShapeToString(args.dst_shape).c_str()); | 508 | TypeUtilsInner::DataTypeToSerialString(args.src_data_type).c_str(), ShapeToString(args.dst_shape).c_str()); |
| 509 | if (args.src_primary_format != FORMAT_FRACTAL_Z_C04 || args.dst_primary_format != FORMAT_HWCN) { | 509 | if (args.src_primary_format != FORMAT_FRACTAL_Z_C04 || args.dst_primary_format != FORMAT_HWCN) { |
| 510 | - GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Src format is %s, dst format is %s, Not support.", | 510 | + GELOGE(ACL_ERROR_GE_FORMAT_INVALID, "Src format is %s, dst format is %s, Not supported.", |
| 511 | TypeUtilsInner::FormatToSerialString(args.src_primary_format).c_str(), | 511 | TypeUtilsInner::FormatToSerialString(args.src_primary_format).c_str(), |
| 512 | TypeUtilsInner::FormatToSerialString(args.dst_primary_format).c_str()); | 512 | TypeUtilsInner::FormatToSerialString(args.dst_primary_format).c_str()); |
| 513 | return ACL_ERROR_GE_FORMAT_INVALID; | 513 | return ACL_ERROR_GE_FORMAT_INVALID; |
| @@ -56,7 +56,7 @@ Status TransShapeNchwToNc1hwc0(const std::vector<int64_t> &src_shape, const Data | |||
| 56 | 56 | ||
| 57 | Status CheckArgsForNchwToNc1hwc0(const TransArgs &args) { | 57 | Status 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(TypeUtilsInner::FormatToSerialString(args.src_primary_format)) + " to " + | 60 | FmtToStr(TypeUtilsInner::FormatToSerialString(args.src_primary_format)) + " to " + |
| 61 | FmtToStr(TypeUtilsInner::FormatToSerialString(args.dst_primary_format)); | 61 | FmtToStr(TypeUtilsInner::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()); |
| @@ -82,9 +82,9 @@ bool IsTransposeArgValid(const uint8_t *const src, const std::vector<int64_t> &s | |||
| 82 | return false; | 82 | return false; |
| 83 | } | 83 | } |
| 84 | if (GetSizeByDataType(src_data_type) < 0) { | 84 | if (GetSizeByDataType(src_data_type) < 0) { |
| 85 | - GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Trans][Param]Failed, the data type %s is not support", | 85 | + GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Trans][Param]Failed, the data type %s is not supported", |
| 86 | TypeUtilsInner::DataTypeToSerialString(src_data_type).c_str()); | 86 | TypeUtilsInner::DataTypeToSerialString(src_data_type).c_str()); |
| 87 | - REPORT_INNER_ERR_MSG("E19999", "Failed to transpose, the data type %s is not support", | 87 | + REPORT_INNER_ERR_MSG("E19999", "Failed to transpose, the data type %s is not supported", |
| 88 | TypeUtilsInner::DataTypeToSerialString(src_data_type).c_str()); | 88 | TypeUtilsInner::DataTypeToSerialString(src_data_type).c_str()); |
| 89 | return false; | 89 | return false; |
| 90 | } | 90 | } |
| @@ -1364,7 +1364,7 @@ class Om2ModelExecutor::Impl { | |||
| 1364 | ge::OpDescInfo &op_desc_info) const { | 1364 | ge::OpDescInfo &op_desc_info) const { |
| 1365 | GE_ASSERT_TRUE(has_model_); | 1365 | GE_ASSERT_TRUE(has_model_); |
| 1366 | if (device_id_ != static_cast<int32_t>(device_id)) { | 1366 | if (device_id_ != static_cast<int32_t>(device_id)) { |
| 1367 | - GELOGD("[OM2][Get][OpDescInfo] Device id not match, input=%u, model=%d.", device_id, device_id_); | 1367 | + GELOGD("[OM2][Get][OpDescInfo] Device id does not match, input=%u, model=%d.", device_id, device_id_); |
| 1368 | return ge::FAILED; | 1368 | return ge::FAILED; |
| 1369 | } | 1369 | } |
| 1370 | GE_ASSERT_NOTNULL(dump_manager_); | 1370 | GE_ASSERT_NOTNULL(dump_manager_); |
| @@ -2479,17 +2479,19 @@ Status DavinciModel::GenInputMemAllocations(const std::map<uint32_t, OpDescPtr> | |||
| 2479 | // id 0 indicates that the input address is within the feature map address range | 2479 | // id 0 indicates that the input address is within the feature map address range |
| 2480 | input_indexes_to_copy_info_[input_index] = {static_cast<uint32_t>(mem_allocation_and_offset.id), | 2480 | input_indexes_to_copy_info_[input_index] = {static_cast<uint32_t>(mem_allocation_and_offset.id), |
| 2481 | mem_allocation_and_offset.offset, data_size}; | 2481 | mem_allocation_and_offset.offset, data_size}; |
| 2482 | - GELOGW("[mem allocation][input] model_id %u, input_index %u, op_name %s op_type %s not support zero copy, %s.", | 2482 | + GELOGW( |
| 2483 | - model_id_, input_index, item.second->GetName().c_str(), item.second->GetType().c_str(), | 2483 | + "[mem allocation][input] model_id %u, input_index %u, op_name %s op_type %s does not support zero copy, " |
| 2484 | - input_indexes_to_copy_info_[input_index].ToString().c_str()); | 2484 | + "%s.", |
| 2485 | + model_id_, input_index, item.second->GetName().c_str(), item.second->GetType().c_str(), | ||
| 2486 | + input_indexes_to_copy_info_[input_index].ToString().c_str()); | ||
| 2485 | // RefData 被识别不能零拷贝的可定位手段 | 2487 | // RefData 被识别不能零拷贝的可定位手段 |
| 2486 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), | 2488 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), |
| 2487 | - "model_id %u, input_index %u, op_name %s op_type %s not support zero copy", model_id_, | 2489 | + "model_id %u, input_index %u, op_name %s op_type %s does not support zero copy", model_id_, |
| 2488 | input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); | 2490 | input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); |
| 2489 | 2491 | ||
| 2490 | // host input index随路拷贝只支持零拷贝场景 | 2492 | // host input index随路拷贝只支持零拷贝场景 |
| 2491 | if (copy_host_input_indexes_.count(input_index) != 0U) { | 2493 | if (copy_host_input_indexes_.count(input_index) != 0U) { |
| 2492 | - GELOGW("model_id %u, host_input_index %u, op_name %s op_type %s not support zero copy", model_id_, | 2494 | + GELOGW("model_id %u, host_input_index %u, op_name %s op_type %s does not support zero copy", model_id_, |
| 2493 | input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); | 2495 | input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); |
| 2494 | } | 2496 | } |
| 2495 | 2497 | ||
| @@ -2526,8 +2528,8 @@ Status DavinciModel::GenInputMemAllocations(const std::map<uint32_t, OpDescPtr> | |||
| 2526 | // 保存随路拷贝的io的索引以及长度,预留保存device地址的成员,只有支持零拷贝的走该流程 | 2528 | // 保存随路拷贝的io的索引以及长度,预留保存device地址的成员,只有支持零拷贝的走该流程 |
| 2527 | if (copy_host_input_indexes_.count(input_index) > 0U) { | 2529 | if (copy_host_input_indexes_.count(input_index) > 0U) { |
| 2528 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), | 2530 | GE_ASSERT_TRUE((item.second->GetType() != REFDATA), |
| 2529 | - "model_id %u, input_index %u, op_name %s op_type %s not support host input index ", model_id_, | 2531 | + "model_id %u, input_index %u, op_name %s op_type %s does not support host input index ", |
| 2530 | - input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); | 2532 | + model_id_, input_index, item.second->GetName().c_str(), item.second->GetType().c_str()); |
| 2531 | CopyHostInputInfo copy_host_input = {}; | 2533 | CopyHostInputInfo copy_host_input = {}; |
| 2532 | copy_host_input.input_index = input_index; | 2534 | copy_host_input.input_index = input_index; |
| 2533 | copy_host_input.tensor_size = tensor_size; | 2535 | copy_host_input.tensor_size = tensor_size; |
| @@ -2603,7 +2605,7 @@ Status DavinciModel::GenOutputMemAllocations(const std::vector<OpDescPtr> &outpu | |||
| 2603 | uint32_t id = 0xFFFFFFFFU; | 2605 | uint32_t id = 0xFFFFFFFFU; |
| 2604 | uint64_t offset = logical_addr; | 2606 | uint64_t offset = logical_addr; |
| 2605 | if (mem_types[i] != kVarMemType) { | 2607 | if (mem_types[i] != kVarMemType) { |
| 2606 | - GE_ASSERT_TRUE(ret == SUCCESS, "not find 0x%" PRIx64 " in allocating table", logical_addr); | 2608 | + GE_ASSERT_TRUE(ret == SUCCESS, "not found 0x%" PRIx64 " in allocating table", logical_addr); |
| 2607 | id = static_cast<uint32_t>(mem_allocation_and_offset.id); | 2609 | id = static_cast<uint32_t>(mem_allocation_and_offset.id); |
| 2608 | offset = mem_allocation_and_offset.offset; | 2610 | offset = mem_allocation_and_offset.offset; |
| 2609 | } | 2611 | } |
| @@ -3025,7 +3027,7 @@ Status DavinciModel::GetDynamicDimsNodeInfo(const NodePtr &node) { | |||
| 3025 | netoutput_last_input_addr_ = ValueToPtr(input_addr[get_dynamic_dims_index]); | 3027 | netoutput_last_input_addr_ = ValueToPtr(input_addr[get_dynamic_dims_index]); |
| 3026 | netoutput_last_input_size_ = input_size[get_dynamic_dims_index]; | 3028 | netoutput_last_input_size_ = input_size[get_dynamic_dims_index]; |
| 3027 | shape_of_cur_dynamic_dims_ = static_cast<size_t>(input_desc->GetShape().GetDims().at(0U)); | 3029 | shape_of_cur_dynamic_dims_ = static_cast<size_t>(input_desc->GetShape().GetDims().at(0U)); |
| 3028 | - GELOGD("Shape of cur dynamic dims is %zu, size is %" PRId64 ", addr is %p.", shape_of_cur_dynamic_dims_, | 3030 | + GELOGD("Shape of cur dynamic dims are %zu, size is %" PRId64 ", addr is %p.", shape_of_cur_dynamic_dims_, |
| 3029 | netoutput_last_input_size_, netoutput_last_input_addr_); | 3031 | netoutput_last_input_size_, netoutput_last_input_addr_); |
| 3030 | } | 3032 | } |
| 3031 | return SUCCESS; | 3033 | return SUCCESS; |
| @@ -3426,7 +3428,7 @@ Status DavinciModel::LoadWithQueue() { | |||
| 3426 | input_queue_attrs_.size(), input_data_info_.size(), input_queue_attrs_.size(), | 3428 | input_queue_attrs_.size(), input_data_info_.size(), input_queue_attrs_.size(), |
| 3427 | input_fusion_offsets_.size(), model_id_); | 3429 | input_fusion_offsets_.size(), model_id_); |
| 3428 | GELOGE(ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID, | 3430 | GELOGE(ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID, |
| 3429 | - "[Check][Param] Input queue ids not match model: " | 3431 | + "[Check][Param] Input queue ids do not match model: " |
| 3430 | "input_queue=%zu input_data=%zu, model_id:%u", | 3432 | "input_queue=%zu input_data=%zu, model_id:%u", |
| 3431 | input_queue_attrs_.size(), input_data_info_.size(), model_id_); | 3433 | input_queue_attrs_.size(), input_data_info_.size(), model_id_); |
| 3432 | return ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID; | 3434 | return ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID; |
| @@ -3438,7 +3440,7 @@ Status DavinciModel::LoadWithQueue() { | |||
| 3438 | "check invalid", | 3440 | "check invalid", |
| 3439 | output_queue_attrs_.size(), output_data_info_.size(), model_id_); | 3441 | output_queue_attrs_.size(), output_data_info_.size(), model_id_); |
| 3440 | GELOGE(ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID, | 3442 | GELOGE(ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID, |
| 3441 | - "[Check][Param] Output queue ids not match model: output_queue=%zu output_data=%zu, model_id:%u", | 3443 | + "[Check][Param] Output queue ids do not match model: output_queue=%zu output_data=%zu, model_id:%u", |
| 3442 | output_queue_attrs_.size(), output_data_info_.size(), model_id_); | 3444 | output_queue_attrs_.size(), output_data_info_.size(), model_id_); |
| 3443 | return ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID; | 3445 | return ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID; |
| 3444 | } | 3446 | } |
| @@ -3629,7 +3631,8 @@ Status DavinciModel::BindInputQueue() { | |||
| 3629 | for (size_t i = 0U; i < input_queue_attrs_.size(); ++i) { | 3631 | for (size_t i = 0U; i < input_queue_attrs_.size(); ++i) { |
| 3630 | const auto it = input_data_info_.find(static_cast<uint32_t>(i)); | 3632 | const auto it = input_data_info_.find(static_cast<uint32_t>(i)); |
| 3631 | if (it == input_data_info_.end()) { | 3633 | if (it == input_data_info_.end()) { |
| 3632 | - GELOGE(FAILED, "[Check][Param] Input not match: tensor num=%zu, Queue id index=%zu", input_data_info_.size(), i); | 3634 | + GELOGE(FAILED, "[Check][Param] Input does not match: tensor num=%zu, Queue id index=%zu", input_data_info_.size(), |
| 3635 | + i); | ||
| 3633 | return FAILED; | 3636 | return FAILED; |
| 3634 | } | 3637 | } |
| 3635 | 3638 | ||
| @@ -4557,7 +4560,8 @@ Status DavinciModel::CopyInputData(const InputData &input_data) { | |||
| 4557 | std::to_string(blobs.size()); | 4560 | std::to_string(blobs.size()); |
| 4558 | REPORT_PREDEFINED_ERR_MSG("E13025", std::vector<const char_t *>({"reason"}), | 4561 | REPORT_PREDEFINED_ERR_MSG("E13025", std::vector<const char_t *>({"reason"}), |
| 4559 | std::vector<const char_t *>({reason.c_str()})); | 4562 | std::vector<const char_t *>({reason.c_str()})); |
| 4560 | - GELOGE(FAILED, "[Check][Param] Blobs not match: blobs=%zu, model input num=%zu, required index=%u, op_name(%s)", | 4563 | + GELOGE(FAILED, |
| 4564 | + "[Check][Param] Blobs do not match: blobs=%zu, model input num=%zu, required index=%u, op_name(%s)", | ||
| 4561 | blobs.size(), input_data_info_.size(), data_idx, data_info.second.GetOpName().c_str()); | 4565 | blobs.size(), input_data_info_.size(), data_idx, data_info.second.GetOpName().c_str()); |
| 4562 | return FAILED; | 4566 | return FAILED; |
| 4563 | } | 4567 | } |
| @@ -4619,7 +4623,8 @@ Status DavinciModel::CopyInputDataWithMergeH2D(const InputData &input_data) { | |||
| 4619 | std::to_string(blobs.size()); | 4623 | std::to_string(blobs.size()); |
| 4620 | REPORT_PREDEFINED_ERR_MSG("E13025", std::vector<const char_t *>({"reason"}), | 4624 | REPORT_PREDEFINED_ERR_MSG("E13025", std::vector<const char_t *>({"reason"}), |
| 4621 | std::vector<const char_t *>({reason.c_str()})); | 4625 | std::vector<const char_t *>({reason.c_str()})); |
| 4622 | - GELOGE(FAILED, "[Check][Param] Blobs not match: blobs=%zu, model input num=%zu, required index=%zu, op_name(%s)", | 4626 | + GELOGE(FAILED, |
| 4627 | + "[Check][Param] Blobs do not match: blobs=%zu, model input num=%zu, required index=%zu, op_name(%s)", | ||
| 4623 | blobs.size(), input_data_info_.size(), data_idx, data_info.second.GetOpName().c_str()); | 4628 | blobs.size(), input_data_info_.size(), data_idx, data_info.second.GetOpName().c_str()); |
| 4624 | return FAILED; | 4629 | return FAILED; |
| 4625 | } | 4630 | } |
| @@ -5456,7 +5461,7 @@ Status DavinciModel::GenOutputTensorInfo(OutputData &output_data, std::vector<ge | |||
| 5456 | gert::Tensor gert_tensor; | 5461 | gert::Tensor gert_tensor; |
| 5457 | GE_ASSERT_SUCCESS(TensorTransUtils::GeTensor2GertTensor(ge_tensor, gert_tensor)); | 5462 | GE_ASSERT_SUCCESS(TensorTransUtils::GeTensor2GertTensor(ge_tensor, gert_tensor)); |
| 5458 | outputs.emplace_back(std::move(gert_tensor)); | 5463 | outputs.emplace_back(std::move(gert_tensor)); |
| 5459 | - GELOGD("Output index:%zu, output dims is %s, data length:%" PRIu64 ".", i, ToString(output_shape_info[i]).c_str(), | 5464 | + GELOGD("Output index:%zu, output dims are %s, data length:%" PRIu64 ".", i, ToString(output_shape_info[i]).c_str(), |
| 5460 | output_size_info[i]); | 5465 | output_size_info[i]); |
| 5461 | } | 5466 | } |
| 5462 | 5467 | ||
| @@ -5492,7 +5497,7 @@ void DavinciModel::AssembleListenerOutput(const std::shared_ptr<RunArgs> &args, | |||
| 5492 | GE_CHK_RT_EXEC(ret, return); | 5497 | GE_CHK_RT_EXEC(ret, return); |
| 5493 | } | 5498 | } |
| 5494 | OutputData output_data; | 5499 | OutputData output_data; |
| 5495 | - GELOGD("Cur dynamic dims is %s.", ToString(cur_dynamic_dims_).c_str()); | 5500 | + GELOGD("Cur dynamic dims are %s.", ToString(cur_dynamic_dims_).c_str()); |
| 5496 | if (GenOutputTensorInfo(output_data, outputs) != SUCCESS) { | 5501 | if (GenOutputTensorInfo(output_data, outputs) != SUCCESS) { |
| 5497 | return; | 5502 | return; |
| 5498 | } | 5503 | } |
| @@ -7657,7 +7662,7 @@ Status DavinciModel::InitCase(const OpDescPtr &op_desc) { | |||
| 7657 | Status DavinciModel::InitModelStream(aclrtStream const stream) { | 7662 | Status DavinciModel::InitModelStream(aclrtStream const stream) { |
| 7658 | const ExecuteMode curr_mode = is_async_mode_ ? ExecuteMode::ASYNCHRONIZATION : ExecuteMode::SYNCHRONIZATION; | 7663 | const ExecuteMode curr_mode = is_async_mode_ ? ExecuteMode::ASYNCHRONIZATION : ExecuteMode::SYNCHRONIZATION; |
| 7659 | GE_CHK_BOOL_RET_STATUS((curr_mode == last_execute_mode_) || (last_execute_mode_ == ExecuteMode::INITIALIZATION), | 7664 | GE_CHK_BOOL_RET_STATUS((curr_mode == last_execute_mode_) || (last_execute_mode_ == ExecuteMode::INITIALIZATION), |
| 7660 | - INTERNAL_ERROR, "[Check][Param] NnExecute not support mix execute."); | 7665 | + INTERNAL_ERROR, "[Check][Param] NnExecute does not support mix execute."); |
| 7661 | last_execute_mode_ = curr_mode; | 7666 | last_execute_mode_ = curr_mode; |
| 7662 | 7667 | ||
| 7663 | // asynchronize mode, use user input stream. | 7668 | // asynchronize mode, use user input stream. |
| @@ -8616,7 +8621,7 @@ Status DavinciModel::GetCurDynamicDims(const std::vector<std::vector<int64_t>> & | |||
| 8616 | } | 8621 | } |
| 8617 | } | 8622 | } |
| 8618 | if (logLevel_ <= DLOG_DEBUG) { | 8623 | if (logLevel_ <= DLOG_DEBUG) { |
| 8619 | - GELOGD("Cur dynamic dims is %s.", ToString(cur_dynamic_dims).c_str()); | 8624 | + GELOGD("Cur dynamic dims are %s.", ToString(cur_dynamic_dims).c_str()); |
| 8620 | } | 8625 | } |
| 8621 | 8626 | ||
| 8622 | for (const auto &dynamic_dim : run_context_.dynamic_shape_dims) { | 8627 | for (const auto &dynamic_dim : run_context_.dynamic_shape_dims) { |
| @@ -8629,7 +8634,7 @@ Status DavinciModel::GetCurDynamicDims(const std::vector<std::vector<int64_t>> & | |||
| 8629 | " is not in the dynamic dimension list configured by dynamic_dims"; | 8634 | " is not in the dynamic dimension list configured by dynamic_dims"; |
| 8630 | REPORT_PREDEFINED_ERR_MSG("E13025", std::vector<const char_t *>({"reason"}), | 8635 | REPORT_PREDEFINED_ERR_MSG("E13025", std::vector<const char_t *>({"reason"}), |
| 8631 | std::vector<const char_t *>({reason.c_str()})); | 8636 | std::vector<const char_t *>({reason.c_str()})); |
| 8632 | - GELOGE(INTERNAL_ERROR, "[Check][Param] Cur dynamic dims is %s, does not exist in options.", | 8637 | + GELOGE(INTERNAL_ERROR, "[Check][Param] Cur dynamic dims are %s, does not exist in options.", |
| 8633 | ToString(cur_dynamic_dims).c_str()); | 8638 | ToString(cur_dynamic_dims).c_str()); |
| 8634 | return INTERNAL_ERROR; | 8639 | return INTERNAL_ERROR; |
| 8635 | } | 8640 | } |
| @@ -8638,7 +8643,7 @@ void DavinciModel::ParseInputsDimsForData(const std::vector<std::vector<int64_t> | |||
| 8638 | std::vector<std::vector<int64_t>> &real_input_dims) const { | 8643 | std::vector<std::vector<int64_t>> &real_input_dims) const { |
| 8639 | GELOGD("Start parse input dims from data."); | 8644 | GELOGD("Start parse input dims from data."); |
| 8640 | for (const auto &shape_dims : tensor_input_dims) { | 8645 | for (const auto &shape_dims : tensor_input_dims) { |
| 8641 | - GELOGD("Input tensor dims is %s.", ToString(shape_dims).c_str()); | 8646 | + GELOGD("Input tensor dims are %s.", ToString(shape_dims).c_str()); |
| 8642 | real_input_dims.emplace_back(shape_dims); | 8647 | real_input_dims.emplace_back(shape_dims); |
| 8643 | } | 8648 | } |
| 8644 | } | 8649 | } |
| @@ -1460,7 +1460,7 @@ Status ModelArgsManager::ConstructOneTaskUpdateData( | |||
| 1460 | 1460 | ||
| 1461 | if (require_placement == ArgsPlacement::kArgsPlacementSqe) { | 1461 | if (require_placement == ArgsPlacement::kArgsPlacementSqe) { |
| 1462 | GE_ASSERT_TRUE(!task_update_data.has_sqe_placement, | 1462 | GE_ASSERT_TRUE(!task_update_data.has_sqe_placement, |
| 1463 | - "More than one placement-sqe tasks found in task %zu, not support yet", task_index); | 1463 | + "More than one placement-sqe tasks found in task %zu, does not support yet", task_index); |
| 1464 | task_update_data.has_sqe_placement = true; | 1464 | task_update_data.has_sqe_placement = true; |
| 1465 | task_update_data.sqe_update_arg.stream_id = std::numeric_limits<uint32_t>::max(); // update in OnTaskDistributed | 1465 | task_update_data.sqe_update_arg.stream_id = std::numeric_limits<uint32_t>::max(); // update in OnTaskDistributed |
| 1466 | task_update_data.sqe_update_arg.task_id = std::numeric_limits<uint32_t>::max(); // update in OnTaskDistributed | 1466 | task_update_data.sqe_update_arg.task_id = std::numeric_limits<uint32_t>::max(); // update in OnTaskDistributed |
| @@ -1790,7 +1790,8 @@ Status ModelManager::ExecuteModel(const uint32_t model_id, const aclrtStream str | |||
| 1790 | 1790 | ||
| 1791 | Status ModelManager::UpdateFeatureMemoryBase(const uint32_t model_id, const uintptr_t mem_base, const size_t size) { | 1791 | Status ModelManager::UpdateFeatureMemoryBase(const uint32_t model_id, const uintptr_t mem_base, const size_t size) { |
| 1792 | const auto &hybrid_davinci_model = GetHybridModel(model_id); | 1792 | const auto &hybrid_davinci_model = GetHybridModel(model_id); |
| 1793 | - GE_ASSERT_TRUE(hybrid_davinci_model == nullptr, "[Check][Model] Not support dynamic model, model_id:%u.", model_id); | 1793 | + GE_ASSERT_TRUE(hybrid_davinci_model == nullptr, "[Check][Model] Does not support dynamic model, model_id:%u.", |
| 1794 | + model_id); | ||
| 1794 | 1795 | ||
| 1795 | const auto &davinci_model = GetModel(model_id); | 1796 | const auto &davinci_model = GetModel(model_id); |
| 1796 | GE_ASSERT_NOTNULL(davinci_model, "[Get][Model] Invalid model id %u, please check model loaded.", model_id); | 1797 | GE_ASSERT_NOTNULL(davinci_model, "[Get][Model] Invalid model id %u, please check model loaded.", model_id); |
| @@ -1806,7 +1807,7 @@ Status ModelManager::PaRemapped(const uint32_t model_id, const uint64_t va, cons | |||
| 1806 | std::vector<std::pair<uint64_t, uint64_t>> &cross_ranges) { | 1807 | std::vector<std::pair<uint64_t, uint64_t>> &cross_ranges) { |
| 1807 | const auto &hybrid_davinci_model = GetHybridModel(model_id); | 1808 | const auto &hybrid_davinci_model = GetHybridModel(model_id); |
| 1808 | GE_IF_BOOL_EXEC(hybrid_davinci_model != nullptr, | 1809 | GE_IF_BOOL_EXEC(hybrid_davinci_model != nullptr, |
| 1809 | - GELOGW("[Check][Model] Not support dynamic model, model_id:%u", model_id); | 1810 | + GELOGW("[Check][Model] Does not support dynamic model, model_id:%u", model_id); |
| 1810 | return FAILED); | 1811 | return FAILED); |
| 1811 | 1812 | ||
| 1812 | const auto &davinci_model = GetModel(model_id); | 1813 | const auto &davinci_model = GetModel(model_id); |
| @@ -2620,7 +2621,7 @@ Status ModelManager::LaunchKernelCheckAicpuOp(const std::vector<std::string> &ai | |||
| 2620 | std::string fail_reason; | 2621 | std::string fail_reason; |
| 2621 | for (uint64_t i = 0U; i < res_op_nums; i++) { | 2622 | for (uint64_t i = 0U; i < res_op_nums; i++) { |
| 2622 | const SysOpInfo &aicpu_info = res_aicpu_op_info_list.at(i); | 2623 | const SysOpInfo &aicpu_info = res_aicpu_op_info_list.at(i); |
| 2623 | - GELOGI("Not support aicpu op type: %" PRIu64 ", kernel_type:%d, opLen:%" PRIu64 ", ret_code:%d", | 2624 | + GELOGI("Does not support aicpu op type: %" PRIu64 ", kernel_type:%d, opLen:%" PRIu64 ", ret_code:%d", |
| 2624 | aicpu_info.opType, aicpu_info.kernelsType, aicpu_info.opLen, res_ret_code_list.at(i)); | 2625 | aicpu_info.opType, aicpu_info.kernelsType, aicpu_info.opLen, res_ret_code_list.at(i)); |
| 2625 | std::vector<char> op_name(kOpNameMaxSize); | 2626 | std::vector<char> op_name(kOpNameMaxSize); |
| 2626 | GE_CHK_RT(aclrtMemcpy(op_name.data(), kOpNameMaxSize, ValueToPtr(aicpu_info.opType), aicpu_info.opLen, | 2627 | GE_CHK_RT(aclrtMemcpy(op_name.data(), kOpNameMaxSize, ValueToPtr(aicpu_info.opType), aicpu_info.opLen, |
| @@ -459,7 +459,7 @@ Status KernelExTaskInfo::UpdateEventIdForAicpuBlockingOp(const OpDescPtr &op_des | |||
| 459 | return FAILED; | 459 | return FAILED; |
| 460 | } | 460 | } |
| 461 | if (!is_support) { | 461 | if (!is_support) { |
| 462 | - GELOGD("Device not support blocking aicpu op process"); | 462 | + GELOGD("Device does not support blocking aicpu op process"); |
| 463 | return SUCCESS; | 463 | return SUCCESS; |
| 464 | } | 464 | } |
| 465 | uint32_t event_id = 0U; | 465 | uint32_t event_id = 0U; |
| @@ -487,7 +487,7 @@ Status KernelExTaskInfo::DistributeWaitTaskForAicpuBlockingOp() const { | |||
| 487 | return FAILED; | 487 | return FAILED; |
| 488 | } | 488 | } |
| 489 | if (!is_support) { | 489 | if (!is_support) { |
| 490 | - GELOGD("Device not support blocking aicpu op process."); | 490 | + GELOGD("Device does not support blocking aicpu op process."); |
| 491 | return SUCCESS; | 491 | return SUCCESS; |
| 492 | } | 492 | } |
| 493 | GELOGD("Distribute wait task begin"); | 493 | GELOGD("Distribute wait task begin"); |
| @@ -349,7 +349,7 @@ aclrtBinHandle KernelTaskInfo::GetBinHandle(const domi::TaskDef &task_def) const | |||
| 349 | const auto bin_name = kernel_handles_manager->GenerateKey(register_info); | 349 | const auto bin_name = kernel_handles_manager->GenerateKey(register_info); |
| 350 | return kernel_handles_manager->GetOrRegisterKernel(register_info, bin_name); | 350 | return kernel_handles_manager->GetOrRegisterKernel(register_info, bin_name); |
| 351 | } | 351 | } |
| 352 | - GELOGW("[%s][%s] task type: %u, kernel type: %u is not support bin handle.", op_desc_->GetNamePtr(), | 352 | + GELOGW("[%s][%s] task type: %u, kernel type: %u is not supported bin handle.", op_desc_->GetNamePtr(), |
| 353 | op_desc_->GetTypePtr(), task_type_, kernel_type_); | 353 | op_desc_->GetTypePtr(), task_type_, kernel_type_); |
| 354 | return nullptr; | 354 | return nullptr; |
| 355 | } | 355 | } |
| @@ -723,7 +723,7 @@ Status KernelTaskInfo::UpdateEventIdForAicpuBlockingOp(const hybrid::AicpuExtInf | |||
| 723 | return FAILED; | 723 | return FAILED; |
| 724 | } | 724 | } |
| 725 | if (!is_support) { | 725 | if (!is_support) { |
| 726 | - GELOGD("Device not support blocking aicpu op process"); | 726 | + GELOGD("Device does not support blocking aicpu op process"); |
| 727 | return SUCCESS; | 727 | return SUCCESS; |
| 728 | } | 728 | } |
| 729 | uint32_t event_id = 0U; | 729 | uint32_t event_id = 0U; |
| @@ -749,7 +749,7 @@ Status KernelTaskInfo::DistributeWaitTaskForAicpuBlockingOp() const { | |||
| 749 | return FAILED; | 749 | return FAILED; |
| 750 | } | 750 | } |
| 751 | if (!is_support) { | 751 | if (!is_support) { |
| 752 | - GELOGD("device not support blocking aicpu op process."); | 752 | + GELOGD("device does not support blocking aicpu op process."); |
| 753 | return SUCCESS; | 753 | return SUCCESS; |
| 754 | } | 754 | } |
| 755 | GELOGD("Distribute wait task begin"); | 755 | GELOGD("Distribute wait task begin"); |
| @@ -1314,7 +1314,7 @@ Status FftsPlusProtoTransfer::UpdateEventIdForAicpuBlockingOp( | |||
| 1314 | return FAILED; | 1314 | return FAILED; |
| 1315 | } | 1315 | } |
| 1316 | if (!is_support) { | 1316 | if (!is_support) { |
| 1317 | - GELOGD("Device not support blocking aicpu op process"); | 1317 | + GELOGD("Device does not support blocking aicpu op process"); |
| 1318 | return SUCCESS; | 1318 | return SUCCESS; |
| 1319 | } | 1319 | } |
| 1320 | uint32_t event_id = 0U; | 1320 | uint32_t event_id = 0U; |
| @@ -48,7 +48,9 @@ Status ProfilerTraceTaskInfo::Distribute() { | |||
| 48 | static_cast<int32_t>(notify_)); | 48 | static_cast<int32_t>(notify_)); |
| 49 | is_support_redistribute_ = true; | 49 | is_support_redistribute_ = true; |
| 50 | if (((log_id_ > kProfilingMaxLogid) && (log_id_ < kProfilingArStartLogid)) || (log_id_ > kProfilingArMaxLogid)) { | 50 | if (((log_id_ > kProfilingMaxLogid) && (log_id_ < kProfilingArStartLogid)) || (log_id_ > kProfilingArMaxLogid)) { |
| 51 | - GELOGD("ProfilerTraceTaskInfo logid:%" PRIu64 " is out of range.", log_id_); | 51 | + GELOGD("ProfilerTraceTaskInfo logid:%" PRIu64 " is out of range, valid range [0, %" PRIu64 "] or [%" PRIu64 |
| 52 | + ", %" PRIu64 "].", | ||
| 53 | + log_id_, kProfilingMaxLogid, kProfilingArStartLogid, kProfilingArMaxLogid); | ||
| 52 | return SUCCESS; | 54 | return SUCCESS; |
| 53 | } | 55 | } |
| 54 | if ((davinci_model_ != nullptr) && (!davinci_model_->CheckModelNoInputAndOutput())) { | 56 | if ((davinci_model_ != nullptr) && (!davinci_model_->CheckModelNoInputAndOutput())) { |
| @@ -303,7 +303,7 @@ uint8_t *ExpandableActiveMemoryAllocator::MallocMemory(const std::string &purpos | |||
| 303 | incremental ? (used_memory_size_ + static_cast<size_t>(memory_size)) : static_cast<size_t>(memory_size); | 303 | incremental ? (used_memory_size_ + static_cast<size_t>(memory_size)) : static_cast<size_t>(memory_size); |
| 304 | if (MallocVirtualMemory(malloc_size) != SUCCESS) { | 304 | if (MallocVirtualMemory(malloc_size) != SUCCESS) { |
| 305 | support_reserve_mem_address_ = false; | 305 | support_reserve_mem_address_ = false; |
| 306 | - GELOGW("Maybe not support rtReserveMemAddress."); | 306 | + GELOGW("Maybe does not support rtReserveMemAddress."); |
| 307 | return nullptr; | 307 | return nullptr; |
| 308 | } | 308 | } |
| 309 | GE_ASSERT_SUCCESS(MallocPhysicalMemoryAndMap(purpose, malloc_size)); | 309 | GE_ASSERT_SUCCESS(MallocPhysicalMemoryAndMap(purpose, malloc_size)); |
| @@ -76,7 +76,7 @@ class RtContextSwitchGuard { | |||
| 76 | int64_t CalcVarSizeInBytes(const GeTensorDesc &desc) { | 76 | int64_t CalcVarSizeInBytes(const GeTensorDesc &desc) { |
| 77 | int64_t var_size = GetSizeByDataType(desc.GetDataType()); | 77 | int64_t var_size = GetSizeByDataType(desc.GetDataType()); |
| 78 | if (var_size <= 0) { | 78 | if (var_size <= 0) { |
| 79 | - REPORT_INNER_ERR_MSG("E19999", "Data type:%s in desc, it's size:%" PRId64 " < 0, check invalid", | 79 | + REPORT_INNER_ERR_MSG("E19999", "Data type:%s in desc, its size:%" PRId64 " < 0, check invalid", |
| 80 | TypeUtils::DataTypeToSerialString(desc.GetDataType()).c_str(), var_size); | 80 | TypeUtils::DataTypeToSerialString(desc.GetDataType()).c_str(), var_size); |
| 81 | GELOGE(PARAM_INVALID, "[Calc][VarDataSize] by data type %s failed.", | 81 | GELOGE(PARAM_INVALID, "[Calc][VarDataSize] by data type %s failed.", |
| 82 | TypeUtils::DataTypeToSerialString(desc.GetDataType()).c_str()); | 82 | TypeUtils::DataTypeToSerialString(desc.GetDataType()).c_str()); |
| @@ -101,13 +101,13 @@ Status HcomOmeUtil::GetHcclDataType(const ge::ConstOpDescPtr &op_desc, | |||
| 101 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); | 101 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); |
| 102 | if (iter == kConstOpHcclDataType.end()) { | 102 | if (iter == kConstOpHcclDataType.end()) { |
| 103 | REPORT_INNER_ERR_MSG("E19999", | 103 | REPORT_INNER_ERR_MSG("E19999", |
| 104 | - "Attr:%s in op:%s(%s), value data_type:%s, not support in kConstOpHcclDataType now, " | 104 | + "Attr:%s in op:%s(%s), value data_type:%s, does not support in kConstOpHcclDataType now, " |
| 105 | "check invalid", | 105 | "check invalid", |
| 106 | HCOM_ATTR_DATA_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), | 106 | HCOM_ATTR_DATA_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), |
| 107 | ge::TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 107 | ge::TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 108 | GELOGE(PARAM_INVALID, | 108 | GELOGE(PARAM_INVALID, |
| 109 | "[Check][Param] Attr:%s in op:%s(%s), value data_type:%s, " | 109 | "[Check][Param] Attr:%s in op:%s(%s), value data_type:%s, " |
| 110 | - "not support in kConstOpHcclDataType now", | 110 | + "does not support in kConstOpHcclDataType now", |
| 111 | HCOM_ATTR_DATA_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), | 111 | HCOM_ATTR_DATA_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), |
| 112 | ge::TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 112 | ge::TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 113 | return PARAM_INVALID; | 113 | return PARAM_INVALID; |
| @@ -367,7 +367,7 @@ Status HybridModelPipelineExecutor::Execute(const std::vector<gert::Tensor> &inp | |||
| 367 | (void)ctrl_args; | 367 | (void)ctrl_args; |
| 368 | (void)outputs; | 368 | (void)outputs; |
| 369 | (void)inputs; | 369 | (void)inputs; |
| 370 | - GELOGE(FAILED, "Pipeline executor not support upper interface RunGraph"); | 370 | + GELOGE(FAILED, "Pipeline executor does not support upper interface RunGraph"); |
| 371 | return FAILED; | 371 | return FAILED; |
| 372 | } | 372 | } |
| 373 | 373 | ||
| @@ -65,11 +65,11 @@ Status SubgraphExecutor::InitInputsForKnownShape(const std::vector<TensorValue> | |||
| 65 | auto &parent_input_index = input_index_mapping[i]; | 65 | auto &parent_input_index = input_index_mapping[i]; |
| 66 | if (static_cast<size_t>(parent_input_index) >= inputs.size()) { | 66 | if (static_cast<size_t>(parent_input_index) >= inputs.size()) { |
| 67 | GELOGE(INTERNAL_ERROR, | 67 | GELOGE(INTERNAL_ERROR, |
| 68 | - "[Check][Size][%s] Number of inputs [%zu] is not sufficient for subgraph" | 68 | + "[Check][Size][%s] Number of inputs [%zu] is not sufficient for subgraph " |
| 69 | "which needs at least [%d] inputs", | 69 | "which needs at least [%d] inputs", |
| 70 | graph_item_->GetName().c_str(), inputs.size(), parent_input_index + 1); | 70 | graph_item_->GetName().c_str(), inputs.size(), parent_input_index + 1); |
| 71 | REPORT_INNER_ERR_MSG("E19999", | 71 | REPORT_INNER_ERR_MSG("E19999", |
| 72 | - "[%s] Number of inputs [%zu] is not sufficient for subgraph" | 72 | + "[%s] Number of inputs [%zu] is not sufficient for subgraph " |
| 73 | "which needs at least [%d] inputs", | 73 | "which needs at least [%d] inputs", |
| 74 | graph_item_->GetName().c_str(), inputs.size(), parent_input_index + 1); | 74 | graph_item_->GetName().c_str(), inputs.size(), parent_input_index + 1); |
| 75 | return INTERNAL_ERROR; | 75 | return INTERNAL_ERROR; |
| @@ -367,9 +367,9 @@ Status HybridModel::GetOutputDescInfo(std::vector<InputOutputDescInfo> &output_d | |||
| 367 | 367 | ||
| 368 | const auto out_size = static_cast<uint32_t>(op_desc->GetInputsSize()); | 368 | const auto out_size = static_cast<uint32_t>(op_desc->GetInputsSize()); |
| 369 | GE_IF_BOOL_EXEC(out_size != output_desc_list.size(), | 369 | GE_IF_BOOL_EXEC(out_size != output_desc_list.size(), |
| 370 | - REPORT_INNER_ERR_MSG("E19999", "output size[%u] not match output_desc_list size[%zu]", out_size, | 370 | + REPORT_INNER_ERR_MSG("E19999", "output size[%u] does not match output_desc_list size[%zu]", out_size, |
| 371 | output_desc_list.size()); | 371 | output_desc_list.size()); |
| 372 | - GELOGE(FAILED, "[Check][Size]output size[%u] not match output_desc_list size[%zu]", out_size, | 372 | + GELOGE(FAILED, "[Check][Size]output size[%u] does not match output_desc_list size[%zu]", out_size, |
| 373 | output_desc_list.size()); | 373 | output_desc_list.size()); |
| 374 | return FAILED;); | 374 | return FAILED;); |
| 375 | 375 | ||
| @@ -558,7 +558,7 @@ Status HybridModel::GetAippType(const uint32_t index, InputAippType &aipp_type, | |||
| 558 | 558 | ||
| 559 | bool HybridModel::CheckHostMemInputOptimization(const std::vector<NodePtr> &node_with_hostmem) const { | 559 | bool HybridModel::CheckHostMemInputOptimization(const std::vector<NodePtr> &node_with_hostmem) const { |
| 560 | if (node_with_hostmem.empty()) { | 560 | if (node_with_hostmem.empty()) { |
| 561 | - GELOGD("NOT support host memory input optimization because there is no host memory input node."); | 561 | + GELOGD("Does not support host memory input optimization because there is no host memory input node."); |
| 562 | return false; | 562 | return false; |
| 563 | } | 563 | } |
| 564 | 564 | ||
| @@ -572,7 +572,7 @@ bool HybridModel::CheckHostMemInputOptimization(const std::vector<NodePtr> &node | |||
| 572 | return false; | 572 | return false; |
| 573 | } | 573 | } |
| 574 | if ((!node_item_ptr->kernel_task->IsSupportHostMemInputOpt())) { | 574 | if ((!node_item_ptr->kernel_task->IsSupportHostMemInputOpt())) { |
| 575 | - GELOGD("kernel_task[%s] not support host memory input optimization", node_ptr->GetName().c_str()); | 575 | + GELOGD("kernel_task[%s] does not support host memory input optimization", node_ptr->GetName().c_str()); |
| 576 | return false; | 576 | return false; |
| 577 | } | 577 | } |
| 578 | } | 578 | } |
| @@ -213,7 +213,7 @@ Status AiCoreOpTask::InitWithKernelDef(const OpDesc &op_desc, const domi::TaskDe | |||
| 213 | "arg size = %u , op:%s op_type:%s", | 213 | "arg size = %u , op:%s op_type:%s", |
| 214 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), op_desc.GetType().c_str()); | 214 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), op_desc.GetType().c_str()); |
| 215 | REPORT_INNER_ERR_MSG("E19999", | 215 | REPORT_INNER_ERR_MSG("E19999", |
| 216 | - "[%s] Arg offset out of range. offset = %u, arg size = %u" | 216 | + "[%s] Arg offset out of range. offset = %u, arg size = %u " |
| 217 | "op:%s op_type:%s", | 217 | "op:%s op_type:%s", |
| 218 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), | 218 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), |
| 219 | op_desc.GetType().c_str()); | 219 | op_desc.GetType().c_str()); |
| @@ -268,11 +268,11 @@ Status AiCoreOpTask::InitWithKernelDefWithHandle(const OpDesc &op_desc, const do | |||
| 268 | 268 | ||
| 269 | if (context.args_offset().size() < sizeof(uint16_t)) { | 269 | if (context.args_offset().size() < sizeof(uint16_t)) { |
| 270 | GELOGE(INTERNAL_ERROR, | 270 | GELOGE(INTERNAL_ERROR, |
| 271 | - "[Check][Size]Invalid args_offset, size:%zu is smaller" | 271 | + "[Check][Size]Invalid args_offset, size:%zu is smaller " |
| 272 | "than size of uint16_t. op:%s op_type:%s", | 272 | "than size of uint16_t. op:%s op_type:%s", |
| 273 | context.args_offset().size(), op_desc.GetName().c_str(), op_desc.GetType().c_str()); | 273 | context.args_offset().size(), op_desc.GetName().c_str(), op_desc.GetType().c_str()); |
| 274 | REPORT_INNER_ERR_MSG("E19999", | 274 | REPORT_INNER_ERR_MSG("E19999", |
| 275 | - "Invalid args_offset, size:%zu is smaller" | 275 | + "Invalid args_offset, size:%zu is smaller " |
| 276 | "than size of uint16_t. op:%s op_type:%s", | 276 | "than size of uint16_t. op:%s op_type:%s", |
| 277 | context.args_offset().size(), op_desc.GetName().c_str(), op_desc.GetType().c_str()); | 277 | context.args_offset().size(), op_desc.GetName().c_str(), op_desc.GetType().c_str()); |
| 278 | return INTERNAL_ERROR; | 278 | return INTERNAL_ERROR; |
| @@ -282,11 +282,11 @@ Status AiCoreOpTask::InitWithKernelDefWithHandle(const OpDesc &op_desc, const do | |||
| 282 | offset_ = *args_offset_buffer; | 282 | offset_ = *args_offset_buffer; |
| 283 | if (offset_ > args_size_without_tiling_) { | 283 | if (offset_ > args_size_without_tiling_) { |
| 284 | GELOGE(INTERNAL_ERROR, | 284 | GELOGE(INTERNAL_ERROR, |
| 285 | - "[Check][Offset][%s] Arg offset out of range. offset = %u, arg size = %u" | 285 | + "[Check][Offset][%s] Arg offset out of range. offset = %u, arg size = %u " |
| 286 | "op:%s op_type:%s", | 286 | "op:%s op_type:%s", |
| 287 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), op_desc.GetType().c_str()); | 287 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), op_desc.GetType().c_str()); |
| 288 | REPORT_INNER_ERR_MSG("E19999", | 288 | REPORT_INNER_ERR_MSG("E19999", |
| 289 | - "[%s] Arg offset out of range. offset = %u, arg size = %u" | 289 | + "[%s] Arg offset out of range. offset = %u, arg size = %u " |
| 290 | "op:%s op_type:%s", | 290 | "op:%s op_type:%s", |
| 291 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), | 291 | GetName().c_str(), offset_, args_size_without_tiling_, op_desc.GetName().c_str(), |
| 292 | op_desc.GetType().c_str()); | 292 | op_desc.GetType().c_str()); |
| @@ -323,7 +323,7 @@ Status AicpuNodeTaskBase::UpdateEventIdForBlockingAicpuOp() { | |||
| 323 | return FAILED; | 323 | return FAILED; |
| 324 | } | 324 | } |
| 325 | if (!is_support) { | 325 | if (!is_support) { |
| 326 | - GELOGD("Device not support blocking aicpu op process"); | 326 | + GELOGD("Device does not support blocking aicpu op process"); |
| 327 | return SUCCESS; | 327 | return SUCCESS; |
| 328 | } | 328 | } |
| 329 | uint32_t event_id = 0U; | 329 | uint32_t event_id = 0U; |
| @@ -370,7 +370,7 @@ Status AicpuNodeTaskBase::DistributeWaitTaskForAicpuBlockingOp(rtStream_t stream | |||
| 370 | return FAILED; | 370 | return FAILED; |
| 371 | } | 371 | } |
| 372 | if (!is_support) { | 372 | if (!is_support) { |
| 373 | - GELOGD("Device not support blocking aicpu op process."); | 373 | + GELOGD("Device does not support blocking aicpu op process."); |
| 374 | return SUCCESS; | 374 | return SUCCESS; |
| 375 | } | 375 | } |
| 376 | GELOGD("Distribute queue task begin"); | 376 | GELOGD("Distribute queue task begin"); |
| @@ -51,10 +51,11 @@ Status HcclNodeTask::FillHcomOpInfo(const TaskContext &context, const OpDescPtr | |||
| 51 | const ge::DataType src_data_type = input_desc->GetDataType(); | 51 | const ge::DataType src_data_type = input_desc->GetDataType(); |
| 52 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); | 52 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); |
| 53 | if (iter == kConstOpHcclDataType.end()) { | 53 | if (iter == kConstOpHcclDataType.end()) { |
| 54 | - REPORT_INNER_ERR_MSG("E19999", "%s(%s) inputdesc0 datatype:%s not support.", op_desc->GetName().c_str(), | 54 | + REPORT_INNER_ERR_MSG("E19999", "%s(%s) inputdesc0 datatype:%s does not support.", op_desc->GetName().c_str(), |
| 55 | op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 55 | op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 56 | - GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) inputdesc0 datatype:%s not support.", op_desc->GetName().c_str(), | 56 | + GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) inputdesc0 datatype:%s does not support.", |
| 57 | - op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 57 | + op_desc->GetName().c_str(), op_desc->GetType().c_str(), |
| 58 | + TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | ||
| 58 | return PARAM_INVALID; | 59 | return PARAM_INVALID; |
| 59 | } | 60 | } |
| 60 | hcom_op_info.dataType = iter->second; | 61 | hcom_op_info.dataType = iter->second; |
| @@ -416,10 +417,11 @@ static Status BuildAllToAllVparams(const TaskContext &context, HcomAllToAllVPara | |||
| 416 | const ge::DataType src_data_type = input_desc->GetDataType(); | 417 | const ge::DataType src_data_type = input_desc->GetDataType(); |
| 417 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); | 418 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); |
| 418 | if (iter == kConstOpHcclDataType.end()) { | 419 | if (iter == kConstOpHcclDataType.end()) { |
| 419 | - REPORT_INNER_ERR_MSG("E19999", "%s(%s) alltoallv datatype:%s not support.", op_desc_p->GetName().c_str(), | 420 | + REPORT_INNER_ERR_MSG("E19999", "%s(%s) alltoallv datatype:%s does not support.", op_desc_p->GetName().c_str(), |
| 420 | op_desc_p->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 421 | op_desc_p->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 421 | - GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) alltoallv datatype:%s not support.", op_desc_p->GetName().c_str(), | 422 | + GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) alltoallv datatype:%s does not support.", |
| 422 | - op_desc_p->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 423 | + op_desc_p->GetName().c_str(), op_desc_p->GetType().c_str(), |
| 424 | + TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | ||
| 423 | return PARAM_INVALID; | 425 | return PARAM_INVALID; |
| 424 | } | 426 | } |
| 425 | params.sendtype = iter->second; | 427 | params.sendtype = iter->second; |
| @@ -454,9 +456,9 @@ static Status BuildGatherAllToAllParams(const TaskContext &context, HcomGatherAl | |||
| 454 | (void)ge::AttrUtils::GetDataType(op_desc, HCOM_ATTR_DATA_TYPE, hccl_data_type); | 456 | (void)ge::AttrUtils::GetDataType(op_desc, HCOM_ATTR_DATA_TYPE, hccl_data_type); |
| 455 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(hccl_data_type)); | 457 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(hccl_data_type)); |
| 456 | if (iter == kConstOpHcclDataType.end()) { | 458 | if (iter == kConstOpHcclDataType.end()) { |
| 457 | - REPORT_INNER_ERR_MSG("E19999", "%s(%s) received datatype:%s not support.", op_desc->GetName().c_str(), | 459 | + REPORT_INNER_ERR_MSG("E19999", "%s(%s) received datatype:%s does not support.", op_desc->GetName().c_str(), |
| 458 | op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(hccl_data_type).c_str()); | 460 | op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(hccl_data_type).c_str()); |
| 459 | - GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) received datatype:%s not support.", op_desc->GetName().c_str(), | 461 | + GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) received datatype:%s does not support.", op_desc->GetName().c_str(), |
| 460 | op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(hccl_data_type).c_str()); | 462 | op_desc->GetType().c_str(), TypeUtils::DataTypeToSerialString(hccl_data_type).c_str()); |
| 461 | return PARAM_INVALID; | 463 | return PARAM_INVALID; |
| 462 | } | 464 | } |
| @@ -489,10 +491,11 @@ static Status BuildAllToAllVCParams(const TaskContext &context, HcomAllToAllVCPa | |||
| 489 | const ge::DataType src_data_type = input_desc->GetDataType(); | 491 | const ge::DataType src_data_type = input_desc->GetDataType(); |
| 490 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); | 492 | const auto iter = kConstOpHcclDataType.find(static_cast<int64_t>(src_data_type)); |
| 491 | if (iter == kConstOpHcclDataType.end()) { | 493 | if (iter == kConstOpHcclDataType.end()) { |
| 492 | - REPORT_INNER_ERR_MSG("E19999", "%s(%s) alltoallv datatype:%s not support.", op_desc_p->GetName().c_str(), | 494 | + REPORT_INNER_ERR_MSG("E19999", "%s(%s) alltoallv datatype:%s does not support.", op_desc_p->GetName().c_str(), |
| 493 | op_desc_p->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 495 | op_desc_p->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); |
| 494 | - GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) alltoallv datatype:%s not support.", op_desc_p->GetName().c_str(), | 496 | + GELOGE(PARAM_INVALID, "[Find][DataType] %s(%s) alltoallv datatype:%s does not support.", |
| 495 | - op_desc_p->GetType().c_str(), TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | 497 | + op_desc_p->GetName().c_str(), op_desc_p->GetType().c_str(), |
| 498 | + TypeUtils::DataTypeToSerialString(src_data_type).c_str()); | ||
| 496 | return PARAM_INVALID; | 499 | return PARAM_INVALID; |
| 497 | } | 500 | } |
| 498 | params.sendtype = iter->second; | 501 | params.sendtype = iter->second; |
| @@ -84,7 +84,7 @@ Status OpsKernelExecutorManager::InitializePlugin(PluginManager &plugin_manager, | |||
| 84 | const std::vector<std::string> func_check_list = {kExecutorPluginFuncInitialize, kExecutorPluginFuncGetExecutors, | 84 | const std::vector<std::string> func_check_list = {kExecutorPluginFuncInitialize, kExecutorPluginFuncGetExecutors, |
| 85 | kExecutorPluginFuncFinalize}; | 85 | kExecutorPluginFuncFinalize}; |
| 86 | GE_CHK_STATUS_RET(plugin_manager.LoadSo(plugin_paths, func_check_list), | 86 | GE_CHK_STATUS_RET(plugin_manager.LoadSo(plugin_paths, func_check_list), |
| 87 | - "[Check][SoFile] not find any valid so file."); | 87 | + "[Check][SoFile] not found any valid so file."); |
| 88 | if (plugin_manager.InvokeAll<std::map<std::string, std::string> &, Status>(kExecutorPluginFuncInitialize, options_) != | 88 | if (plugin_manager.InvokeAll<std::map<std::string, std::string> &, Status>(kExecutorPluginFuncInitialize, options_) != |
| 89 | SUCCESS) { | 89 | SUCCESS) { |
| 90 | GELOGE(GE_OPS_GET_NO_VALID_SO, "[Invoke][OpsKernelInfo]PluginManager InvokeAll failed."); | 90 | GELOGE(GE_OPS_GET_NO_VALID_SO, "[Invoke][OpsKernelInfo]PluginManager InvokeAll failed."); |
| @@ -901,7 +901,7 @@ Status AiCpuBaseTask::UpdateEventIdForBlockingAicpuOp() { | |||
| 901 | return FAILED; | 901 | return FAILED; |
| 902 | } | 902 | } |
| 903 | if (!is_support) { | 903 | if (!is_support) { |
| 904 | - GELOGD("Device not support blocking aicpu op process"); | 904 | + GELOGD("Device does not support blocking aicpu op process"); |
| 905 | return SUCCESS; | 905 | return SUCCESS; |
| 906 | } | 906 | } |
| 907 | uint32_t event_id = 0U; | 907 | uint32_t event_id = 0U; |
| @@ -1159,7 +1159,7 @@ Status AiCpuBaseTask::DistributeWaitTaskForAicpuBlockingOp(aclrtStream const str | |||
| 1159 | return FAILED; | 1159 | return FAILED; |
| 1160 | } | 1160 | } |
| 1161 | if (!is_support) { | 1161 | if (!is_support) { |
| 1162 | - GELOGD("Device not support blocking aicpu op process."); | 1162 | + GELOGD("Device does not support blocking aicpu op process."); |
| 1163 | return SUCCESS; | 1163 | return SUCCESS; |
| 1164 | } | 1164 | } |
| 1165 | GELOGI("Distribute queue task begin"); | 1165 | GELOGI("Distribute queue task begin"); |
| @@ -69,7 +69,7 @@ inline ge::graphStatus CheckModelInputsNum(const void *void_ed, size_t tensor_nu | |||
| 69 | "Check model input num failed, add overflow, input tensor num(%zu), append input num(%zu)", tensor_num, | 69 | "Check model input num failed, add overflow, input tensor num(%zu), append input num(%zu)", tensor_num, |
| 70 | append_num); | 70 | append_num); |
| 71 | GE_ASSERT_TRUE((total_num == ed->input_num), | 71 | GE_ASSERT_TRUE((total_num == ed->input_num), |
| 72 | - "Check model input num failed, input num not match, expect input num(%zu), " | 72 | + "Check model input num failed, input num does not match, expect input num(%zu), " |
| 73 | "current total inputs num(%zu) = input tensor num(%zu) + append input num(%zu)", | 73 | "current total inputs num(%zu) = input tensor num(%zu) + append input num(%zu)", |
| 74 | ed->input_num, total_num, tensor_num, append_num); | 74 | ed->input_num, total_num, tensor_num, append_num); |
| 75 | return ge::GRAPH_SUCCESS; | 75 | return ge::GRAPH_SUCCESS; |
| @@ -92,7 +92,7 @@ ge::Status CreateSoPathHolder(const ge::NodePtr &node, bg::ValueHolderPtr &so_pa | |||
| 92 | auto bin_file_buffer = graph->GetExtAttr<std::map<std::string, ge::OpSoBinPtr>>("bin_file_buffer"); | 92 | auto bin_file_buffer = graph->GetExtAttr<std::map<std::string, ge::OpSoBinPtr>>("bin_file_buffer"); |
| 93 | if (bin_file_buffer == nullptr) { | 93 | if (bin_file_buffer == nullptr) { |
| 94 | // bin_file_buffer不存在,走so_path流程 | 94 | // bin_file_buffer不存在,走so_path流程 |
| 95 | - GELOGD("Not exist bin_file_buffer."); | 95 | + GELOGD("Does not exist bin_file_buffer."); |
| 96 | return ge::SUCCESS; | 96 | return ge::SUCCESS; |
| 97 | } | 97 | } |
| 98 | auto buffer = bin_file_buffer->find(so_path); | 98 | auto buffer = bin_file_buffer->find(so_path); |
| @@ -103,7 +103,7 @@ ge::Status CreateSoPathHolder(const ge::NodePtr &node, bg::ValueHolderPtr &so_pa | |||
| 103 | return ge::SUCCESS; | 103 | return ge::SUCCESS; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | - GELOGE(ge::FAILED, "Not exist autofuse so in bin_file_buffer, key:%s.", so_path.c_str()); | 106 | + GELOGE(ge::FAILED, "Does not exist autofuse so in bin_file_buffer, key:%s.", so_path.c_str()); |
| 107 | return ge::FAILED; | 107 | return ge::FAILED; |
| 108 | } | 108 | } |
| 109 | GE_ASSERT_NOTNULL(buffer->second.get()); | 109 | GE_ASSERT_NOTNULL(buffer->second.get()); |
| @@ -44,8 +44,8 @@ ge::graphStatus SequenceAtDoComputeExtend(KernelContext *context, const uint64_t | |||
| 44 | 44 | ||
| 45 | auto tensor_ref = sequence->Get(index); | 45 | auto tensor_ref = sequence->Get(index); |
| 46 | if (tensor_ref == nullptr) { | 46 | if (tensor_ref == nullptr) { |
| 47 | - GELOGE(ge::PARAM_INVALID, "input index is out of range."); | 47 | + GELOGE(ge::PARAM_INVALID, "input index(%" PRId64 ") is out of range [0, %zu).", index, sequence->Size()); |
| 48 | - REPORT_INNER_ERR_MSG("E39999", "input index is out of range."); | 48 | + REPORT_INNER_ERR_MSG("E39999", "input index(%" PRId64 ") is out of range [0, %zu).", index, sequence->Size()); |
| 49 | return ge::PARAM_INVALID; | 49 | return ge::PARAM_INVALID; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| @@ -58,7 +58,7 @@ bg::ValueHolderPtr CreateNodeMemParam(const ge::NodePtr &node, FFTSAllMemPara &a | |||
| 58 | std::string para_key = key.empty() ? node->GetName() : key; | 58 | std::string para_key = key.empty() ? node->GetName() : key; |
| 59 | const auto iter = all_mem_para.node_to_args_para.find(para_key); | 59 | const auto iter = all_mem_para.node_to_args_para.find(para_key); |
| 60 | if (iter == all_mem_para.node_to_args_para.end()) { | 60 | if (iter == all_mem_para.node_to_args_para.end()) { |
| 61 | - GELOGE(ge::FAILED, "Node[%s] not find args para.", node->GetName().c_str()); | 61 | + GELOGE(ge::FAILED, "Node[%s] not found args para.", node->GetName().c_str()); |
| 62 | return nullptr; | 62 | return nullptr; |
| 63 | } | 63 | } |
| 64 | auto node_ori_para = bg::ValueHolder::CreateConst(&iter->second, sizeof(iter->second)); | 64 | auto node_ori_para = bg::ValueHolder::CreateConst(&iter->second, sizeof(iter->second)); |
| @@ -893,7 +893,7 @@ ge::Status FftsPlusProtoTransfer::InitAicpuCtxUserData(const ge::OpDescPtr &op_d | |||
| 893 | ge::Status FftsPlusProtoTransfer::InitAicpuInfo(const ge::OpDescPtr &op_desc, const domi::FftsPlusAicpuCtxDef &ctx_def, | 893 | ge::Status FftsPlusProtoTransfer::InitAicpuInfo(const ge::OpDescPtr &op_desc, const domi::FftsPlusAicpuCtxDef &ctx_def, |
| 894 | void *&addr) const { | 894 | void *&addr) const { |
| 895 | if (ctx_def.kernel_type() == kCustomAicpuKernelType) { | 895 | if (ctx_def.kernel_type() == kCustomAicpuKernelType) { |
| 896 | - GELOGE(ge::FAILED, "Not support custom aicpu op."); | 896 | + GELOGE(ge::FAILED, "Does not support custom aicpu op."); |
| 897 | // load custom aicpu so need move to other position | 897 | // load custom aicpu so need move to other position |
| 898 | return ge::FAILED; | 898 | return ge::FAILED; |
| 899 | } | 899 | } |
| @@ -30,7 +30,7 @@ LowerResult LoweringCmoNode(const ge::NodePtr &node, const LowerInput &lower_inp | |||
| 30 | 30 | ||
| 31 | // update inner_len && src | 31 | // update inner_len && src |
| 32 | LOWER_REQUIRE(!lower_input.input_addrs.empty(), "Input addrs is empty for node [%s].", node->GetNamePtr()); | 32 | LOWER_REQUIRE(!lower_input.input_addrs.empty(), "Input addrs is empty for node [%s].", node->GetNamePtr()); |
| 33 | - LOWER_REQUIRE(!lower_input.input_shapes.empty(), "Input shapes is empty for node [%s].", node->GetNamePtr()); | 33 | + LOWER_REQUIRE(!lower_input.input_shapes.empty(), "Input shapes are empty for node [%s].", node->GetNamePtr()); |
| 34 | ge::DataType dt = node->GetOpDescBarePtr()->GetInputDesc(0U).GetDataType(); | 34 | ge::DataType dt = node->GetOpDescBarePtr()->GetInputDesc(0U).GetDataType(); |
| 35 | auto dt_holder = bg::ValueHolder::CreateConst(&dt, sizeof(ge::DataType)); | 35 | auto dt_holder = bg::ValueHolder::CreateConst(&dt, sizeof(ge::DataType)); |
| 36 | 36 | ||
| @@ -269,7 +269,8 @@ std::vector<ValueHolderPtr> InferStorageShape(const ge::NodePtr &node, const std | |||
| 269 | global_data); | 269 | global_data); |
| 270 | } | 270 | } |
| 271 | // To compatible with old version infer_fun, build different exe graph for infershape | 271 | // To compatible with old version infer_fun, build different exe graph for infershape |
| 272 | - GELOGW("Node %s type %s not support v2 infershape. Turns to v1 infershape.", node->GetName().c_str(), type.c_str()); | 272 | + GELOGW("Node %s type %s does not support v2 infershape. Turns to v1 infershape.", node->GetName().c_str(), |
| 273 | + type.c_str()); | ||
| 273 | return BuildCompatibleInferShapeGraph(node, input_shapes, global_data); | 274 | return BuildCompatibleInferShapeGraph(node, input_shapes, global_data); |
| 274 | } | 275 | } |
| 275 | 276 | ||
| @@ -160,7 +160,7 @@ ShapeRangeInferenceResult InferShapeRange(const ge::NodePtr &node, const std::ve | |||
| 160 | std::vector<ValueHolderPtr> infer_shape_range_ret; | 160 | std::vector<ValueHolderPtr> infer_shape_range_ret; |
| 161 | if (NeedInferShapeRangeCompatible(type, global_data.GetSpaceRegistryV2(static_cast<gert::OppImplVersionTag>( | 161 | if (NeedInferShapeRangeCompatible(type, global_data.GetSpaceRegistryV2(static_cast<gert::OppImplVersionTag>( |
| 162 | node->GetOpDesc()->GetOppImplVersion())))) { | 162 | node->GetOpDesc()->GetOppImplVersion())))) { |
| 163 | - GELOGD("Node %s type %s not support v2 infer_shape_range. Turns to v1 infer_shape_range.", node->GetNamePtr(), | 163 | + GELOGD("Node %s type %s does not support v2 infer_shape_range. Turns to v1 infer_shape_range.", node->GetNamePtr(), |
| 164 | type.c_str()); | 164 | type.c_str()); |
| 165 | infer_shape_range_ret = BuildCompatibleInferShapeRangeGraph(node, ranges); | 165 | infer_shape_range_ret = BuildCompatibleInferShapeRangeGraph(node, ranges); |
| 166 | } else { | 166 | } else { |
| @@ -581,7 +581,7 @@ ge::Status GetArgsFormatForTilingData(const ge::NodePtr &node, std::string &args | |||
| 581 | args_format_str = ctx_def.mix_aic_aiv_ctx().args_format(); | 581 | args_format_str = ctx_def.mix_aic_aiv_ctx().args_format(); |
| 582 | } | 582 | } |
| 583 | } else if (op_desc->GetType() == ge::PARTITIONEDCALL) { | 583 | } else if (op_desc->GetType() == ge::PARTITIONEDCALL) { |
| 584 | - GELOGW("Node[%s] ffts task not support", node->GetNamePtr()); | 584 | + GELOGW("Node[%s] ffts task is not supported", node->GetNamePtr()); |
| 585 | return ge::UNSUPPORTED; | 585 | return ge::UNSUPPORTED; |
| 586 | } else { | 586 | } else { |
| 587 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICore); | 587 | const domi::TaskDef *task_def = GetTaskDef(node, compile_result, TaskDefType::kAICore); |
| @@ -102,7 +102,7 @@ ge::graphStatus CollectAllEventInfos(const ge::ComputeGraphPtr &compute_graph, i | |||
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | GE_ASSERT_TRUE(event_ids.size() == static_cast<size_t>(event_num), | 104 | GE_ASSERT_TRUE(event_ids.size() == static_cast<size_t>(event_num), |
| 105 | - "EvenId in nodes is not equal with event num %lld on model.", event_num); | 105 | + "EvenId in nodes are not equal with event num %lld on model.", event_num); |
| 106 | for (size_t i = 0U; i < event_infos.size(); ++i) { | 106 | for (size_t i = 0U; i < event_infos.size(); ++i) { |
| 107 | GE_ASSERT_TRUE(event_infos[i].HasInitialized(), "Found event %zu no in pair.", i); | 107 | GE_ASSERT_TRUE(event_infos[i].HasInitialized(), "Found event %zu no in pair.", i); |
| 108 | } | 108 | } |
| @@ -53,7 +53,7 @@ ge::graphStatus ValidateCopyFlowInputNum(const KernelContext *context, const siz | |||
| 53 | GE_ASSERT_TRUE(!ge::MulOverflow(copy_flow_count, kSizeOfCopyToDevice, input_num)); | 53 | GE_ASSERT_TRUE(!ge::MulOverflow(copy_flow_count, kSizeOfCopyToDevice, input_num)); |
| 54 | GE_ASSERT_TRUE(!ge::AddOverflow(input_start, input_num, input_num)); | 54 | GE_ASSERT_TRUE(!ge::AddOverflow(input_start, input_num, input_num)); |
| 55 | if (input_num != context->GetInputNum()) { | 55 | if (input_num != context->GetInputNum()) { |
| 56 | - GELOGE(ge::GRAPH_FAILED, "input num is not matched, input start %zu, copy flow count %zu, total input num %zu", | 56 | + GELOGE(ge::GRAPH_FAILED, "input num does not match, input start %zu, copy flow count %zu, total input num %zu", |
| 57 | input_start, copy_flow_count, context->GetInputNum()); | 57 | input_start, copy_flow_count, context->GetInputNum()); |
| 58 | return ge::GRAPH_FAILED; | 58 | return ge::GRAPH_FAILED; |
| 59 | } | 59 | } |
| @@ -205,9 +205,9 @@ ge::graphStatus PrepareCopyFlowResult(KernelContext *context) { | |||
| 205 | GE_ASSERT_NOTNULL(args); | 205 | GE_ASSERT_NOTNULL(args); |
| 206 | GE_ASSERT_NOTNULL(allocated_addrs); | 206 | GE_ASSERT_NOTNULL(allocated_addrs); |
| 207 | GE_ASSERT_NOTNULL(inputs_index_cvv); | 207 | GE_ASSERT_NOTNULL(inputs_index_cvv); |
| 208 | - GE_ASSERT_TRUE(allocated_addrs->GetSize() == output_num, "allocated addr num %zu is not match output num %zu", | 208 | + GE_ASSERT_TRUE(allocated_addrs->GetSize() == output_num, "allocated addr num %zu does not match output num %zu", |
| 209 | allocated_addrs->GetSize(), output_num); | 209 | allocated_addrs->GetSize(), output_num); |
| 210 | - GE_ASSERT_TRUE(inputs_index_cvv->GetSize() == output_num, "input index num %zu is not match output num %zu", | 210 | + GE_ASSERT_TRUE(inputs_index_cvv->GetSize() == output_num, "input index num %zu does not match output num %zu", |
| 211 | inputs_index_cvv->GetSize(), output_num); | 211 | inputs_index_cvv->GetSize(), output_num); |
| 212 | GE_ASSERT_SUCCESS(args->UpdateMergedCopyInfo()); | 212 | GE_ASSERT_SUCCESS(args->UpdateMergedCopyInfo()); |
| 213 | 213 | ||
| @@ -272,7 +272,7 @@ ge::graphStatus LaunchCopyFlowH2D(KernelContext *context) { | |||
| 272 | auto allocated_addrs = context->GetInputPointer<TypedContinuousVector<GertTensorData *>>( | 272 | auto allocated_addrs = context->GetInputPointer<TypedContinuousVector<GertTensorData *>>( |
| 273 | static_cast<size_t>(LaunchCopyFlowH2DInputs::kAllocatedAddrs)); | 273 | static_cast<size_t>(LaunchCopyFlowH2DInputs::kAllocatedAddrs)); |
| 274 | GE_ASSERT_NOTNULL(allocated_addrs); | 274 | GE_ASSERT_NOTNULL(allocated_addrs); |
| 275 | - GE_ASSERT_TRUE(allocated_addrs->GetSize() == *input_num, "allocated addr num %zu is not match input num %zu", | 275 | + GE_ASSERT_TRUE(allocated_addrs->GetSize() == *input_num, "allocated addr num %zu does not match input num %zu", |
| 276 | allocated_addrs->GetSize(), *input_num); | 276 | allocated_addrs->GetSize(), *input_num); |
| 277 | auto allocated_data = allocated_addrs->GetData(); | 277 | auto allocated_data = allocated_addrs->GetData(); |
| 278 | GE_ASSERT_NOTNULL(allocated_data); | 278 | GE_ASSERT_NOTNULL(allocated_data); |
| @@ -319,7 +319,7 @@ ge::graphStatus CopyFlowLaunch(KernelContext *context) { | |||
| 319 | auto output_num = context->GetOutputNum(); | 319 | auto output_num = context->GetOutputNum(); |
| 320 | if (static_cast<size_t>(CopyFlowLaunchInputs::kAddrAndLengthStart) + (output_num * kSizeOfCopyToDevice) != | 320 | if (static_cast<size_t>(CopyFlowLaunchInputs::kAddrAndLengthStart) + (output_num * kSizeOfCopyToDevice) != |
| 321 | context->GetInputNum()) { | 321 | context->GetInputNum()) { |
| 322 | - GELOGE(ge::GRAPH_FAILED, "input num is not matched, input start %zu, output num %zu, total input num %zu", | 322 | + GELOGE(ge::GRAPH_FAILED, "input num does not match, input start %zu, output num %zu, total input num %zu", |
| 323 | static_cast<size_t>(CopyFlowLaunchInputs::kAddrAndLengthStart), output_num, context->GetInputNum()); | 323 | static_cast<size_t>(CopyFlowLaunchInputs::kAddrAndLengthStart), output_num, context->GetInputNum()); |
| 324 | return ge::GRAPH_FAILED; | 324 | return ge::GRAPH_FAILED; |
| 325 | } | 325 | } |
| @@ -87,7 +87,7 @@ ge::graphStatus UpdateOutputShapeToContext(const ge::OpDescPtr &op_desc, KernelC | |||
| 87 | auto output_num = context->GetOutputNum(); | 87 | auto output_num = context->GetOutputNum(); |
| 88 | auto output_num_on_op = op_desc->GetOutputsSize(); | 88 | auto output_num_on_op = op_desc->GetOutputsSize(); |
| 89 | if (output_num_on_op != output_num) { | 89 | if (output_num_on_op != output_num) { |
| 90 | - GELOGE(ge::PARAM_INVALID, "Output num on op %s is %zu, output num on context is %zu, not match.", | 90 | + GELOGE(ge::PARAM_INVALID, "Output num on op %s is %zu, output num on context is %zu, does not match.", |
| 91 | op_desc->GetName().c_str(), output_num_on_op, output_num); | 91 | op_desc->GetName().c_str(), output_num_on_op, output_num); |
| 92 | return ge::PARAM_INVALID; | 92 | return ge::PARAM_INVALID; |
| 93 | } | 93 | } |
| @@ -112,7 +112,7 @@ ge::graphStatus UpdateInputShapeRangeToOpDesc(KernelContext *context, ge::OpDesc | |||
| 112 | auto input_shapes_num = context->GetInputNum() - other_inputs_size; | 112 | auto input_shapes_num = context->GetInputNum() - other_inputs_size; |
| 113 | auto input_num_on_op = op_desc->GetInputsSize(); | 113 | auto input_num_on_op = op_desc->GetInputsSize(); |
| 114 | if (input_num_on_op != input_shapes_num) { | 114 | if (input_num_on_op != input_shapes_num) { |
| 115 | - GELOGE(ge::PARAM_INVALID, "Input num on op %s is %zu, input num on context is %zu, not match.", | 115 | + GELOGE(ge::PARAM_INVALID, "Input num on op %s is %zu, input num on context is %zu, does not match.", |
| 116 | op_desc->GetName().c_str(), input_num_on_op, input_shapes_num); | 116 | op_desc->GetName().c_str(), input_num_on_op, input_shapes_num); |
| 117 | return ge::PARAM_INVALID; | 117 | return ge::PARAM_INVALID; |
| 118 | } | 118 | } |
| @@ -145,7 +145,7 @@ ge::graphStatus UpdateOutputShapeRangeToContext(const ge::OpDescPtr &op_desc, Ke | |||
| 145 | GE_ASSERT_TRUE( | 145 | GE_ASSERT_TRUE( |
| 146 | !ge::MulOverflow(static_cast<size_t>(op_desc->GetOutputsSize()), kShapeRangeOutputOfNode, size_of_output)); | 146 | !ge::MulOverflow(static_cast<size_t>(op_desc->GetOutputsSize()), kShapeRangeOutputOfNode, size_of_output)); |
| 147 | if (size_of_output != output_num) { | 147 | if (size_of_output != output_num) { |
| 148 | - GELOGE(ge::PARAM_INVALID, "Output num on op %s is %zu, output num on context is %zu, not match.", | 148 | + GELOGE(ge::PARAM_INVALID, "Output num on op %s is %zu, output num on context is %zu, does not match.", |
| 149 | op_desc->GetName().c_str(), size_of_output, output_num); | 149 | op_desc->GetName().c_str(), size_of_output, output_num); |
| 150 | return ge::PARAM_INVALID; | 150 | return ge::PARAM_INVALID; |
| 151 | } | 151 | } |
| @@ -35,8 +35,8 @@ ge::graphStatus GetIONumOfOp(const TilingContext *const context, ge::Operator &o | |||
| 35 | if (input_num_on_op != input_num) { | 35 | if (input_num_on_op != input_num) { |
| 36 | ge::AscendString op_name; | 36 | ge::AscendString op_name; |
| 37 | (void)op.GetName(op_name); | 37 | (void)op.GetName(op_name); |
| 38 | - GELOGE(ge::PARAM_INVALID, "Input num on op %s is %zu, input num on context is %zu, not match.", op_name.GetString(), | 38 | + GELOGE(ge::PARAM_INVALID, "Input num on op %s is %zu, input num on context is %zu, does not match.", |
| 39 | - input_num_on_op, input_num); | 39 | + op_name.GetString(), input_num_on_op, input_num); |
| 40 | return ge::PARAM_INVALID; | 40 | return ge::PARAM_INVALID; |
| 41 | } | 41 | } |
| 42 | auto compute_node_info = context->GetComputeNodeInfo(); | 42 | auto compute_node_info = context->GetComputeNodeInfo(); |
| @@ -46,7 +46,7 @@ ge::graphStatus GetIONumOfOp(const TilingContext *const context, ge::Operator &o | |||
| 46 | if (output_num_on_op != output_num) { | 46 | if (output_num_on_op != output_num) { |
| 47 | ge::AscendString op_name; | 47 | ge::AscendString op_name; |
| 48 | (void)op.GetName(op_name); | 48 | (void)op.GetName(op_name); |
| 49 | - GELOGE(ge::PARAM_INVALID, "Output num on op %s is %zu, output num on context is %zu, not match.", | 49 | + GELOGE(ge::PARAM_INVALID, "Output num on op %s is %zu, output num on context is %zu, does not match.", |
| 50 | op_name.GetString(), output_num_on_op, output_num); | 50 | op_name.GetString(), output_num_on_op, output_num); |
| 51 | return ge::PARAM_INVALID; | 51 | return ge::PARAM_INVALID; |
| 52 | } | 52 | } |
| @@ -138,7 +138,7 @@ ge::graphStatus FindCompatibleTilingFunc(KernelContext *context) { | |||
| 138 | GE_ASSERT_NOTNULL(tiling_fun_ptr); | 138 | GE_ASSERT_NOTNULL(tiling_fun_ptr); |
| 139 | *tiling_fun_ptr = *(tiling_func_info.GetOpTilingFuncV3().target<TilingFuncV3>()); | 139 | *tiling_fun_ptr = *(tiling_func_info.GetOpTilingFuncV3().target<TilingFuncV3>()); |
| 140 | } else { | 140 | } else { |
| 141 | - GELOGE(ge::GRAPH_FAILED, "Node %s not support v3 or v4 tiling.", node_type); | 141 | + GELOGE(ge::GRAPH_FAILED, "Node %s does not support v3 or v4 tiling.", node_type); |
| 142 | return ge::GRAPH_FAILED; | 142 | return ge::GRAPH_FAILED; |
| 143 | } | 143 | } |
| 144 | return ge::GRAPH_SUCCESS; | 144 | return ge::GRAPH_SUCCESS; |
| @@ -221,7 +221,7 @@ ge::graphStatus CompatibleTilingParse(KernelContext *context) { | |||
| 221 | } else if (tiling_version == static_cast<uint64_t>(TilingVersion::kV3)) { | 221 | } else if (tiling_version == static_cast<uint64_t>(TilingVersion::kV3)) { |
| 222 | return TilingParseV3(context, *op, compile_info_key, compile_info_json); | 222 | return TilingParseV3(context, *op, compile_info_key, compile_info_json); |
| 223 | } else { | 223 | } else { |
| 224 | - GELOGE(ge::GRAPH_FAILED, "Failed to tiling parse, not support v3 or v4."); | 224 | + GELOGE(ge::GRAPH_FAILED, "Failed to tiling parse, does not support v3 or v4."); |
| 225 | return ge::GRAPH_FAILED; | 225 | return ge::GRAPH_FAILED; |
| 226 | } | 226 | } |
| 227 | return ge::GRAPH_SUCCESS; | 227 | return ge::GRAPH_SUCCESS; |
| @@ -352,7 +352,7 @@ ge::graphStatus InnerCompatibleTiling(KernelContext *context, ge::graphStatus &t | |||
| 352 | } else if (tiling_version == static_cast<uint64_t>(TilingVersion::kV3)) { | 352 | } else if (tiling_version == static_cast<uint64_t>(TilingVersion::kV3)) { |
| 353 | tiling_func_result = TilingV3(context, *op, *tiling_fwk_data, op_run_info); | 353 | tiling_func_result = TilingV3(context, *op, *tiling_fwk_data, op_run_info); |
| 354 | } else { | 354 | } else { |
| 355 | - GELOGE(ge::GRAPH_FAILED, "Failed to tiling parse, not support v3 or v4."); | 355 | + GELOGE(ge::GRAPH_FAILED, "Failed to tiling parse, does not support v3 or v4."); |
| 356 | return ge::GRAPH_FAILED; | 356 | return ge::GRAPH_FAILED; |
| 357 | } | 357 | } |
| 358 | optiling::RecoveryEmptyShapeOfTensorDesc(op_desc, indexes); | 358 | optiling::RecoveryEmptyShapeOfTensorDesc(op_desc, indexes); |
| @@ -136,7 +136,7 @@ ge::graphStatus InnerCompatibleTilingLegacy(KernelContext *context, ge::graphSta | |||
| 136 | } else if (tiling_version == static_cast<uint64_t>(TilingVersion::kV3)) { | 136 | } else if (tiling_version == static_cast<uint64_t>(TilingVersion::kV3)) { |
| 137 | tiling_func_result = TilingV3Legacy(context, *op, op_run_info); | 137 | tiling_func_result = TilingV3Legacy(context, *op, op_run_info); |
| 138 | } else { | 138 | } else { |
| 139 | - GELOGE(ge::GRAPH_FAILED, "Failed to tiling parse, not support v3 or v4."); | 139 | + GELOGE(ge::GRAPH_FAILED, "Failed to tiling parse, does not support v3 or v4."); |
| 140 | return ge::GRAPH_FAILED; | 140 | return ge::GRAPH_FAILED; |
| 141 | } | 141 | } |
| 142 | optiling::RecoveryEmptyShapeOfTensorDesc(op_desc, indexes); | 142 | optiling::RecoveryEmptyShapeOfTensorDesc(op_desc, indexes); |
| @@ -51,7 +51,7 @@ ge::graphStatus GertTensorData::WanderFrom(const GertTensorData &other, int64_t | |||
| 51 | } | 51 | } |
| 52 | if (NeedFree()) { | 52 | if (NeedFree()) { |
| 53 | GE_ASSERT_TRUE(dst_stream_id == GetStreamId(), | 53 | GE_ASSERT_TRUE(dst_stream_id == GetStreamId(), |
| 54 | - "Failed to wandering tensor data %p, the dst data need free, but stream not match %" PRId64 | 54 | + "Failed to wandering tensor data %p, the dst data need free, but stream does not match %" PRId64 |
| 55 | ", %" PRId64, | 55 | ", %" PRId64, |
| 56 | other.GetAddr(), dst_stream_id, GetStreamId()); | 56 | other.GetAddr(), dst_stream_id, GetStreamId()); |
| 57 | } | 57 | } |
| @@ -233,7 +233,7 @@ ge::graphStatus ExeGraphSerializer::SerializeComputeNodeInfo(const std::vector<g | |||
| 233 | space_registry->GetOpImpl(compute_node->GetOpDescBarePtr()->GetType().c_str()) != nullptr) { | 233 | space_registry->GetOpImpl(compute_node->GetOpDescBarePtr()->GetType().c_str()) != nullptr) { |
| 234 | private_attrs = space_registry->GetOpImpl(compute_node->GetOpDescBarePtr()->GetType().c_str())->private_attrs; | 234 | private_attrs = space_registry->GetOpImpl(compute_node->GetOpDescBarePtr()->GetType().c_str())->private_attrs; |
| 235 | } else { | 235 | } else { |
| 236 | - GELOGW("Space registry is null. Private attrs is set empty."); | 236 | + GELOGW("Space registry is null. Private attrs are set empty."); |
| 237 | } | 237 | } |
| 238 | // todo 临时方案:解决const weight在host侧内存占用太大的问题 | 238 | // todo 临时方案:解决const weight在host侧内存占用太大的问题 |
| 239 | // 当前实现:const的weight value在序列化compute node info时会新申请内存,因为value属性是const的ir属性会做序列化, | 239 | // 当前实现:const的weight value在序列化compute node info时会新申请内存,因为value属性是const的ir属性会做序列化, |
| @@ -304,13 +304,13 @@ std::vector<bg::DevMemValueHolderPtr> StaticModelOutputAllocator::AllocAllOutput | |||
| 304 | } | 304 | } |
| 305 | } | 305 | } |
| 306 | if (mem_base_types_offsets.empty()) { | 306 | if (mem_base_types_offsets.empty()) { |
| 307 | - GELOGI("ref outputs is empty"); | 307 | + GELOGI("ref outputs are empty"); |
| 308 | return {}; | 308 | return {}; |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | auto ref_output_addr_holders = GetRefOutputsAddress(mem_base_types_offsets); | 311 | auto ref_output_addr_holders = GetRefOutputsAddress(mem_base_types_offsets); |
| 312 | if (ref_output_addr_holders.size() != mem_base_types_offsets.size()) { | 312 | if (ref_output_addr_holders.size() != mem_base_types_offsets.size()) { |
| 313 | - GELOGE(ge::FAILED, "size not match! ref_output_addr_holders size is %zu, mem_base_types_offsets size is %zu", | 313 | + GELOGE(ge::FAILED, "size does not match! ref_output_addr_holders size is %zu, mem_base_types_offsets size is %zu", |
| 314 | ref_output_addr_holders.size(), mem_base_types_offsets.size()); | 314 | ref_output_addr_holders.size(), mem_base_types_offsets.size()); |
| 315 | return {}; | 315 | return {}; |
| 316 | } | 316 | } |
| @@ -360,7 +360,7 @@ std::vector<bg::DevMemValueHolderPtr> StaticModelOutputAllocator::AllocAllOutput | |||
| 360 | const auto size_holders = GetNoReuseOutputsSize(output_reuse_infos); | 360 | const auto size_holders = GetNoReuseOutputsSize(output_reuse_infos); |
| 361 | auto alloc_mem_holders = bg::AllocMemoriesWithoutGuarder(kOnDeviceHbm, size_holders, global_data, bg::kMainStream); | 361 | auto alloc_mem_holders = bg::AllocMemoriesWithoutGuarder(kOnDeviceHbm, size_holders, global_data, bg::kMainStream); |
| 362 | if (alloc_mem_holders.size() != size_holders.size()) { | 362 | if (alloc_mem_holders.size() != size_holders.size()) { |
| 363 | - GELOGE(ge::FAILED, "size not match! alloc_mem_holders size is %zu, size_holders size is %zu", | 363 | + GELOGE(ge::FAILED, "size does not match! alloc_mem_holders size is %zu, size_holders size is %zu", |
| 364 | alloc_mem_holders.size(), size_holders.size()); | 364 | alloc_mem_holders.size(), size_holders.size()); |
| 365 | return {}; | 365 | return {}; |
| 366 | } | 366 | } |
| @@ -3953,7 +3953,7 @@ TEST_F(SymbolicShapeComputeST, test_select_inputs_invalid) { | |||
| 3953 | ASSERT_NE(select_node, nullptr); | 3953 | ASSERT_NE(select_node, nullptr); |
| 3954 | SymbolicShapeInference ssi; | 3954 | SymbolicShapeInference ssi; |
| 3955 | ssi.Infer(cg); | 3955 | ssi.Infer(cg); |
| 3956 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, inputs symbol value is empty."), -1); | 3956 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, inputs symbol value is empty."), -1); |
| 3957 | stub.GetSlogStub().Clear(); | 3957 | stub.GetSlogStub().Clear(); |
| 3958 | } | 3958 | } |
| 3959 | 3959 | ||
| @@ -3982,7 +3982,7 @@ TEST_F(SymbolicShapeComputeST, test_select_shape_invalid) { | |||
| 3982 | ASSERT_NE(select_node, nullptr); | 3982 | ASSERT_NE(select_node, nullptr); |
| 3983 | SymbolicShapeInference ssi; | 3983 | SymbolicShapeInference ssi; |
| 3984 | ssi.Infer(cg); | 3984 | ssi.Infer(cg); |
| 3985 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, check inputs shape failed,"), -1); | 3985 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, check inputs shape failed,"), -1); |
| 3986 | stub.GetSlogStub().Clear(); | 3986 | stub.GetSlogStub().Clear(); |
| 3987 | } | 3987 | } |
| 3988 | 3988 | ||
| @@ -4012,7 +4012,7 @@ TEST_F(SymbolicShapeComputeST, test_select_broadcast_failed1) { | |||
| 4012 | SymbolicShapeInference ssi; | 4012 | SymbolicShapeInference ssi; |
| 4013 | ssi.Infer(cg); | 4013 | ssi.Infer(cg); |
| 4014 | 4014 | ||
| 4015 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, broadcast failed."), -1); | 4015 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, broadcast failed."), -1); |
| 4016 | stub.GetSlogStub().Clear(); | 4016 | stub.GetSlogStub().Clear(); |
| 4017 | } | 4017 | } |
| 4018 | 4018 | ||
| @@ -4042,7 +4042,7 @@ TEST_F(SymbolicShapeComputeST, test_select_broadcast_failed2) { | |||
| 4042 | SymbolicShapeInference ssi; | 4042 | SymbolicShapeInference ssi; |
| 4043 | ssi.Infer(cg); | 4043 | ssi.Infer(cg); |
| 4044 | 4044 | ||
| 4045 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, broadcast failed."), -1); | 4045 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, broadcast failed."), -1); |
| 4046 | stub.GetSlogStub().Clear(); | 4046 | stub.GetSlogStub().Clear(); |
| 4047 | } | 4047 | } |
| 4048 | 4048 | ||
| @@ -145,7 +145,7 @@ TEST_F(UtestNormalNodeMatcher, EnableIrAttr_SingleAttr_ListIntAttr_IrNameNumMiss | |||
| 145 | NormalNodeMatcher matcher(true); | 145 | NormalNodeMatcher matcher(true); |
| 146 | 146 | ||
| 147 | EXPECT_FALSE(matcher.IsMatch(NodeAdapter::GNode2Node(compress_tensor_miss->GetProducer()), target_node)); | 147 | EXPECT_FALSE(matcher.IsMatch(NodeAdapter::GNode2Node(compress_tensor_miss->GetProducer()), target_node)); |
| 148 | - EXPECT_TRUE(ut::WarnLogContain(runtime_stub_, "Ir attr num is not match")); | 148 | + EXPECT_TRUE(ut::WarnLogContain(runtime_stub_, "Ir attr num does not match")); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | // compress找不到ir, ir recover自动返回成功了 | 151 | // compress找不到ir, ir recover自动返回成功了 |
| @@ -170,7 +170,7 @@ TEST_F(UtestNormalNodeMatcher, EnableIrAttr_SingleAttr_ListIntAttr_IrNameWrongMi | |||
| 170 | NormalNodeMatcher matcher(true); | 170 | NormalNodeMatcher matcher(true); |
| 171 | EXPECT_FALSE(matcher.IsMatch(NodeAdapter::GNode2Node(compress_tensor_miss->GetProducer()), | 171 | EXPECT_FALSE(matcher.IsMatch(NodeAdapter::GNode2Node(compress_tensor_miss->GetProducer()), |
| 172 | NodeAdapter::GNode2Node(compress_tensor_target->GetProducer()))); | 172 | NodeAdapter::GNode2Node(compress_tensor_target->GetProducer()))); |
| 173 | - EXPECT_TRUE(ut::WarnLogContain(runtime_stub_, "Ir attr names is not match")); | 173 | + EXPECT_TRUE(ut::WarnLogContain(runtime_stub_, "Ir attr names do not match")); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | // compress找不到ir, ir recover自动返回成功了 | 176 | // compress找不到ir, ir recover自动返回成功了 |
| @@ -3993,7 +3993,7 @@ TEST_F(SymbolicShapeComputeUT, test_select_inputs_invalid) { | |||
| 3993 | ASSERT_NE(select_node, nullptr); | 3993 | ASSERT_NE(select_node, nullptr); |
| 3994 | SymbolicShapeInference ssi; | 3994 | SymbolicShapeInference ssi; |
| 3995 | ssi.Infer(cg); | 3995 | ssi.Infer(cg); |
| 3996 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, inputs symbol value is empty."), -1); | 3996 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, inputs symbol value is empty."), -1); |
| 3997 | stub.GetSlogStub().Clear(); | 3997 | stub.GetSlogStub().Clear(); |
| 3998 | } | 3998 | } |
| 3999 | 3999 | ||
| @@ -4022,7 +4022,7 @@ TEST_F(SymbolicShapeComputeUT, test_select_shape_invalid) { | |||
| 4022 | ASSERT_NE(select_node, nullptr); | 4022 | ASSERT_NE(select_node, nullptr); |
| 4023 | SymbolicShapeInference ssi; | 4023 | SymbolicShapeInference ssi; |
| 4024 | ssi.Infer(cg); | 4024 | ssi.Infer(cg); |
| 4025 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, check inputs shape failed,"), -1); | 4025 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, check inputs shape failed,"), -1); |
| 4026 | stub.GetSlogStub().Clear(); | 4026 | stub.GetSlogStub().Clear(); |
| 4027 | } | 4027 | } |
| 4028 | 4028 | ||
| @@ -4052,7 +4052,7 @@ TEST_F(SymbolicShapeComputeUT, test_select_broadcast_failed1) { | |||
| 4052 | SymbolicShapeInference ssi; | 4052 | SymbolicShapeInference ssi; |
| 4053 | ssi.Infer(cg); | 4053 | ssi.Infer(cg); |
| 4054 | 4054 | ||
| 4055 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, broadcast failed."), -1); | 4055 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, broadcast failed."), -1); |
| 4056 | stub.GetSlogStub().Clear(); | 4056 | stub.GetSlogStub().Clear(); |
| 4057 | } | 4057 | } |
| 4058 | 4058 | ||
| @@ -4082,7 +4082,7 @@ TEST_F(SymbolicShapeComputeUT, test_select_broadcast_failed2) { | |||
| 4082 | SymbolicShapeInference ssi; | 4082 | SymbolicShapeInference ssi; |
| 4083 | ssi.Infer(cg); | 4083 | ssi.Infer(cg); |
| 4084 | 4084 | ||
| 4085 | - ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select not support, broadcast failed."), -1); | 4085 | + ASSERT_NE(stub.GetSlogStub().FindLog(DLOG_WARN, "Select is not supported, broadcast failed."), -1); |
| 4086 | stub.GetSlogStub().Clear(); | 4086 | stub.GetSlogStub().Clear(); |
| 4087 | } | 4087 | } |
| 4088 | 4088 | ||
| @@ -18,8 +18,24 @@ import unittest | |||
| 18 | from typing import Optional | 18 | from typing import Optional |
| 19 | 19 | ||
| 20 | import numpy as np | 20 | import numpy as np |
| 21 | -from llm_datadist_v1 import * | 21 | +from llm_datadist_v1 import ( |
| 22 | + CacheDesc, | ||
| 23 | + CacheKey, | ||
| 24 | + CacheKeyByIdAndIndex, | ||
| 25 | + DataType, | ||
| 26 | + LayerSynchronizer, | ||
| 27 | + LLMClusterInfo, | ||
| 28 | + LLMConfig, | ||
| 29 | + LLMDataDist, | ||
| 30 | + LLMException, | ||
| 31 | + LLMRole, | ||
| 32 | + LLMStatusCode, | ||
| 33 | + Tensor, | ||
| 34 | + TensorDesc, | ||
| 35 | + TransferConfig, | ||
| 36 | +) | ||
| 22 | from llm_datadist_v1.config import EngineConfig | 37 | from llm_datadist_v1.config import EngineConfig |
| 38 | +from llm_datadist_v1.data_type import get_python_dtype_from_wrapper_dtype | ||
| 23 | from llm_datadist_v1.llm_datadist import _shutdown_handler | 39 | from llm_datadist_v1.llm_datadist import _shutdown_handler |
| 24 | from llm_datadist_v1.llm_types import BlocksCacheKey, KvCache, Placement | 40 | from llm_datadist_v1.llm_types import BlocksCacheKey, KvCache, Placement |
| 25 | from llm_datadist_v1.llm_utils import TransferCacheJob, TransferCacheParameters | 41 | from llm_datadist_v1.llm_utils import TransferCacheJob, TransferCacheParameters |
| @@ -33,7 +49,9 @@ class LayerSynchronizerImpl(LayerSynchronizer): | |||
| 33 | def __init__(self, ret=True): | 49 | def __init__(self, ret=True): |
| 34 | self._ret = ret | 50 | self._ret = ret |
| 35 | 51 | ||
| 36 | - def synchronize_layer(self, layer_index: int, timeout_in_millis: Optional[int]) -> bool: | 52 | + def synchronize_layer( |
| 53 | + self, layer_index: int, timeout_in_millis: Optional[int] | ||
| 54 | + ) -> bool: | ||
| 37 | if layer_index == 0: | 55 | if layer_index == 0: |
| 38 | time.sleep(0.3) | 56 | time.sleep(0.3) |
| 39 | return self._ret | 57 | return self._ret |
| @@ -43,7 +61,9 @@ class MockTransferCacheJob(TransferCacheJob): | |||
| 43 | def __init__(self, params: TransferCacheParameters) -> None: | 61 | def __init__(self, params: TransferCacheParameters) -> None: |
| 44 | super().__init__(params, LayerSynchronizerImpl(True), None) | 62 | super().__init__(params, LayerSynchronizerImpl(True), None) |
| 45 | 63 | ||
| 46 | - def transfer_layer(self, src_layer_index: int, dst_layer_idx, transfer_config: TransferConfig) -> LLMStatusCode: | 64 | + def transfer_layer( |
| 65 | + self, src_layer_index: int, dst_layer_idx, transfer_config: TransferConfig | ||
| 66 | + ) -> LLMStatusCode: | ||
| 47 | return LLMStatusCode.LLM_WAIT_PROCESS_TIMEOUT | 67 | return LLMStatusCode.LLM_WAIT_PROCESS_TIMEOUT |
| 48 | 68 | ||
| 49 | 69 | ||
| @@ -58,7 +78,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 58 | print("End ", self._testMethodName) | 78 | print("End ", self._testMethodName) |
| 59 | 79 | ||
| 60 | 80 | ||
| 61 | - def _engine_options(is_prompt: bool, cluster_id: int = 0, rank_id: int = -1, resource_path: str = ""): | 81 | + def _engine_options( |
| 82 | + is_prompt: bool, cluster_id: int = 0, rank_id: int = -1, resource_path: str = "" | ||
| 83 | + ): | ||
| 62 | cluster_info = { | 84 | cluster_info = { |
| 63 | "cluster_id": cluster_id, | 85 | "cluster_id": cluster_id, |
| 64 | "logic_device_id": ["0:0:0:0", "0:0:1:0", "0:0:2:0", "0:0:3:0"], | 86 | "logic_device_id": ["0:0:0:0", "0:0:1:0", "0:0:2:0", "0:0:3:0"], |
| @@ -110,7 +132,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 110 | print(f"kv_cache: {kv_cache}") | 132 | print(f"kv_cache: {kv_cache}") |
| 111 | with self.assertRaises(LLMException): | 133 | with self.assertRaises(LLMException): |
| 112 | kv_cache_manager.pull_cache(cache_key, dst_kv_cache, 0, -2) | 134 | kv_cache_manager.pull_cache(cache_key, dst_kv_cache, 0, -2) |
| 113 | - kv_cache_manager.pull_cache(cache_key, dst_kv_cache, src_cache_offset=0, dst_cache_offset=0) | 135 | + kv_cache_manager.pull_cache( |
| 136 | + cache_key, dst_kv_cache, src_cache_offset=0, dst_cache_offset=0 | ||
| 137 | + ) | ||
| 114 | cache_key_id = CacheKeyByIdAndIndex(cluster_id, kv_cache.cache_id, 0) | 138 | cache_key_id = CacheKeyByIdAndIndex(cluster_id, kv_cache.cache_id, 0) |
| 115 | kv_cache_manager.pull_cache(cache_key_id, dst_kv_cache, 0) | 139 | kv_cache_manager.pull_cache(cache_key_id, dst_kv_cache, 0) |
| 116 | kv_cache_manager.copy_cache(dst_kv_cache, kv_cache) | 140 | kv_cache_manager.copy_cache(dst_kv_cache, kv_cache) |
| @@ -210,7 +234,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 210 | llm_config.device_id = 0 | 234 | llm_config.device_id = 0 |
| 211 | llm_config.enable_switch_role = True | 235 | llm_config.enable_switch_role = True |
| 212 | options = llm_config.generate_options() | 236 | options = llm_config.generate_options() |
| 213 | - os.environ["RESOURCE_CONFIG_PATH"] = _TEST_BASE_DIR + "/json_file/numa_config.json" | 237 | + os.environ["RESOURCE_CONFIG_PATH"] = ( |
| 238 | + _TEST_BASE_DIR + "/json_file/numa_config.json" | ||
| 239 | + ) | ||
| 214 | engine.init(options) | 240 | engine.init(options) |
| 215 | engine.switch_role(LLMRole.DECODER) | 241 | engine.switch_role(LLMRole.DECODER) |
| 216 | switch_options = { | 242 | switch_options = { |
| @@ -245,7 +271,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 245 | data_type=DataType.DT_FLOAT16, | 271 | data_type=DataType.DT_FLOAT16, |
| 246 | placement=Placement.HOST, | 272 | placement=Placement.HOST, |
| 247 | ) | 273 | ) |
| 248 | - return KvCache.create_cpu_cache(cpu_cache_desc, cache.per_device_tensor_addrs[0]), cache | 274 | + return KvCache.create_cpu_cache( |
| 275 | + cpu_cache_desc, cache.per_device_tensor_addrs[0] | ||
| 276 | + ), cache | ||
| 249 | 277 | ||
| 250 | def test_swap_blocks(self): | 278 | def test_swap_blocks(self): |
| 251 | cluster_id = 0 | 279 | cluster_id = 0 |
| @@ -259,8 +287,12 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 259 | 287 | ||
| 260 | kv_cache_manager = llm_engine.kv_cache_manager | 288 | kv_cache_manager = llm_engine.kv_cache_manager |
| 261 | # allocate npu cache | 289 | # allocate npu cache |
| 262 | - npu_cache, npu_cache_key = self._allocate_npu_cache(kv_cache_manager, 64 * 1024, 10, 10) | 290 | + npu_cache, npu_cache_key = self._allocate_npu_cache( |
| 263 | - cpu_cache, tmp_cache = self._allocate_cpu_cache(kv_cache_manager, 64 * 1024, 20, 10) | 291 | + kv_cache_manager, 64 * 1024, 10, 10 |
| 292 | + ) | ||
| 293 | + cpu_cache, tmp_cache = self._allocate_cpu_cache( | ||
| 294 | + kv_cache_manager, 64 * 1024, 20, 10 | ||
| 295 | + ) | ||
| 264 | src_to_dst = {3: 4, 0: 0, 1: 1, 2: 2, 5: 6, 6: 7, 7: 8, 9: 9} | 296 | src_to_dst = {3: 4, 0: 0, 1: 1, 2: 2, 5: 6, 6: 7, 7: 8, 9: 9} |
| 265 | kv_cache_manager.swap_blocks(npu_cache, cpu_cache, src_to_dst) | 297 | kv_cache_manager.swap_blocks(npu_cache, cpu_cache, src_to_dst) |
| 266 | kv_cache_manager.swap_blocks(cpu_cache, npu_cache, src_to_dst) | 298 | kv_cache_manager.swap_blocks(cpu_cache, npu_cache, src_to_dst) |
| @@ -323,7 +355,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 323 | print(transfer_config_1) | 355 | print(transfer_config_1) |
| 324 | transfer_config_2 = TransferConfig(2, dst_addrs_2, range(2, 4)) | 356 | transfer_config_2 = TransferConfig(2, dst_addrs_2, range(2, 4)) |
| 325 | transfer_configs = (transfer_config_1, transfer_config_2) | 357 | transfer_configs = (transfer_config_1, transfer_config_2) |
| 326 | - cache_task = kv_cache_manager.transfer_cache_async(kv_cache, LayerSynchronizerImpl(True), transfer_configs) | 358 | + cache_task = kv_cache_manager.transfer_cache_async( |
| 359 | + kv_cache, LayerSynchronizerImpl(True), transfer_configs | ||
| 360 | + ) | ||
| 327 | ret = cache_task.synchronize(0) | 361 | ret = cache_task.synchronize(0) |
| 328 | self.assertEqual(ret, LLMStatusCode.LLM_WAIT_PROCESS_TIMEOUT) | 362 | self.assertEqual(ret, LLMStatusCode.LLM_WAIT_PROCESS_TIMEOUT) |
| 329 | rets = cache_task.get_results(0) | 363 | rets = cache_task.get_results(0) |
| @@ -335,7 +369,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 335 | self.assertEqual(rets[1], LLMStatusCode.LLM_SUCCESS) | 369 | self.assertEqual(rets[1], LLMStatusCode.LLM_SUCCESS) |
| 336 | 370 | ||
| 337 | transfer_config_3 = TransferConfig(2, dst_addrs_1 + dst_addrs_2) | 371 | transfer_config_3 = TransferConfig(2, dst_addrs_1 + dst_addrs_2) |
| 338 | - cache_task = kv_cache_manager.transfer_cache_async(kv_cache, LayerSynchronizerImpl(True), [transfer_config_3]) | 372 | + cache_task = kv_cache_manager.transfer_cache_async( |
| 373 | + kv_cache, LayerSynchronizerImpl(True), [transfer_config_3] | ||
| 374 | + ) | ||
| 339 | ret = cache_task.synchronize() | 375 | ret = cache_task.synchronize() |
| 340 | self.assertEqual(ret, LLMStatusCode.LLM_SUCCESS) | 376 | self.assertEqual(ret, LLMStatusCode.LLM_SUCCESS) |
| 341 | 377 | ||
| @@ -362,7 +398,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 362 | transfer_config_1 = TransferConfig(1, dst_addrs_1, range(0, 3)) | 398 | transfer_config_1 = TransferConfig(1, dst_addrs_1, range(0, 3)) |
| 363 | transfer_config_2 = TransferConfig(2, dst_addrs_2, range(2, 4)) | 399 | transfer_config_2 = TransferConfig(2, dst_addrs_2, range(2, 4)) |
| 364 | transfer_configs = (transfer_config_1, transfer_config_2) | 400 | transfer_configs = (transfer_config_1, transfer_config_2) |
| 365 | - cache_task = kv_cache_manager.transfer_cache_async(kv_cache, LayerSynchronizerImpl(False), transfer_configs) | 401 | + cache_task = kv_cache_manager.transfer_cache_async( |
| 402 | + kv_cache, LayerSynchronizerImpl(False), transfer_configs | ||
| 403 | + ) | ||
| 366 | ret = cache_task.synchronize() | 404 | ret = cache_task.synchronize() |
| 367 | rets = cache_task.get_results() | 405 | rets = cache_task.get_results() |
| 368 | self.assertNotEqual(ret, LLMStatusCode.LLM_SUCCESS) | 406 | self.assertNotEqual(ret, LLMStatusCode.LLM_SUCCESS) |
| @@ -378,7 +416,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 378 | self.assertEqual(job.get_results()[1], None) | 416 | self.assertEqual(job.get_results()[1], None) |
| 379 | 417 | ||
| 380 | src_block_indices = [1, 2] | 418 | src_block_indices = [1, 2] |
| 381 | - with self.assertRaisesRegex(LLMException, "transfer from blocks to cache is not supported"): | 419 | + with self.assertRaisesRegex( |
| 420 | + LLMException, "transfer from blocks to cache is not supported" | ||
| 421 | + ): | ||
| 382 | _ = kv_cache_manager.transfer_cache_async( | 422 | _ = kv_cache_manager.transfer_cache_async( |
| 383 | kv_cache, | 423 | kv_cache, |
| 384 | LayerSynchronizerImpl(False), | 424 | LayerSynchronizerImpl(False), |
| @@ -427,9 +467,13 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 427 | -1, | 467 | -1, |
| 428 | ) | 468 | ) |
| 429 | with self.assertRaises(TypeError): | 469 | with self.assertRaises(TypeError): |
| 430 | - _ = kv_cache_manager.transfer_cache_async("cache", LayerSynchronizerImpl(False), transfer_configs) | 470 | + _ = kv_cache_manager.transfer_cache_async( |
| 471 | + "cache", LayerSynchronizerImpl(False), transfer_configs | ||
| 472 | + ) | ||
| 431 | with self.assertRaises(TypeError): | 473 | with self.assertRaises(TypeError): |
| 432 | - _ = kv_cache_manager.transfer_cache_async(None, LayerSynchronizerImpl(False), transfer_configs) | 474 | + _ = kv_cache_manager.transfer_cache_async( |
| 475 | + None, LayerSynchronizerImpl(False), transfer_configs | ||
| 476 | + ) | ||
| 433 | kv_cache_manager.deallocate_cache(kv_cache) | 477 | kv_cache_manager.deallocate_cache(kv_cache) |
| 434 | kv_cache_manager.remove_cache_key(cache_key) | 478 | kv_cache_manager.remove_cache_key(cache_key) |
| 435 | engine.finalize() | 479 | engine.finalize() |
| @@ -551,3 +595,9 @@ class LlmEngineV2St(unittest.TestCase): | |||
| 551 | except LLMException: | 595 | except LLMException: |
| 552 | has_err = True | 596 | has_err = True |
| 553 | self.assertEqual(has_err, False) | 597 | self.assertEqual(has_err, False) |
| 598 | + | ||
| 599 | + def test_get_python_dtype_invalid(self): | ||
| 600 | + with self.assertRaises(ValueError): | ||
| 601 | + get_python_dtype_from_wrapper_dtype(-1) | ||
| 602 | + with self.assertRaises(ValueError): | ||
| 603 | + get_python_dtype_from_wrapper_dtype(999) | ||
| @@ -15,7 +15,8 @@ import json | |||
| 15 | import os | 15 | import os |
| 16 | import unittest | 16 | import unittest |
| 17 | 17 | ||
| 18 | -from llm_datadist_v1 import * | 18 | +from llm_datadist_v1 import LLMConfig, LLMDataDist, LLMException, LLMRole |
| 19 | +from llm_datadist_v1.data_type import get_python_dtype_from_wrapper_dtype | ||
| 19 | from llm_datadist_v1.llm_datadist import _shutdown_handler | 20 | from llm_datadist_v1.llm_datadist import _shutdown_handler |
| 20 | 21 | ||
| 21 | _INVALID_ID = 2**64 - 1 | 22 | _INVALID_ID = 2**64 - 1 |
| @@ -34,7 +35,9 @@ class LlmEngineV2Ut(unittest.TestCase): | |||
| 34 | print("End ", self._testMethodName) | 35 | print("End ", self._testMethodName) |
| 35 | 36 | ||
| 36 | 37 | ||
| 37 | - def _engine_options(is_prompt: bool, cluster_id: int = 0, rank_id: int = -1, resource_path: str = ""): | 38 | + def _engine_options( |
| 39 | + is_prompt: bool, cluster_id: int = 0, rank_id: int = -1, resource_path: str = "" | ||
| 40 | + ): | ||
| 38 | cluster_info = { | 41 | cluster_info = { |
| 39 | "cluster_id": cluster_id, | 42 | "cluster_id": cluster_id, |
| 40 | "logic_device_id": ["0:0:0:0", "0:0:1:0", "0:0:2:0", "0:0:3:0"], | 43 | "logic_device_id": ["0:0:0:0", "0:0:1:0", "0:0:2:0", "0:0:3:0"], |
| @@ -95,3 +98,9 @@ class LlmEngineV2Ut(unittest.TestCase): | |||
| 95 | except LLMException: | 98 | except LLMException: |
| 96 | has_err = True | 99 | has_err = True |
| 97 | self.assertEqual(has_err, False) | 100 | self.assertEqual(has_err, False) |
| 101 | + | ||
| 102 | + def test_get_python_dtype_invalid(self): | ||
| 103 | + with self.assertRaises(ValueError): | ||
| 104 | + get_python_dtype_from_wrapper_dtype(-1) | ||
| 105 | + with self.assertRaises(ValueError): | ||
| 106 | + get_python_dtype_from_wrapper_dtype(999) | ||