已合并
fix: 日志规范性整改 #9059
duxinlei创建于 8月24日
fix: 日志规范性整改 #9059
已合并
共 48 个文件变更+135-114
| @@ -203,7 +203,9 @@ ge::graphStatus SwigluGroupGradArch35Tiling::ParseOptionalInputs() | |||
| 203 | OP_CHECK_IF(yOriginShape.GetDimNum() < 1, OP_LOGE(tilingContext->GetNodeName(), "y_origin must be at least 1D"), | 203 | OP_CHECK_IF(yOriginShape.GetDimNum() < 1, OP_LOGE(tilingContext->GetNodeName(), "y_origin must be at least 1D"), |
| 204 | return ge::GRAPH_FAILED); | 204 | return ge::GRAPH_FAILED); |
| 205 | OP_CHECK_IF(yOriginShape.GetDim(yOriginShape.GetDimNum() - 1) != hiddenSize_, | 205 | OP_CHECK_IF(yOriginShape.GetDim(yOriginShape.GetDimNum() - 1) != hiddenSize_, |
| 206 | - OP_LOGE(tilingContext->GetNodeName(), "y_origin H mismatch"), return ge::GRAPH_FAILED); | 206 | + OP_LOGE(tilingContext->GetNodeName(), "y_origin.shape[-1]=%ld must equal H=%ld", |
| 207 | + yOriginShape.GetDim(yOriginShape.GetDimNum() - 1), hiddenSize_), | ||
| 208 | + return ge::GRAPH_FAILED); | ||
| 207 | int64_t yOriginTotalRows = 1; | 209 | int64_t yOriginTotalRows = 1; |
| 208 | for (size_t i = 0; i < yOriginShape.GetDimNum() - 1; ++i) { | 210 | for (size_t i = 0; i < yOriginShape.GetDimNum() - 1; ++i) { |
| 209 | yOriginTotalRows *= yOriginShape.GetDim(i); | 211 | yOriginTotalRows *= yOriginShape.GetDim(i); |
| @@ -217,7 +219,9 @@ ge::graphStatus SwigluGroupGradArch35Tiling::ParseOptionalInputs() | |||
| 217 | if (isGroupIndex_ == 1) { | 219 | if (isGroupIndex_ == 1) { |
| 218 | const gert::Shape& groupIndexShape = groupIndexStorageShape->GetStorageShape(); | 220 | const gert::Shape& groupIndexShape = groupIndexStorageShape->GetStorageShape(); |
| 219 | OP_CHECK_IF(groupIndexShape.GetDimNum() != 1 || groupIndexShape.GetDim(0) < 1, | 221 | OP_CHECK_IF(groupIndexShape.GetDimNum() != 1 || groupIndexShape.GetDim(0) < 1, |
| 220 | - OP_LOGE(tilingContext->GetNodeName(), "group_index must be a non-empty 1D tensor"), | 222 | + OP_LOGE(tilingContext->GetNodeName(), |
| 223 | + "group_index must be a non-empty 1D tensor, got dimNum=%ld, dim[0]=%ld", | ||
| 224 | + groupIndexShape.GetDimNum(), groupIndexShape.GetDim(0)), | ||
| 221 | return ge::GRAPH_FAILED); | 225 | return ge::GRAPH_FAILED); |
| 222 | groupIndexG_ = groupIndexShape.GetDim(0); | 226 | groupIndexG_ = groupIndexShape.GetDim(0); |
| 223 | } | 227 | } |
| @@ -160,7 +160,9 @@ static ge::graphStatus ParseOptionalInputs(gert::TilingContext* context, SwigluG | |||
| 160 | OP_CHECK_IF(yOriginShape->GetDimNum() < 1, OP_LOGE(context->GetNodeName(), "y_origin must be at least 1D"), | 160 | OP_CHECK_IF(yOriginShape->GetDimNum() < 1, OP_LOGE(context->GetNodeName(), "y_origin must be at least 1D"), |
| 161 | return ge::GRAPH_FAILED); | 161 | return ge::GRAPH_FAILED); |
| 162 | OP_CHECK_IF(yOriginShape->GetDim(yOriginShape->GetDimNum() - 1) != inputData.H, | 162 | OP_CHECK_IF(yOriginShape->GetDim(yOriginShape->GetDimNum() - 1) != inputData.H, |
| 163 | - OP_LOGE(context->GetNodeName(), "y_origin H mismatch"), return ge::GRAPH_FAILED); | 163 | + OP_LOGE(context->GetNodeName(), "y_origin.shape[-1]=%ld must equal H=%ld", |
| 164 | + yOriginShape->GetDim(yOriginShape->GetDimNum() - 1), inputData.H), | ||
| 165 | + return ge::GRAPH_FAILED); | ||
| 164 | int64_t yOriginTotalRows = 1; | 166 | int64_t yOriginTotalRows = 1; |
| 165 | for (size_t i = 0; i < yOriginShape->GetDimNum() - 1; ++i) { | 167 | for (size_t i = 0; i < yOriginShape->GetDimNum() - 1; ++i) { |
| 166 | yOriginTotalRows *= yOriginShape->GetDim(i); | 168 | yOriginTotalRows *= yOriginShape->GetDim(i); |
| @@ -114,7 +114,7 @@ static bool CheckDimension(const aclTensor* out, const aclTensor* indices) | |||
| 114 | size_t indicesDimNum = indicesShape.GetDimNum(); | 114 | size_t indicesDimNum = indicesShape.GetDimNum(); |
| 115 | for (size_t i = 0; i < indicesDimNum; i++) { | 115 | for (size_t i = 0; i < indicesDimNum; i++) { |
| 116 | if (outShape.GetDim(i) != indicesShape.GetDim(i)) { | 116 | if (outShape.GetDim(i) != indicesShape.GetDim(i)) { |
| 117 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "out shape [%s] is not match with indices shape [%s].", | 117 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "out shape [%s] does not match indices shape [%s].", |
| 118 | op::ToString(out->GetViewShape()).GetString(), op::ToString(indices->GetViewShape()).GetString()); | 118 | op::ToString(out->GetViewShape()).GetString(), op::ToString(indices->GetViewShape()).GetString()); |
| 119 | return false; | 119 | return false; |
| 120 | } | 120 | } |
| @@ -46,20 +46,20 @@ ge::graphStatus EmbeddingNoContiguousTiling::GetPlatformInfo() | |||
| 46 | OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context_, "compile info is null"), return ge::GRAPH_FAILED); | 46 | OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context_, "compile info is null"), return ge::GRAPH_FAILED); |
| 47 | totalCoreNum_ = static_cast<int64_t>(compileInfoPtr->coreNum); | 47 | totalCoreNum_ = static_cast<int64_t>(compileInfoPtr->coreNum); |
| 48 | ubSize_ = static_cast<int64_t>(compileInfoPtr->ubSize); | 48 | ubSize_ = static_cast<int64_t>(compileInfoPtr->ubSize); |
| 49 | - OP_LOGD(opName_, "Get aivNum form compileInfo is: %ld", totalCoreNum_); | 49 | + OP_LOGD(opName_, "Get aivNum from compileInfo is: %ld", totalCoreNum_); |
| 50 | } else { | 50 | } else { |
| 51 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); | 51 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); |
| 52 | totalCoreNum_ = static_cast<int64_t>(ascendcPlatform.GetCoreNumAiv()); | 52 | totalCoreNum_ = static_cast<int64_t>(ascendcPlatform.GetCoreNumAiv()); |
| 53 | uint64_t ubSizePlatForm; | 53 | uint64_t ubSizePlatForm; |
| 54 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatForm); | 54 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatForm); |
| 55 | ubSize_ = static_cast<int64_t>(ubSizePlatForm); | 55 | ubSize_ = static_cast<int64_t>(ubSizePlatForm); |
| 56 | - OP_LOGD(opName_, "Get aivNum form ascendcPlatform is: %ld", totalCoreNum_); | 56 | + OP_LOGD(opName_, "Get aivNum from ascendcPlatform is: %ld", totalCoreNum_); |
| 57 | } | 57 | } |
| 58 | OP_CHECK_IF( | 58 | OP_CHECK_IF( |
| 59 | (totalCoreNum_ <= 0 || ubSize_ <= 0), | 59 | (totalCoreNum_ <= 0 || ubSize_ <= 0), |
| 60 | OP_LOGE( | 60 | OP_LOGE( |
| 61 | opName_, | 61 | opName_, |
| 62 | - "coreNum and ubSize should not be samller than 0, but got coreNum [%ld] and ubSize [%ld], please check.", | 62 | + "coreNum and ubSize should not be smaller than 0, but got coreNum [%ld] and ubSize [%ld], please check.", |
| 63 | totalCoreNum_, ubSize_), | 63 | totalCoreNum_, ubSize_), |
| 64 | return ge::GRAPH_FAILED); | 64 | return ge::GRAPH_FAILED); |
| 65 | return ge::GRAPH_SUCCESS; | 65 | return ge::GRAPH_SUCCESS; |
| @@ -352,4 +352,4 @@ ge::graphStatus EmbeddingNoContiguousTiling::PostTiling() | |||
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | REGISTER_TILING_TEMPLATE("Embedding", EmbeddingNoContiguousTiling, 0); | 354 | REGISTER_TILING_TEMPLATE("Embedding", EmbeddingNoContiguousTiling, 0); |
| 355 | -} // namespace optiling | 355 | +} // namespace optiling |
| @@ -104,16 +104,16 @@ ge::graphStatus EmbeddingTilingBase::GetPlatformInfo() | |||
| 104 | OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context_, "compile info is null"), return ge::GRAPH_FAILED); | 104 | OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context_, "compile info is null"), return ge::GRAPH_FAILED); |
| 105 | aivNum_ = compileInfoPtr->coreNum; | 105 | aivNum_ = compileInfoPtr->coreNum; |
| 106 | ubSize_ = compileInfoPtr->ubSize; | 106 | ubSize_ = compileInfoPtr->ubSize; |
| 107 | - OP_LOGD(opName_, "Get ubSize form compileInfo is: %ld", ubSize_); | 107 | + OP_LOGD(opName_, "Get ubSize from compileInfo is: %ld", ubSize_); |
| 108 | - OP_LOGD(opName_, "Get aivNum form compileInfo is: %ld", aivNum_); | 108 | + OP_LOGD(opName_, "Get aivNum from compileInfo is: %ld", aivNum_); |
| 109 | } else { | 109 | } else { |
| 110 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); | 110 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); |
| 111 | aivNum_ = ascendcPlatform.GetCoreNumAiv(); | 111 | aivNum_ = ascendcPlatform.GetCoreNumAiv(); |
| 112 | uint64_t ubSizePlatform; | 112 | uint64_t ubSizePlatform; |
| 113 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatform); | 113 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatform); |
| 114 | ubSize_ = static_cast<int64_t>(ubSizePlatform); | 114 | ubSize_ = static_cast<int64_t>(ubSizePlatform); |
| 115 | - OP_LOGD(opName_, "Get ubSize form ascendcPlatform is: %ld", ubSize_); | 115 | + OP_LOGD(opName_, "Get ubSize from ascendcPlatform is: %ld", ubSize_); |
| 116 | - OP_LOGD(opName_, "Get aivNum form ascendcPlatform is: %ld", aivNum_); | 116 | + OP_LOGD(opName_, "Get aivNum from ascendcPlatform is: %ld", aivNum_); |
| 117 | } | 117 | } |
| 118 | aicoreParams_.blockDim = aivNum_; | 118 | aicoreParams_.blockDim = aivNum_; |
| 119 | return ge::GRAPH_SUCCESS; | 119 | return ge::GRAPH_SUCCESS; |
| @@ -311,4 +311,4 @@ ge::graphStatus EmbeddingTilingBase::PostTiling() | |||
| 311 | } | 311 | } |
| 312 | REGISTER_TILING_TEMPLATE("Embedding", EmbeddingTilingBase, 1); | 312 | REGISTER_TILING_TEMPLATE("Embedding", EmbeddingTilingBase, 1); |
| 313 | 313 | ||
| 314 | -} // namespace optiling | 314 | +} // namespace optiling |
| @@ -23,7 +23,7 @@ const int64_t DIM_TWO = 2; | |||
| 23 | 23 | ||
| 24 | static ge::graphStatus InferShapeForEmbedding(gert::InferShapeContext* context) | 24 | static ge::graphStatus InferShapeForEmbedding(gert::InferShapeContext* context) |
| 25 | { | 25 | { |
| 26 | - OP_LOGD(context->GetNodeName(), "infershape is begin"); | 26 | + OP_LOGD(context->GetNodeName(), "infershape begins"); |
| 27 | auto xShape = context->GetInputShape(INPUT_IDX_X); | 27 | auto xShape = context->GetInputShape(INPUT_IDX_X); |
| 28 | OP_CHECK_NULL_WITH_CONTEXT(context, xShape); | 28 | OP_CHECK_NULL_WITH_CONTEXT(context, xShape); |
| 29 | int64_t xDim = xShape->GetDimNum(); | 29 | int64_t xDim = xShape->GetDimNum(); |
| @@ -50,4 +50,4 @@ static ge::graphStatus InferShapeForEmbedding(gert::InferShapeContext* context) | |||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | IMPL_OP_INFERSHAPE(Embedding).InferShape(InferShapeForEmbedding); | 52 | IMPL_OP_INFERSHAPE(Embedding).InferShape(InferShapeForEmbedding); |
| 53 | -} // namespace ops | 53 | +} // namespace ops |
| @@ -97,7 +97,7 @@ static bool CheckDtypeValid(const aclTensor* weight, const aclTensor* indices, c | |||
| 97 | // 检查indices和offsets的数据类型是否有一个达到了INT32/INT64 | 97 | // 检查indices和offsets的数据类型是否有一个达到了INT32/INT64 |
| 98 | if (!CheckType(indices->GetDataType(), INT_DTYPE_LIST) && !CheckType(offsets->GetDataType(), INT_DTYPE_LIST)) { | 98 | if (!CheckType(indices->GetDataType(), INT_DTYPE_LIST) && !CheckType(offsets->GetDataType(), INT_DTYPE_LIST)) { |
| 99 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, | 99 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 100 | - "indices or offsets must has one dtype in [int32, int64], " | 100 | + "indices or offsets must have one dtype in [int32, int64], " |
| 101 | "but get indices dtype %s, offsets dtype %s.", | 101 | "but get indices dtype %s, offsets dtype %s.", |
| 102 | op::ToString(indices->GetDataType()).GetString(), op::ToString(offsets->GetDataType()).GetString()); | 102 | op::ToString(indices->GetDataType()).GetString(), op::ToString(offsets->GetDataType()).GetString()); |
| 103 | return false; | 103 | return false; |
| @@ -105,7 +105,7 @@ static bool CheckDtypeValid(const aclTensor* weight, const aclTensor* indices, c | |||
| 105 | 105 | ||
| 106 | // 检查perSampleWeights的数据类型是否与weight相同 | 106 | // 检查perSampleWeights的数据类型是否与weight相同 |
| 107 | if (perSampleWeights != nullptr && weight->GetDataType() != perSampleWeights->GetDataType()) { | 107 | if (perSampleWeights != nullptr && weight->GetDataType() != perSampleWeights->GetDataType()) { |
| 108 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "perSampleWeights dtype %s should be in same with weight dtype %s.", | 108 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "perSampleWeights dtype %s should be the same as weight dtype %s.", |
| 109 | op::ToString(perSampleWeights->GetDataType()).GetString(), | 109 | op::ToString(perSampleWeights->GetDataType()).GetString(), |
| 110 | op::ToString(weight->GetDataType()).GetString()); | 110 | op::ToString(weight->GetDataType()).GetString()); |
| 111 | return false; | 111 | return false; |
| @@ -113,7 +113,7 @@ static bool CheckDtypeValid(const aclTensor* weight, const aclTensor* indices, c | |||
| 113 | 113 | ||
| 114 | // 检查weight和output的数据类型一致 | 114 | // 检查weight和output的数据类型一致 |
| 115 | if (weight->GetDataType() != output->GetDataType()) { | 115 | if (weight->GetDataType() != output->GetDataType()) { |
| 116 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "output dtype %s should be in same with weight dtype %s.", | 116 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "output dtype %s should be the same as weight dtype %s.", |
| 117 | op::ToString(output->GetDataType()).GetString(), op::ToString(weight->GetDataType()).GetString()); | 117 | op::ToString(output->GetDataType()).GetString(), op::ToString(weight->GetDataType()).GetString()); |
| 118 | return false; | 118 | return false; |
| 119 | } | 119 | } |
| @@ -230,21 +230,21 @@ static bool CheckShape(const aclTensor* weight, const aclTensor* indices, const | |||
| 230 | 230 | ||
| 231 | if (offset2bag->GetViewShape().GetShapeSize() != 0 && | 231 | if (offset2bag->GetViewShape().GetShapeSize() != 0 && |
| 232 | offset2bag->GetViewShape().GetShapeSize() != indices->GetViewShape().GetShapeSize()) { | 232 | offset2bag->GetViewShape().GetShapeSize() != indices->GetViewShape().GetShapeSize()) { |
| 233 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "offset2bag shape size should be %ld,but got %ld.", | 233 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "offset2bag shape size should be %ld, but got %ld.", |
| 234 | indices->GetViewShape().GetShapeSize(), offset2bag->GetViewShape().GetShapeSize()); | 234 | indices->GetViewShape().GetShapeSize(), offset2bag->GetViewShape().GetShapeSize()); |
| 235 | return false; | 235 | return false; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | if (Ops::NN::AclnnUtil::IsRegbase()) { | 238 | if (Ops::NN::AclnnUtil::IsRegbase()) { |
| 239 | if (bagSize->GetViewShape().GetShapeSize() != offsets->GetViewShape().GetDim(0)) { | 239 | if (bagSize->GetViewShape().GetShapeSize() != offsets->GetViewShape().GetDim(0)) { |
| 240 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "bagSize shape size should be %ld,but got %ld.", | 240 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "bagSize shape size should be %ld, but got %ld.", |
| 241 | offsets->GetViewShape().GetShapeSize(), bagSize->GetViewShape().GetShapeSize()); | 241 | offsets->GetViewShape().GetShapeSize(), bagSize->GetViewShape().GetShapeSize()); |
| 242 | return false; | 242 | return false; |
| 243 | } | 243 | } |
| 244 | } else { | 244 | } else { |
| 245 | if (includeLastOffset) { | 245 | if (includeLastOffset) { |
| 246 | if (bagSize->GetViewShape().GetShapeSize() != offsets->GetViewShape().GetDim(0) - 1) { | 246 | if (bagSize->GetViewShape().GetShapeSize() != offsets->GetViewShape().GetDim(0) - 1) { |
| 247 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "bagSize shape size should be %ld,but got %ld.", | 247 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "bagSize shape size should be %ld, but got %ld.", |
| 248 | offsets->GetViewShape().GetShapeSize() - 1, bagSize->GetViewShape().GetShapeSize()); | 248 | offsets->GetViewShape().GetShapeSize() - 1, bagSize->GetViewShape().GetShapeSize()); |
| 249 | return false; | 249 | return false; |
| 250 | } | 250 | } |
| @@ -169,7 +169,8 @@ ge::graphStatus EmbeddingBagTiling::Init() | |||
| 169 | 169 | ||
| 170 | getTilingKeyAndComputeRepTime(weightDatatype, mode); | 170 | getTilingKeyAndComputeRepTime(weightDatatype, mode); |
| 171 | 171 | ||
| 172 | - OP_CHECK_IF((computeRepTime_ <= 0), OP_LOGE(tilingContext_, "computeRepTime less than 0"), | 172 | + OP_CHECK_IF((computeRepTime_ <= 0), |
| 173 | + OP_LOGE(tilingContext_, "computeRepTime [%ld] should be greater than 0", computeRepTime_), | ||
| 173 | return ge::GRAPH_FAILED); | 174 | return ge::GRAPH_FAILED); |
| 174 | 175 | ||
| 175 | size_t sysWorkspaceSize = compileInfo->sysWorkspaceSize; | 176 | size_t sysWorkspaceSize = compileInfo->sysWorkspaceSize; |
| @@ -49,7 +49,7 @@ static ge::graphStatus EmbeddingDenseGradTiling(gert::TilingContext* context) | |||
| 49 | 49 | ||
| 50 | static ge::graphStatus TilingPrepareForEmbeddingDenseGrad(gert::TilingParseContext* context) | 50 | static ge::graphStatus TilingPrepareForEmbeddingDenseGrad(gert::TilingParseContext* context) |
| 51 | { | 51 | { |
| 52 | - OP_LOGD(context->GetNodeName(), "TilingPrepareForEmeddingDenseGrad running."); | 52 | + OP_LOGD(context->GetNodeName(), "TilingPrepareForEmbeddingDenseGrad running."); |
| 53 | auto compile_info = context->GetCompiledInfo<EmbeddingDenseGradCompileInfo>(); | 53 | auto compile_info = context->GetCompiledInfo<EmbeddingDenseGradCompileInfo>(); |
| 54 | OP_CHECK_NULL_WITH_CONTEXT(context, compile_info); | 54 | OP_CHECK_NULL_WITH_CONTEXT(context, compile_info); |
| 55 | 55 | ||
| @@ -394,7 +394,7 @@ static ge::graphStatus TilingUB4Cast(EmbeddingDenseGradACTilingParam& tilingPara | |||
| 394 | return ge::GRAPH_SUCCESS; | 394 | return ge::GRAPH_SUCCESS; |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | - OP_LOGE("EmbeddingDenseGrad", "[Freq] Cal tiling failed, can not find one way to cut UB."); | 397 | + OP_LOGE("EmbeddingDenseGrad", "[Cast] Cal tiling failed, can not find one way to cut UB."); |
| 398 | return ge::GRAPH_FAILED; | 398 | return ge::GRAPH_FAILED; |
| 399 | } | 399 | } |
| 400 | 400 | ||
| @@ -513,7 +513,7 @@ static ge::graphStatus DoOpTiling(const gert::TilingContext* context, EmbeddingD | |||
| 513 | ge::graphStatus Tiling4EmbeddingDenseGradSimd(gert::TilingContext* context, uint32_t maxCoreNum, | 513 | ge::graphStatus Tiling4EmbeddingDenseGradSimd(gert::TilingContext* context, uint32_t maxCoreNum, |
| 514 | uint32_t ubSizePlatform, uint32_t maxThreadNum) | 514 | uint32_t ubSizePlatform, uint32_t maxThreadNum) |
| 515 | { | 515 | { |
| 516 | - OP_LOGD(context->GetNodeName(), "Tiling4EmbeddingDenseGradSimd is begin"); | 516 | + OP_LOGD(context->GetNodeName(), "Tiling4EmbeddingDenseGradSimd begins"); |
| 517 | EmbeddingDenseGradSimdTilingData tiling; | 517 | EmbeddingDenseGradSimdTilingData tiling; |
| 518 | EmbeddingDenseGradACTilingParam tilingParams; | 518 | EmbeddingDenseGradACTilingParam tilingParams; |
| 519 | 519 | ||
| @@ -630,7 +630,7 @@ ge::graphStatus Tiling4EmbeddingDenseGradSimd(gert::TilingContext* context, uint | |||
| 630 | 0; | 630 | 0; |
| 631 | size_t* workspace = context->GetWorkspaceSizes(1); | 631 | size_t* workspace = context->GetWorkspaceSizes(1); |
| 632 | workspace[0] = usrSize + ASCENDC_TOOLS_WORKSPACE; | 632 | workspace[0] = usrSize + ASCENDC_TOOLS_WORKSPACE; |
| 633 | - OP_LOGD(context->GetNodeName(), "Tiling4EmbeddingDenseGradSimd is end"); | 633 | + OP_LOGD(context->GetNodeName(), "Tiling4EmbeddingDenseGradSimd ended"); |
| 634 | return ge::GRAPH_SUCCESS; | 634 | return ge::GRAPH_SUCCESS; |
| 635 | } | 635 | } |
| 636 | } // namespace optiling | 636 | } // namespace optiling |
| @@ -133,7 +133,7 @@ static bool CheckOutShape(const aclTensor* out, const aclTensor* grad, const uin | |||
| 133 | } | 133 | } |
| 134 | if (static_cast<uint64_t>(outShape.GetDim(0)) != numWeights || | 134 | if (static_cast<uint64_t>(outShape.GetDim(0)) != numWeights || |
| 135 | outShape.GetDim(1) != gradShape.GetDim(gradShape.GetDimNum() - 1)) { | 135 | outShape.GetDim(1) != gradShape.GetDim(gradShape.GetDimNum() - 1)) { |
| 136 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "outshape [%s] is not match with infershape {%lu, %ld}.", | 136 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "out shape [%s] does not match infershape {%lu, %ld}.", |
| 137 | op::ToString(out->GetViewShape()).GetString(), numWeights, gradShape.GetDim(gradShape.GetDimNum() - 1)); | 137 | op::ToString(out->GetViewShape()).GetString(), numWeights, gradShape.GetDim(gradShape.GetDimNum() - 1)); |
| 138 | return false; | 138 | return false; |
| 139 | } | 139 | } |
| @@ -91,7 +91,7 @@ const aclTensor* EmbeddingDenseGrad(const aclTensor* grad, const aclTensor* indi | |||
| 91 | auto ret = ADD_TO_LAUNCHER_LIST_AICORE(EmbeddingDenseGrad, OP_INPUT(grad, indices), OP_OUTPUT(out), | 91 | auto ret = ADD_TO_LAUNCHER_LIST_AICORE(EmbeddingDenseGrad, OP_INPUT(grad, indices), OP_OUTPUT(out), |
| 92 | OP_ATTR(numWeights, paddingIdx, scaleGradByFreq)); | 92 | OP_ATTR(numWeights, paddingIdx, scaleGradByFreq)); |
| 93 | OP_CHECK(ret == ACLNN_SUCCESS, | 93 | OP_CHECK(ret == ACLNN_SUCCESS, |
| 94 | - OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "EmbeddingDenseGradAiCcore ADD_TO_LAUNCHER_LIST_AICORE failed."), | 94 | + OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "EmbeddingDenseGradAiCore ADD_TO_LAUNCHER_LIST_AICORE failed."), |
| 95 | return nullptr); | 95 | return nullptr); |
| 96 | return out; | 96 | return out; |
| 97 | } | 97 | } |
| @@ -42,7 +42,7 @@ const aclTensor* AdaptiveAvgPool2d(const aclTensor* self, const aclIntArray* out | |||
| 42 | outShape.SetDim(size + SUB_H, (*outputSize)[0]); | 42 | outShape.SetDim(size + SUB_H, (*outputSize)[0]); |
| 43 | outShape.SetDim(size + SUB_W, (*outputSize)[1]); | 43 | outShape.SetDim(size + SUB_W, (*outputSize)[1]); |
| 44 | } else { | 44 | } else { |
| 45 | - OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "AdaptiveAvgPool2dAiCore only support ascendC950 failed."); | 45 | + OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "AdaptiveAvgPool2dAiCore only support ascendC950."); |
| 46 | } | 46 | } |
| 47 | auto out = executor->AllocTensor(outShape, self->GetDataType(), self->GetStorageFormat()); | 47 | auto out = executor->AllocTensor(outShape, self->GetDataType(), self->GetStorageFormat()); |
| 48 | if (out == nullptr) { | 48 | if (out == nullptr) { |
| @@ -51,4 +51,4 @@ const aclTensor* AdaptiveAvgPool2d(const aclTensor* self, const aclIntArray* out | |||
| 51 | } | 51 | } |
| 52 | return AdaptiveAvgPool2dAiCore(self, outputSize, out, executor); | 52 | return AdaptiveAvgPool2dAiCore(self, outputSize, out, executor); |
| 53 | } | 53 | } |
| 54 | -} // namespace l0op | 54 | +} // namespace l0op |
| @@ -78,13 +78,15 @@ static bool CheckInputDims(const aclTensor* gradOutput, const aclTensor* self, c | |||
| 78 | } | 78 | } |
| 79 | for (size_t i = 0; i < selfDimNum; i++) { | 79 | for (size_t i = 0; i < selfDimNum; i++) { |
| 80 | if (selfShape.GetDim(i) < 0) { | 80 | if (selfShape.GetDim(i) < 0) { |
| 81 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "self'dims is invalid, self No.[%lu] dim is [%d].", i + 1, 0); | 81 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "self'dims is invalid, self No.[%lu] dim is [%ld].", i + 1, |
| 82 | + selfShape.GetDim(i)); | ||
| 82 | return false; | 83 | return false; |
| 83 | } | 84 | } |
| 84 | } | 85 | } |
| 85 | for (size_t i = 0; i < gradOutputDimNum; i++) { | 86 | for (size_t i = 0; i < gradOutputDimNum; i++) { |
| 86 | if (gradOutputShape.GetDim(i) < 0) { | 87 | if (gradOutputShape.GetDim(i) < 0) { |
| 87 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "gradOutput'dims is invalid, self No.[%lu] dim is [%d].", i + 1, 0); | 88 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "gradOutput'dims is invalid, self No.[%lu] dim is [%ld].", i + 1, |
| 89 | + gradOutputShape.GetDim(i)); | ||
| 88 | return false; | 90 | return false; |
| 89 | } | 91 | } |
| 90 | } | 92 | } |
| @@ -168,20 +168,20 @@ ge::graphStatus AdaptiveAvgPool2dGradTilingBase::GetPlatformInfo() | |||
| 168 | OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context_, "compile info is null"), return ge::GRAPH_FAILED); | 168 | OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context_, "compile info is null"), return ge::GRAPH_FAILED); |
| 169 | coreNum_ = static_cast<int64_t>(compileInfoPtr->coreNum); | 169 | coreNum_ = static_cast<int64_t>(compileInfoPtr->coreNum); |
| 170 | ubSize_ = static_cast<int64_t>(compileInfoPtr->ubSize); | 170 | ubSize_ = static_cast<int64_t>(compileInfoPtr->ubSize); |
| 171 | - OP_LOGD(context_->GetNodeName(), "Get aivNum form compileInfo is: %ld, ubSize: %ld", coreNum_, ubSize_); | 171 | + OP_LOGD(context_->GetNodeName(), "Get aivNum from compileInfo is: %ld, ubSize: %ld", coreNum_, ubSize_); |
| 172 | } else { | 172 | } else { |
| 173 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); | 173 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo); |
| 174 | coreNum_ = static_cast<int64_t>(ascendcPlatform.GetCoreNumAiv()); | 174 | coreNum_ = static_cast<int64_t>(ascendcPlatform.GetCoreNumAiv()); |
| 175 | uint64_t ubSizePlatForm; | 175 | uint64_t ubSizePlatForm; |
| 176 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatForm); | 176 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, ubSizePlatForm); |
| 177 | ubSize_ = ubSizePlatForm; | 177 | ubSize_ = ubSizePlatForm; |
| 178 | - OP_LOGD(context_->GetNodeName(), "Get aivNum form ascendcPlatform is: %ld, ubSize: %ld", coreNum_, ubSize_); | 178 | + OP_LOGD(context_->GetNodeName(), "Get aivNum from ascendcPlatform is: %ld, ubSize: %ld", coreNum_, ubSize_); |
| 179 | } | 179 | } |
| 180 | OP_CHECK_IF( | 180 | OP_CHECK_IF( |
| 181 | (coreNum_ <= 0 || ubSize_ <= 0), | 181 | (coreNum_ <= 0 || ubSize_ <= 0), |
| 182 | OP_LOGE( | 182 | OP_LOGE( |
| 183 | context_->GetNodeName(), | 183 | context_->GetNodeName(), |
| 184 | - "coreNum and ubSize should not be samller than 0, but got coreNum [%lu] and ubSize [%lu], please check.", | 184 | + "coreNum and ubSize should not be smaller than 0, but got coreNum [%lu] and ubSize [%lu], please check.", |
| 185 | coreNum_, ubSize_), | 185 | coreNum_, ubSize_), |
| 186 | return ge::GRAPH_FAILED); | 186 | return ge::GRAPH_FAILED); |
| 187 | return ge::GRAPH_SUCCESS; | 187 | return ge::GRAPH_SUCCESS; |
| @@ -267,7 +267,7 @@ static ge::graphStatus Tiling4AdaptiveAvgPool3d(gert::TilingContext* context) | |||
| 267 | auto compileInfo = static_cast<const AdaptiveAvgPool3dCompileInfo*>(context->GetCompileInfo()); | 267 | auto compileInfo = static_cast<const AdaptiveAvgPool3dCompileInfo*>(context->GetCompileInfo()); |
| 268 | 268 | ||
| 269 | const gert::Shape xShape = context->GetInputShape(X_INDEX)->GetStorageShape(); | 269 | const gert::Shape xShape = context->GetInputShape(X_INDEX)->GetStorageShape(); |
| 270 | - OP_CHECK_IF(xShape.GetDimNum() != X_DIMS, OP_LOGE(nodeName, "Check x shape failed, the dims of x not equal 5."), | 270 | + OP_CHECK_IF(xShape.GetDimNum() != X_DIMS, OP_LOGE(nodeName, "Check x shape failed, the dims of x not equal to 5."), |
| 271 | return ge::GRAPH_FAILED); | 271 | return ge::GRAPH_FAILED); |
| 272 | 272 | ||
| 273 | auto dataType = context->GetInputDesc(X_INDEX)->GetDataType(); | 273 | auto dataType = context->GetInputDesc(X_INDEX)->GetDataType(); |
| @@ -281,7 +281,7 @@ static ge::graphStatus Tiling4AdaptiveAvgPool3d(gert::TilingContext* context) | |||
| 281 | auto outputSizePtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(OUTPUT_SIZE_INDEX); | 281 | auto outputSizePtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(OUTPUT_SIZE_INDEX); |
| 282 | OP_CHECK_NULL_WITH_CONTEXT(context, outputSizePtr); | 282 | OP_CHECK_NULL_WITH_CONTEXT(context, outputSizePtr); |
| 283 | OP_CHECK_IF(outputSizePtr->GetSize() != OUTPUT_SIZE_DIMS, | 283 | OP_CHECK_IF(outputSizePtr->GetSize() != OUTPUT_SIZE_DIMS, |
| 284 | - OP_LOGE(nodeName, "Check output_size failed, the size of output_size not equal 3."), | 284 | + OP_LOGE(nodeName, "Check output_size failed, the size of output_size not equal to 3."), |
| 285 | return ge::GRAPH_FAILED); | 285 | return ge::GRAPH_FAILED); |
| 286 | const int64_t* outputSize = static_cast<const int64_t*>(outputSizePtr->GetData()); | 286 | const int64_t* outputSize = static_cast<const int64_t*>(outputSizePtr->GetData()); |
| 287 | OP_CHECK_IF(outputSize[DIM0] <= 0 || outputSize[DIM1] <= 0 || outputSize[DIM2] <= 0, | 287 | OP_CHECK_IF(outputSize[DIM0] <= 0 || outputSize[DIM1] <= 0 || outputSize[DIM2] <= 0, |
| @@ -159,8 +159,7 @@ static bool CheckFormat(const aclTensor* gradOutput, const aclTensor* self, cons | |||
| 159 | } | 159 | } |
| 160 | // 如果输入格式是私有格式,记录日志,直接报错 | 160 | // 如果输入格式是私有格式,记录日志,直接报错 |
| 161 | if (op::IsPrivateFormat(gradOutput->GetStorageFormat())) { | 161 | if (op::IsPrivateFormat(gradOutput->GetStorageFormat())) { |
| 162 | - printf("wyh invalid format\n"); | 162 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NCDHW, ND."); |
| 163 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NCDHW、ND."); | ||
| 164 | return false; | 163 | return false; |
| 165 | } | 164 | } |
| 166 | 165 | ||
| @@ -382,4 +381,4 @@ aclnnStatus aclnnAdaptiveAvgPool3dBackward(void* workspace, uint64_t workspaceSi | |||
| 382 | 381 | ||
| 383 | 382 | ||
| 384 | } | 383 | } |
| 385 | -#endif | 384 | +#endif |
| @@ -117,11 +117,12 @@ ge::graphStatus AdaptiveAvgPool3dGradTiling::Init() | |||
| 117 | } | 117 | } |
| 118 | auto const yGradShape = context->GetInputShape(0)->GetStorageShape(); | 118 | auto const yGradShape = context->GetInputShape(0)->GetStorageShape(); |
| 119 | OP_CHECK_IF(yGradShape.GetDimNum() != Y_GRAD_DIMS, | 119 | OP_CHECK_IF(yGradShape.GetDimNum() != Y_GRAD_DIMS, |
| 120 | - OP_LOGE(nodeName, "Check yGrad shape failed, the dims of yGrad not equal 4."), return ge::GRAPH_FAILED); | 120 | + OP_LOGE(nodeName, "Check yGrad shape failed, the dims of yGrad not equal to 4."), |
| 121 | + return ge::GRAPH_FAILED); | ||
| 121 | 122 | ||
| 122 | auto const xShapeVal = context->GetInputShape(1)->GetStorageShape(); | 123 | auto const xShapeVal = context->GetInputShape(1)->GetStorageShape(); |
| 123 | OP_CHECK_IF((xShapeVal.GetDimNum() != X_DIMS_4 && xShapeVal.GetDimNum() != X_DIMS_5), | 124 | OP_CHECK_IF((xShapeVal.GetDimNum() != X_DIMS_4 && xShapeVal.GetDimNum() != X_DIMS_5), |
| 124 | - OP_LOGE(nodeName, "Check yGrad shape failed, the dims of yGrad not equal 4 or 5."), | 125 | + OP_LOGE(nodeName, "Check yGrad shape failed, the dims of yGrad not equal to 4 or 5."), |
| 125 | return ge::GRAPH_FAILED); | 126 | return ge::GRAPH_FAILED); |
| 126 | 127 | ||
| 127 | auto const yGradDtype = context->GetInputDesc(0)->GetDataType(); | 128 | auto const yGradDtype = context->GetInputDesc(0)->GetDataType(); |
| @@ -52,7 +52,8 @@ static bool CheckFormat(const aclTensor* gradOutput, const aclTensor* self, cons | |||
| 52 | 52 | ||
| 53 | if (op::IsPrivateFormat(self->GetStorageFormat()) || op::IsPrivateFormat(gradInput->GetStorageFormat()) || | 53 | if (op::IsPrivateFormat(self->GetStorageFormat()) || op::IsPrivateFormat(gradInput->GetStorageFormat()) || |
| 54 | op::IsPrivateFormat(gradOutput->GetStorageFormat()) || op::IsPrivateFormat(indices->GetStorageFormat())) { | 54 | op::IsPrivateFormat(gradOutput->GetStorageFormat()) || op::IsPrivateFormat(indices->GetStorageFormat())) { |
| 55 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NCHW or NCL"); | 55 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NCHW or NCL, actual format is [%s].", |
| 56 | + op::ToString(self->GetStorageFormat()).GetString()); | ||
| 56 | return false; | 57 | return false; |
| 57 | } | 58 | } |
| 58 | 59 | ||
| @@ -55,7 +55,8 @@ static bool CheckFormat(const aclTensor* gradOutput, const aclTensor* self, cons | |||
| 55 | 55 | ||
| 56 | if (op::IsPrivateFormat(self->GetStorageFormat()) || op::IsPrivateFormat(gradInput->GetStorageFormat()) || | 56 | if (op::IsPrivateFormat(self->GetStorageFormat()) || op::IsPrivateFormat(gradInput->GetStorageFormat()) || |
| 57 | op::IsPrivateFormat(gradOutput->GetStorageFormat()) || op::IsPrivateFormat(indices->GetStorageFormat())) { | 57 | op::IsPrivateFormat(gradOutput->GetStorageFormat()) || op::IsPrivateFormat(indices->GetStorageFormat())) { |
| 58 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NCDHW or CDHW"); | 58 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NCDHW or CDHW, actual format is [%s].", |
| 59 | + op::ToString(self->GetStorageFormat()).GetString()); | ||
| 59 | return false; | 60 | return false; |
| 60 | } | 61 | } |
| 61 | 62 | ||
| @@ -368,7 +368,7 @@ static bool CheckPaddingValidAvgPool2D(const aclIntArray* kernelSize, const aclI | |||
| 368 | if (kernelW < MULTIPLIER * paddingW) { | 368 | if (kernelW < MULTIPLIER * paddingW) { |
| 369 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, | 369 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 370 | "value of paddingW should be at most half of kernelW. Actual: paddingW is [%ld]," | 370 | "value of paddingW should be at most half of kernelW. Actual: paddingW is [%ld]," |
| 371 | - "kernelW is [%ld].", | 371 | + " kernelW is [%ld].", |
| 372 | paddingW, kernelW); | 372 | paddingW, kernelW); |
| 373 | return false; | 373 | return false; |
| 374 | } | 374 | } |
| @@ -487,7 +487,7 @@ static bool CheckValue(const aclTensor* self, const aclIntArray* kernel, const a | |||
| 487 | 487 | ||
| 488 | for (size_t i = 0; i < padding->Size(); i++) { | 488 | for (size_t i = 0; i < padding->Size(); i++) { |
| 489 | if ((*padding)[i] < 0) { | 489 | if ((*padding)[i] < 0) { |
| 490 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Dim value of padding is negtive."); | 490 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Dim value of padding is negative."); |
| 491 | return false; | 491 | return false; |
| 492 | } | 492 | } |
| 493 | } | 493 | } |
| @@ -497,7 +497,7 @@ static bool CheckValue(const aclTensor* self, const aclIntArray* kernel, const a | |||
| 497 | static bool CheckAvgPool2dCubeMathType(const op::DataType cubeTensorDtype, int8_t cubeMathType) | 497 | static bool CheckAvgPool2dCubeMathType(const op::DataType cubeTensorDtype, int8_t cubeMathType) |
| 498 | { | 498 | { |
| 499 | if (cubeMathType == USE_HF32) { | 499 | if (cubeMathType == USE_HF32) { |
| 500 | - OP_LOGW("The function remains the same as 0(KEEP_DTYPE) when the cubeMathType is 3(USE_HF32)." | 500 | + OP_LOGW("The function remains the same as 0(KEEP_DTYPE) when the cubeMathType is 3(USE_HF32). " |
| 501 | "This configuration is not recommended and will be deprecated in a future release."); | 501 | "This configuration is not recommended and will be deprecated in a future release."); |
| 502 | } | 502 | } |
| 503 | return CheckCubeMathType(cubeTensorDtype, cubeMathType); | 503 | return CheckCubeMathType(cubeTensorDtype, cubeMathType); |
| @@ -130,7 +130,7 @@ static inline int64_t PoolingOutShape(const int64_t inputSize, const int64_t ker | |||
| 130 | static bool CheckAttrValue(const int64_t kernel, const int64_t stride, const int64_t pad, const int64_t input) | 130 | static bool CheckAttrValue(const int64_t kernel, const int64_t stride, const int64_t pad, const int64_t input) |
| 131 | { | 131 | { |
| 132 | if (kernel <= 0 || kernel > input) { | 132 | if (kernel <= 0 || kernel > input) { |
| 133 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "kernel value(%ld) is invaild, must be (0, %ld].", kernel, input); | 133 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "kernel value(%ld) is invalid, must be (0, %ld].", kernel, input); |
| 134 | return false; | 134 | return false; |
| 135 | } | 135 | } |
| 136 | 136 | ||
| @@ -140,7 +140,7 @@ static bool CheckAttrValue(const int64_t kernel, const int64_t stride, const int | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | if (!(pad >= 0 && pad <= kernel / 2)) { // 2: double | 142 | if (!(pad >= 0 && pad <= kernel / 2)) { // 2: double |
| 143 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "padding value(%ld) is invaild, must be [0, kernel/2].", pad); | 143 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "padding value(%ld) is invalid, must be [0, kernel/2].", pad); |
| 144 | return false; | 144 | return false; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| @@ -71,7 +71,7 @@ const aclTensor* Pooling5Hd(const aclTensor* x, const aclTensor* weight, int64_t | |||
| 71 | L0_DFX(Pooling5Hd, x, weight, mode, globalPooling, window, stride, pad, ceilMode, dataFormat); | 71 | L0_DFX(Pooling5Hd, x, weight, mode, globalPooling, window, stride, pad, ceilMode, dataFormat); |
| 72 | 72 | ||
| 73 | if (!IsAiCoreSupport(x)) { | 73 | if (!IsAiCoreSupport(x)) { |
| 74 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "data type not supports."); | 74 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "data type does not support."); |
| 75 | return nullptr; | 75 | return nullptr; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -316,7 +316,7 @@ static void ComputeUBTilingStrategy(TilingParams& params, int32_t& mode) | |||
| 316 | mode = MODE_BIG_KERNEL; | 316 | mode = MODE_BIG_KERNEL; |
| 317 | return; | 317 | return; |
| 318 | } else if (params.dataFormat == "NCDHW") { | 318 | } else if (params.dataFormat == "NCDHW") { |
| 319 | - //走Nornal模板 | 319 | + // 走Nornal模板 |
| 320 | bool isNormal = IsCapbale(params); | 320 | bool isNormal = IsCapbale(params); |
| 321 | if (isNormal) { | 321 | if (isNormal) { |
| 322 | Tilling4NCDHWNormal(params); | 322 | Tilling4NCDHWNormal(params); |
| @@ -548,7 +548,7 @@ static ge::graphStatus Tiling4AvgPool3DVec(gert::TilingContext* context) | |||
| 548 | auto compileInfo = static_cast<const AvgPool3DCubeCompileInfo*>(context->GetCompileInfo()); | 548 | auto compileInfo = static_cast<const AvgPool3DCubeCompileInfo*>(context->GetCompileInfo()); |
| 549 | 549 | ||
| 550 | const gert::Shape xShape = context->GetInputShape(X_INDEX)->GetStorageShape(); | 550 | const gert::Shape xShape = context->GetInputShape(X_INDEX)->GetStorageShape(); |
| 551 | - OP_CHECK_IF(xShape.GetDimNum() != X_DIMS, OP_LOGE(nodeName, "Check x shape failed, the dims of x not equal 5."), | 551 | + OP_CHECK_IF(xShape.GetDimNum() != X_DIMS, OP_LOGE(nodeName, "Check x shape failed, the dims of x not equal to 5."), |
| 552 | return ge::GRAPH_FAILED); | 552 | return ge::GRAPH_FAILED); |
| 553 | 553 | ||
| 554 | auto dataType = context->GetInputDesc(X_INDEX)->GetDataType(); | 554 | auto dataType = context->GetInputDesc(X_INDEX)->GetDataType(); |
| @@ -558,7 +558,7 @@ static ge::graphStatus Tiling4AvgPool3DVec(gert::TilingContext* context) | |||
| 558 | return ge::GRAPH_FAILED); | 558 | return ge::GRAPH_FAILED); |
| 559 | 559 | ||
| 560 | const gert::Shape yShape = context->GetOutputShape(Y_INDEX)->GetStorageShape(); | 560 | const gert::Shape yShape = context->GetOutputShape(Y_INDEX)->GetStorageShape(); |
| 561 | - OP_CHECK_IF(yShape.GetDimNum() != Y_DIMS, OP_LOGE(nodeName, "Check y shape failed, the dims of y not equal 5."), | 561 | + OP_CHECK_IF(yShape.GetDimNum() != Y_DIMS, OP_LOGE(nodeName, "Check y shape failed, the dims of y not equal to 5."), |
| 562 | return ge::GRAPH_FAILED); | 562 | return ge::GRAPH_FAILED); |
| 563 | 563 | ||
| 564 | auto attrPtr = context->GetAttrs(); | 564 | auto attrPtr = context->GetAttrs(); |
| @@ -567,21 +567,22 @@ static ge::graphStatus Tiling4AvgPool3DVec(gert::TilingContext* context) | |||
| 567 | auto ksizePtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(KSIZE_INDEX); | 567 | auto ksizePtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(KSIZE_INDEX); |
| 568 | OP_CHECK_NULL_WITH_CONTEXT(context, ksizePtr); | 568 | OP_CHECK_NULL_WITH_CONTEXT(context, ksizePtr); |
| 569 | OP_CHECK_IF(ksizePtr->GetSize() != 5 && ksizePtr->GetSize() != 3 && ksizePtr->GetSize() != 1, | 569 | OP_CHECK_IF(ksizePtr->GetSize() != 5 && ksizePtr->GetSize() != 3 && ksizePtr->GetSize() != 1, |
| 570 | - OP_LOGE(nodeName, "Check kernel_size failed, the size of kernel_size not equal 5, 3 or 1."), | 570 | + OP_LOGE(nodeName, "Check kernel_size failed, the size of kernel_size not equal to 5, 3 or 1."), |
| 571 | return ge::GRAPH_FAILED); | 571 | return ge::GRAPH_FAILED); |
| 572 | auto ksize = static_cast<const int64_t*>(ksizePtr->GetData()); | 572 | auto ksize = static_cast<const int64_t*>(ksizePtr->GetData()); |
| 573 | 573 | ||
| 574 | auto stridesPtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(STRIDES_INDEX); | 574 | auto stridesPtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(STRIDES_INDEX); |
| 575 | OP_CHECK_NULL_WITH_CONTEXT(context, stridesPtr); | 575 | OP_CHECK_NULL_WITH_CONTEXT(context, stridesPtr); |
| 576 | OP_CHECK_IF(stridesPtr->GetSize() != 5 && stridesPtr->GetSize() != 3 && stridesPtr->GetSize() != 1, | 576 | OP_CHECK_IF(stridesPtr->GetSize() != 5 && stridesPtr->GetSize() != 3 && stridesPtr->GetSize() != 1, |
| 577 | - OP_LOGE(nodeName, "Check stride failed, the size of strides not equal 5, 3 or 1."), | 577 | + OP_LOGE(nodeName, "Check stride failed, the size of strides not equal to 5, 3 or 1."), |
| 578 | return ge::GRAPH_FAILED); | 578 | return ge::GRAPH_FAILED); |
| 579 | auto strides = static_cast<const int64_t*>(stridesPtr->GetData()); | 579 | auto strides = static_cast<const int64_t*>(stridesPtr->GetData()); |
| 580 | 580 | ||
| 581 | auto padsPtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(PADS_INDEX); | 581 | auto padsPtr = attrPtr->GetAttrPointer<gert::ContinuousVector>(PADS_INDEX); |
| 582 | OP_CHECK_NULL_WITH_CONTEXT(context, padsPtr); | 582 | OP_CHECK_NULL_WITH_CONTEXT(context, padsPtr); |
| 583 | OP_CHECK_IF(padsPtr->GetSize() != COMPATIABLE_PAD_DIM && padsPtr->GetSize() != 3 && padsPtr->GetSize() != 1, | 583 | OP_CHECK_IF(padsPtr->GetSize() != COMPATIABLE_PAD_DIM && padsPtr->GetSize() != 3 && padsPtr->GetSize() != 1, |
| 584 | - OP_LOGE(nodeName, "Check pad failed, the size of pad not equal 6, 3 or 1."), return ge::GRAPH_FAILED); | 584 | + OP_LOGE(nodeName, "Check pad failed, the size of pad not equal to 6, 3 or 1."), |
| 585 | + return ge::GRAPH_FAILED); | ||
| 585 | auto pads = static_cast<const int64_t*>(padsPtr->GetData()); | 586 | auto pads = static_cast<const int64_t*>(padsPtr->GetData()); |
| 586 | 587 | ||
| 587 | const bool* ceilMode = attrPtr->GetAttrPointer<bool>(CEIL_MODE_INDEX); | 588 | const bool* ceilMode = attrPtr->GetAttrPointer<bool>(CEIL_MODE_INDEX); |
| @@ -472,7 +472,7 @@ ge::graphStatus CubeTiling(const int64_t* input_shape, size_t intput_shape_dim_n | |||
| 472 | 472 | ||
| 473 | if (tiling_id == kInvalidTilingId) { | 473 | if (tiling_id == kInvalidTilingId) { |
| 474 | if (compile_info.correct_range_flag) { | 474 | if (compile_info.correct_range_flag) { |
| 475 | - OP_LOGE(op_name, "The original range does not meet requirements," | 475 | + OP_LOGE(op_name, "The original range does not meet requirements, " |
| 476 | "new range is generated during op compile, but the shape is not covered by new range"); | 476 | "new range is generated during op compile, but the shape is not covered by new range"); |
| 477 | } | 477 | } |
| 478 | 478 | ||
| @@ -117,7 +117,7 @@ static bool CheckPaddingValidAvgPool2D(const aclIntArray* kernelSize, const aclI | |||
| 117 | if (kernelW < MULTIPLIER * paddingW) { | 117 | if (kernelW < MULTIPLIER * paddingW) { |
| 118 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, | 118 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 119 | "value of paddingW should be at most half of kernelW. Actual: paddingW is [%ld]," | 119 | "value of paddingW should be at most half of kernelW. Actual: paddingW is [%ld]," |
| 120 | - "kernelW is [%ld].", | 120 | + " kernelW is [%ld].", |
| 121 | paddingW, kernelW); | 121 | paddingW, kernelW); |
| 122 | return false; | 122 | return false; |
| 123 | } | 123 | } |
| @@ -427,9 +427,8 @@ static bool CheckCubeMathTypeValid(int8_t cubeMathType) | |||
| 427 | { | 427 | { |
| 428 | if (cubeMathType != KEEP_DTYPE && cubeMathType != ALLOW_FP32_DOWN_PRECISION && cubeMathType != USE_FP16 && | 428 | if (cubeMathType != KEEP_DTYPE && cubeMathType != ALLOW_FP32_DOWN_PRECISION && cubeMathType != USE_FP16 && |
| 429 | cubeMathType != USE_HF32) { | 429 | cubeMathType != USE_HF32) { |
| 430 | - OP_LOGE( | 430 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 431 | - ACLNN_ERR_PARAM_INVALID, | 431 | + "value of cubeMathType is not in [KEEP_DTYPE, ALLOW_FP32_DOWN_PRECISION, USE_FP16, USE_HF32]."); |
| 432 | - "value of cubeMathType cann't be is not in [KEEP_DTYPE, ALLOW_FP32_DOWN_PRECISION, USE_FP16, USE_HF32]."); | ||
| 433 | return false; | 432 | return false; |
| 434 | } | 433 | } |
| 435 | return true; | 434 | return true; |
| @@ -438,7 +437,7 @@ static bool CheckCubeMathTypeValid(int8_t cubeMathType) | |||
| 438 | static bool CheckOutputShape(const aclTensor* self, const aclTensor* gradInput) | 437 | static bool CheckOutputShape(const aclTensor* self, const aclTensor* gradInput) |
| 439 | { | 438 | { |
| 440 | if (self->GetViewShape() != gradInput->GetViewShape()) { | 439 | if (self->GetViewShape() != gradInput->GetViewShape()) { |
| 441 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "out tensor's shape[%s] is not equel with inferOut shape[%s]", | 440 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "out tensor's shape[%s] is not equal to inferOut shape[%s]", |
| 442 | op::ToString(self->GetViewShape()).GetString(), op::ToString(gradInput->GetViewShape()).GetString()); | 441 | op::ToString(self->GetViewShape()).GetString(), op::ToString(gradInput->GetViewShape()).GetString()); |
| 443 | return false; | 442 | return false; |
| 444 | } | 443 | } |
| @@ -197,7 +197,8 @@ static bool CheckFormat(const aclTensor* gradOutput, const aclTensor* out) | |||
| 197 | 197 | ||
| 198 | // 如果输入格式是私有格式,记录日志,直接报错 | 198 | // 如果输入格式是私有格式,记录日志,直接报错 |
| 199 | if (op::IsPrivateFormat(gradOutput->GetStorageFormat())) { | 199 | if (op::IsPrivateFormat(gradOutput->GetStorageFormat())) { |
| 200 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only don't support private format."); | 200 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format does not support private format, actual format is [%s].", |
| 201 | + op::ToString(gradOutput->GetStorageFormat()).GetString()); | ||
| 201 | return false; | 202 | return false; |
| 202 | } | 203 | } |
| 203 | return true; | 204 | return true; |
| @@ -179,10 +179,10 @@ static bool Avg_NeedCubeGoHF32(const DataType cubeTensorPromoteType, int8_t cube | |||
| 179 | 179 | ||
| 180 | if (cubeMathType == USE_HF32) { | 180 | if (cubeMathType == USE_HF32) { |
| 181 | if (cubeTensorPromoteType == DataType::DT_BF16) { | 181 | if (cubeTensorPromoteType == DataType::DT_BF16) { |
| 182 | - OP_LOGW("The cubeMathType cann't be set to USE_HF32 when the dtype is BF16."); | 182 | + OP_LOGW("The cubeMathType cannot be set to USE_HF32 when the dtype is BF16."); |
| 183 | } | 183 | } |
| 184 | if (cubeTensorPromoteType == DataType::DT_FLOAT16) { | 184 | if (cubeTensorPromoteType == DataType::DT_FLOAT16) { |
| 185 | - OP_LOGW("The cubeMathType cann't be set to USE_HF32 when the dtype is FP16."); | 185 | + OP_LOGW("The cubeMathType cannot be set to USE_HF32 when the dtype is FP16."); |
| 186 | } | 186 | } |
| 187 | } | 187 | } |
| 188 | 188 | ||
| @@ -348,7 +348,7 @@ void AvgPoolV2GradCommonNCHWTiling::PrintBaseData() const | |||
| 348 | info << ", baseData.inputNCSize: " << baseData.inputNCSize; | 348 | info << ", baseData.inputNCSize: " << baseData.inputNCSize; |
| 349 | info << ", padTopH: " << inputData.pad[TOP_PAD_INDEX]; | 349 | info << ", padTopH: " << inputData.pad[TOP_PAD_INDEX]; |
| 350 | info << ", padDownH: " << inputData.pad[BOTTOM_PAD_INDEX]; | 350 | info << ", padDownH: " << inputData.pad[BOTTOM_PAD_INDEX]; |
| 351 | - info << ", padLfetW: " << inputData.pad[LEFT_PAD_INDEX]; | 351 | + info << ", padLeftW: " << inputData.pad[LEFT_PAD_INDEX]; |
| 352 | info << ", padRightW: " << inputData.pad[RIGHT_PAD_INDEX]; | 352 | info << ", padRightW: " << inputData.pad[RIGHT_PAD_INDEX]; |
| 353 | info << ", divisorOverride: " << inputData.divisorOverride; | 353 | info << ", divisorOverride: " << inputData.divisorOverride; |
| 354 | 354 | ||
| @@ -444,7 +444,7 @@ ge::graphStatus AvgPoolV2GradCommonNCHWTiling::DoOpTiling() | |||
| 444 | bool bankConfilictGrad = (baseData.wProBatchSize * baseData.inputBytes) % BANK_FACTOR == 0; | 444 | bool bankConfilictGrad = (baseData.wProBatchSize * baseData.inputBytes) % BANK_FACTOR == 0; |
| 445 | bool bankConfilictOut = (baseData.wProBatchSize * inputData.stride[W_DIM] * sizeof(float)) % BANK_FACTOR == 0; | 445 | bool bankConfilictOut = (baseData.wProBatchSize * inputData.stride[W_DIM] * sizeof(float)) % BANK_FACTOR == 0; |
| 446 | OP_CHECK_IF(bankConfilictGrad || bankConfilictOut, | 446 | OP_CHECK_IF(bankConfilictGrad || bankConfilictOut, |
| 447 | - OP_LOGI(context_->GetNodeName(), "nchw template is not capable because of bank Confilict."), | 447 | + OP_LOGI(context_->GetNodeName(), "nchw template is not capable because of bank Conflict."), |
| 448 | return ge::GRAPH_PARAM_INVALID); | 448 | return ge::GRAPH_PARAM_INVALID); |
| 449 | 449 | ||
| 450 | DoBlockTiling(); | 450 | DoBlockTiling(); |
| @@ -60,7 +60,8 @@ inline bool IsConstTensor(const gert::Tensor* inputTensor) | |||
| 60 | 60 | ||
| 61 | inline ge::graphStatus SetAllUnknownDim(const int64_t rank, gert::Shape* output_shape) | 61 | inline ge::graphStatus SetAllUnknownDim(const int64_t rank, gert::Shape* output_shape) |
| 62 | { | 62 | { |
| 63 | - OP_CHECK_IF(output_shape == nullptr, OP_LOGD("SetAllUnknownDim", "the output_shape is nullptr, return unsuccess"), | 63 | + OP_CHECK_IF(output_shape == nullptr, |
| 64 | + OP_LOGD("SetAllUnknownDim", "the output_shape is nullptr, return unsuccessful"), | ||
| 64 | return ge::GRAPH_FAILED); | 65 | return ge::GRAPH_FAILED); |
| 65 | output_shape->SetDimNum(rank); | 66 | output_shape->SetDimNum(rank); |
| 66 | for (int64_t i = 0; i < rank; ++i) { | 67 | for (int64_t i = 0; i < rank; ++i) { |
| @@ -24,7 +24,7 @@ bool MaxPool3DGradNCDHWSmallKernelTiling::IsCapable() | |||
| 24 | { | 24 | { |
| 25 | base->InitializationVars(context_, ubSize_, coreNum_); | 25 | base->InitializationVars(context_, ubSize_, coreNum_); |
| 26 | if (inputData.inputFormat != ge::Format::FORMAT_NCDHW) { | 26 | if (inputData.inputFormat != ge::Format::FORMAT_NCDHW) { |
| 27 | - OP_LOGI("IsCapable", "inputFormat error"); | 27 | + OP_LOGW("IsCapable", "inputFormat invalid"); |
| 28 | return false; | 28 | return false; |
| 29 | } | 29 | } |
| 30 | if (inputData.dDilation != 1 || inputData.hDilation != 1 || inputData.wDilation != 1) { | 30 | if (inputData.dDilation != 1 || inputData.hDilation != 1 || inputData.wDilation != 1) { |
| @@ -45,7 +45,8 @@ static constexpr int64_t UNKNOWN_DIM_VALUE_ = -1LL; | |||
| 45 | 45 | ||
| 46 | inline ge::graphStatus SetAllUnknownDim(const int64_t rank, gert::Shape* output_shape) | 46 | inline ge::graphStatus SetAllUnknownDim(const int64_t rank, gert::Shape* output_shape) |
| 47 | { | 47 | { |
| 48 | - OP_CHECK_IF(output_shape == nullptr, OP_LOGD("SetAllUnknownDim", "the output_shape is nullptr, return unsuccess"), | 48 | + OP_CHECK_IF(output_shape == nullptr, |
| 49 | + OP_LOGD("SetAllUnknownDim", "the output_shape is nullptr, return unsuccessful"), | ||
| 49 | return ge::GRAPH_FAILED); | 50 | return ge::GRAPH_FAILED); |
| 50 | output_shape->SetDimNum(rank); | 51 | output_shape->SetDimNum(rank); |
| 51 | for (int64_t i = 0; i < rank; ++i) { | 52 | for (int64_t i = 0; i < rank; ++i) { |
| @@ -153,7 +154,7 @@ ge::graphStatus InferShapeForMaxPool3DGrad(gert::InferShapeContext* context) | |||
| 153 | OP_CHECK_NULL_WITH_CONTEXT(context, inputXDesc); | 154 | OP_CHECK_NULL_WITH_CONTEXT(context, inputXDesc); |
| 154 | 155 | ||
| 155 | auto ret = CheckAttrInfo(context); | 156 | auto ret = CheckAttrInfo(context); |
| 156 | - OP_CHECK_IF(ret != GRAPH_SUCCESS, OP_LOGD("InferShapeForMaxPool3DGrad", "CheckAttrInfo return unsuccess"), | 157 | + OP_CHECK_IF(ret != GRAPH_SUCCESS, OP_LOGD("InferShapeForMaxPool3DGrad", "CheckAttrInfo return unsuccessful"), |
| 157 | return ge::GRAPH_FAILED); | 158 | return ge::GRAPH_FAILED); |
| 158 | 159 | ||
| 159 | const gert::Shape* xShape = context->GetInputShape(0); | 160 | const gert::Shape* xShape = context->GetInputShape(0); |
| @@ -313,18 +313,21 @@ static bool CheckGradInputAndIndicesShape(const aclTensor* gradOutput, const acl | |||
| 313 | width = is3d ? self->GetViewShape().GetDim(DIM_INX_1) : self->GetViewShape().GetDim(DIM_INX_2); | 313 | width = is3d ? self->GetViewShape().GetDim(DIM_INX_1) : self->GetViewShape().GetDim(DIM_INX_2); |
| 314 | } | 314 | } |
| 315 | OP_CHECK(((nInputPlane != 0) && (height != 0) && (width != 0)), | 315 | OP_CHECK(((nInputPlane != 0) && (height != 0) && (width != 0)), |
| 316 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Expected tensor\ | 316 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 317 | - with optional 0 dim batch size, but got nInputPlane:%ld, height:%ld, width:%ld", | 317 | + "Expected tensor " |
| 318 | + "with optional 0 dim batch size, but got nInputPlane:%ld, height:%ld, width:%ld", | ||
| 318 | nInputPlane, height, width), | 319 | nInputPlane, height, width), |
| 319 | return false); | 320 | return false); |
| 320 | OP_CHECK(padH <= ((kH - 1) * dilationH + 1) / 2, | 321 | OP_CHECK(padH <= ((kH - 1) * dilationH + 1) / 2, |
| 321 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "pad should be at most half of\ | 322 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 322 | - effective kernel size, but got padH=%ld, kH=%ld and dilationH=%ld", | 323 | + "pad should be at most half of " |
| 324 | + "effective kernel size, but got padH=%ld, kH=%ld and dilationH=%ld", | ||
| 323 | padH, kH, dilationH), | 325 | padH, kH, dilationH), |
| 324 | return false); | 326 | return false); |
| 325 | OP_CHECK(padW <= ((kW - 1) * dilationW + 1) / 2, | 327 | OP_CHECK(padW <= ((kW - 1) * dilationW + 1) / 2, |
| 326 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "pad should be at most half of\ | 328 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 327 | - effective kernel size, but got padW=%ld, kW=%ld and dilationW=%ld", | 329 | + "pad should be at most half of " |
| 330 | + "effective kernel size, but got padW=%ld, kW=%ld and dilationW=%ld", | ||
| 328 | padW, kW, dilationW), | 331 | padW, kW, dilationW), |
| 329 | return false); | 332 | return false); |
| 330 | 333 | ||
| @@ -605,13 +608,13 @@ static const aclTensor* OutputProcess(const aclTensor* gradInput, const aclTenso | |||
| 605 | OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "The gradInput TransDataSpecial return nullptr."), return nullptr); | 608 | OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "The gradInput TransDataSpecial return nullptr."), return nullptr); |
| 606 | 609 | ||
| 607 | auto castGradInput = l0op::Cast(gradInputTrans, self->GetDataType(), executor); | 610 | auto castGradInput = l0op::Cast(gradInputTrans, self->GetDataType(), executor); |
| 608 | - OP_CHECK(castGradInput != nullptr, OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "The gradOutput Cast return nullptr."), | 611 | + OP_CHECK(castGradInput != nullptr, OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "The gradInput Cast return nullptr."), |
| 609 | return nullptr); | 612 | return nullptr); |
| 610 | 613 | ||
| 611 | return castGradInput; | 614 | return castGradInput; |
| 612 | } else { | 615 | } else { |
| 613 | auto castGradInput = l0op::Cast(gradInput, self->GetDataType(), executor); | 616 | auto castGradInput = l0op::Cast(gradInput, self->GetDataType(), executor); |
| 614 | - OP_CHECK(castGradInput != nullptr, OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "The gradOutput Cast return nullptr."), | 617 | + OP_CHECK(castGradInput != nullptr, OP_LOGE(ACLNN_ERR_INNER_NULLPTR, "The gradInput Cast return nullptr."), |
| 615 | return nullptr); | 618 | return nullptr); |
| 616 | 619 | ||
| 617 | return castGradInput; | 620 | return castGradInput; |
| @@ -883,8 +886,9 @@ aclnnStatus aclnnMaxPool2dWithMaskBackwardGetWorkspaceSize(const aclTensor* grad | |||
| 883 | OP_CHECK_NULL(self, return ACLNN_ERR_PARAM_NULLPTR); | 886 | OP_CHECK_NULL(self, return ACLNN_ERR_PARAM_NULLPTR); |
| 884 | OP_CHECK_NULL(gradOutput, return ACLNN_ERR_PARAM_NULLPTR); | 887 | OP_CHECK_NULL(gradOutput, return ACLNN_ERR_PARAM_NULLPTR); |
| 885 | OP_CHECK(CheckAttrSize1Or2(kernelSize), | 888 | OP_CHECK(CheckAttrSize1Or2(kernelSize), |
| 886 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "param size must be a single int, or a tuple of two ints.\ | 889 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 887 | - stride can be empty. kernelSize:%zu, stride:%zu, padding:%zu dilation:%zu", | 890 | + "param size must be a single int, or a tuple of two ints. " |
| 891 | + "stride can be empty. kernelSize:%zu, stride:%zu, padding:%zu, dilation:%zu", | ||
| 888 | kernelSize->Size(), stride->Size(), padding->Size(), dilation->Size()), | 892 | kernelSize->Size(), stride->Size(), padding->Size(), dilation->Size()), |
| 889 | return ACLNN_ERR_PARAM_NULLPTR); | 893 | return ACLNN_ERR_PARAM_NULLPTR); |
| 890 | const aclIntArray& kernelRef = *kernelSize; | 894 | const aclIntArray& kernelRef = *kernelSize; |
| @@ -951,4 +955,4 @@ aclnnStatus aclnnMaxPool2dWithIndicesBackward(void* workspace, uint64_t workspac | |||
| 951 | 955 | ||
| 952 | 956 | ||
| 953 | } | 957 | } |
| 954 | -#endif | 958 | +#endif |
| @@ -187,8 +187,9 @@ static bool CheckParamsValid(const aclIntArray* kernelSize, const aclIntArray* s | |||
| 187 | return false); | 187 | return false); |
| 188 | OP_CHECK(((paddingD <= (kernelD / ratioKernelPad)) && (paddingH <= (kernelH / ratioKernelPad)) && | 188 | OP_CHECK(((paddingD <= (kernelD / ratioKernelPad)) && (paddingH <= (kernelH / ratioKernelPad)) && |
| 189 | (paddingW <= (kernelW / ratioKernelPad))), | 189 | (paddingW <= (kernelW / ratioKernelPad))), |
| 190 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "padding should be smaller than or equal to half of kernel size,\ | 190 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 191 | - but got kernelD:%ld, kernelH:%ld, kernelW:%ld, paddingD:%ld, paddingH:%ld, paddingW:%ld", | 191 | + "padding should be smaller than or equal to half of kernel size, " |
| 192 | + "but got kernelD:%ld, kernelH:%ld, kernelW:%ld, paddingD:%ld, paddingH:%ld, paddingW:%ld", | ||
| 192 | kernelD, kernelH, kernelW, paddingD, paddingH, paddingW), | 193 | kernelD, kernelH, kernelW, paddingD, paddingH, paddingW), |
| 193 | return false); | 194 | return false); |
| 194 | 195 | ||
| @@ -222,7 +223,7 @@ static bool CheckSelfShapeSupport(const aclTensor* self) | |||
| 222 | if (!Ops::NN::AclnnUtil::IsRegbase()) { | 223 | if (!Ops::NN::AclnnUtil::IsRegbase()) { |
| 223 | OP_CHECK((selfSize <= MAX_INT32), | 224 | OP_CHECK((selfSize <= MAX_INT32), |
| 224 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, | 225 | OP_LOGE(ACLNN_ERR_PARAM_INVALID, |
| 225 | - "The size of self should be less than or equal to 2^32 - 1, but got selfSize:%ld", selfSize), | 226 | + "The size of self should be less than or equal to 2^31 - 1, but got selfSize:%ld", selfSize), |
| 226 | return false); | 227 | return false); |
| 227 | } | 228 | } |
| 228 | 229 | ||
| @@ -36,7 +36,7 @@ bool MaxPool3DGradWithArgmaxTilingBase::CheckInputShape() | |||
| 36 | // xDimNum should be 5(format:NCDHW) | 36 | // xDimNum should be 5(format:NCDHW) |
| 37 | OP_CHECK_IF((xDimNum != NCDHW_DIM_NUM) || (gradDimNum != NCDHW_DIM_NUM) || (argmaxDimNum != NCDHW_DIM_NUM), | 37 | OP_CHECK_IF((xDimNum != NCDHW_DIM_NUM) || (gradDimNum != NCDHW_DIM_NUM) || (argmaxDimNum != NCDHW_DIM_NUM), |
| 38 | OP_LOGE(context_->GetNodeName(), | 38 | OP_LOGE(context_->GetNodeName(), |
| 39 | - "Input dim num should equal = %lu, actual is xDim: %lu, gradDim: %lu, argmaxDim: %lu.", | 39 | + "Input dim num should be %lu, actual is xDim: %lu, gradDim: %lu, argmaxDim: %lu.", |
| 40 | NCDHW_DIM_NUM, xDimNum, gradDimNum, argmaxDimNum), | 40 | NCDHW_DIM_NUM, xDimNum, gradDimNum, argmaxDimNum), |
| 41 | return false); | 41 | return false); |
| 42 | for (uint32_t i = 0; i < xDimNum; i++) { | 42 | for (uint32_t i = 0; i < xDimNum; i++) { |
| @@ -223,13 +223,13 @@ ge::graphStatus MaxPool3DGradWithArgmaxTilingBase::CheckInputValid() | |||
| 223 | 223 | ||
| 224 | // check 1 | 224 | // check 1 |
| 225 | OP_CHECK_IF((pDTop > (kd / 2)) || (pHTop > (kh / 2)) || (pWTop > (kw / 2)), | 225 | OP_CHECK_IF((pDTop > (kd / 2)) || (pHTop > (kh / 2)) || (pWTop > (kw / 2)), |
| 226 | - OP_LOGE(context_->GetNodeName(), "Attr size invalid, padSize should smaller than kernelSize div 2"), | 226 | + OP_LOGE(context_->GetNodeName(), "Attr size invalid, padSize should be smaller than kernelSize div 2"), |
| 227 | return ge::GRAPH_FAILED); | 227 | return ge::GRAPH_FAILED); |
| 228 | // check 2 | 228 | // check 2 |
| 229 | OP_CHECK_IF((pDTop > ((kd - 1) * dilationD + 1) / 2) || (pHTop > ((kh - 1) * dilationH + 1) / 2) || | 229 | OP_CHECK_IF((pDTop > ((kd - 1) * dilationD + 1) / 2) || (pHTop > ((kh - 1) * dilationH + 1) / 2) || |
| 230 | (pWTop > ((kw - 1) * dilationW + 1) / 2), | 230 | (pWTop > ((kw - 1) * dilationW + 1) / 2), |
| 231 | OP_LOGE(context_->GetNodeName(), | 231 | OP_LOGE(context_->GetNodeName(), |
| 232 | - "Attr size invalid, padSize should smaller than ((kernelSize - 1) * dilation + 1) / 2."), | 232 | + "Attr size invalid, padSize should be smaller than ((kernelSize - 1) * dilation + 1) / 2."), |
| 233 | return ge::GRAPH_FAILED); | 233 | return ge::GRAPH_FAILED); |
| 234 | // check 3 | 234 | // check 3 |
| 235 | // Check outerDim invaild | 235 | // Check outerDim invaild |
| @@ -260,7 +260,7 @@ ge::graphStatus MaxPool3DGradWithArgmaxTilingBase::CheckInputValid() | |||
| 260 | // Check index range | 260 | // Check index range |
| 261 | OP_CHECK_IF(maxPoolGradParams.diDim * maxPoolGradParams.hiDim * maxPoolGradParams.wiDim > MAX_INT32, | 261 | OP_CHECK_IF(maxPoolGradParams.diDim * maxPoolGradParams.hiDim * maxPoolGradParams.wiDim > MAX_INT32, |
| 262 | OP_LOGE(context_->GetNodeName(), | 262 | OP_LOGE(context_->GetNodeName(), |
| 263 | - "Shape too big, diDim * hiDim * wiDim should not bigger than max range of int32."), | 263 | + "Shape too big, diDim * hiDim * wiDim should not be bigger than max range of int32."), |
| 264 | return ge::GRAPH_FAILED); | 264 | return ge::GRAPH_FAILED); |
| 265 | return ge::GRAPH_SUCCESS; | 265 | return ge::GRAPH_SUCCESS; |
| 266 | } | 266 | } |
| @@ -374,29 +374,30 @@ ge::graphStatus MaxPool3DGradWithArgmaxTilingBaseV35::GetShapeAttrsInfo() | |||
| 374 | OP_LOGD(context_->GetNodeName(), "Enter MaxPool3DGradWithArgmaxTilingBaseV35 GetShapeAttrsInfo."); | 374 | OP_LOGD(context_->GetNodeName(), "Enter MaxPool3DGradWithArgmaxTilingBaseV35 GetShapeAttrsInfo."); |
| 375 | const char* opName_ = "MaxPool3DGradWithArgmax"; | 375 | const char* opName_ = "MaxPool3DGradWithArgmax"; |
| 376 | if (ge::GRAPH_SUCCESS != CheckInputDtype()) { | 376 | if (ge::GRAPH_SUCCESS != CheckInputDtype()) { |
| 377 | - OP_LOGE_FOR_INVALID_DTYPES_WITH_REASON(opName_, "x, grad, argmax", "invalid_dtypes", | 377 | + OP_LOGE_FOR_INVALID_DTYPES_WITH_REASON(opName_, "x, grad, argmax", |
| 378 | + ge::TypeUtils::DataTypeToSerialString(inputData.inputDtype).c_str(), | ||
| 378 | "The input dtype is invalid."); | 379 | "The input dtype is invalid."); |
| 379 | return ge::GRAPH_FAILED; | 380 | return ge::GRAPH_FAILED; |
| 380 | } | 381 | } |
| 381 | if (!CheckInputShape()) { | 382 | if (!CheckInputShape()) { |
| 382 | - OP_LOGE_FOR_INVALID_SHAPES_WITH_REASON(opName_, "x, grad, argmax", "invalid_shapes", | 383 | + OP_LOGE_FOR_INVALID_SHAPES_WITH_REASON(opName_, "x, grad, argmax", "shape check failed", |
| 383 | "The input relationship is invalid."); | 384 | "The input relationship is invalid."); |
| 384 | return ge::GRAPH_FAILED; | 385 | return ge::GRAPH_FAILED; |
| 385 | } | 386 | } |
| 386 | if (ge::GRAPH_SUCCESS != CheckAttrShape()) { | 387 | if (ge::GRAPH_SUCCESS != CheckAttrShape()) { |
| 387 | - OP_LOGE_FOR_INVALID_LISTSIZE(opName_, "Length of attr", "invalid_size", "3, 1, or 0"); | 388 | + OP_LOGE_FOR_INVALID_LISTSIZE(opName_, "Length of attr", "check failed", "3, 1, or 0"); |
| 388 | return ge::GRAPH_FAILED; | 389 | return ge::GRAPH_FAILED; |
| 389 | } | 390 | } |
| 390 | if (ge::GRAPH_SUCCESS != SetInputParams()) { | 391 | if (ge::GRAPH_SUCCESS != SetInputParams()) { |
| 391 | - OP_LOGE_FOR_INVALID_SHAPE_WITH_REASON(opName_, "input", "invalid_shape", "Set input shape failed."); | 392 | + OP_LOGE_FOR_INVALID_SHAPE_WITH_REASON(opName_, "input", "set failed", "Set input shape failed."); |
| 392 | return ge::GRAPH_FAILED; | 393 | return ge::GRAPH_FAILED; |
| 393 | } | 394 | } |
| 394 | if (ge::GRAPH_SUCCESS != SetAttrParams()) { | 395 | if (ge::GRAPH_SUCCESS != SetAttrParams()) { |
| 395 | - OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "attr", "invalid_value", "Set attr shape failed."); | 396 | + OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "attr", "set failed", "Set attr shape failed."); |
| 396 | return ge::GRAPH_FAILED; | 397 | return ge::GRAPH_FAILED; |
| 397 | } | 398 | } |
| 398 | if (ge::GRAPH_SUCCESS != CheckInputValid()) { | 399 | if (ge::GRAPH_SUCCESS != CheckInputValid()) { |
| 399 | - OP_LOGE_FOR_INVALID_VALUES_WITH_REASON(opName_, "d, h, w", "invalid_values", "The input shape is invalid."); | 400 | + OP_LOGE_FOR_INVALID_VALUES_WITH_REASON(opName_, "d, h, w", "check failed", "The input shape is invalid."); |
| 400 | return ge::GRAPH_FAILED; | 401 | return ge::GRAPH_FAILED; |
| 401 | } | 402 | } |
| 402 | SetOtherInputParams(); | 403 | SetOtherInputParams(); |
| @@ -195,7 +195,7 @@ const std::tuple<const aclTensor*, const aclTensor*> MaxPoolWithArgmaxV1( | |||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | // 当前没有匹配的aicpu算子 | 197 | // 当前没有匹配的aicpu算子 |
| 198 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "no dtype not supported on ai cpu"); | 198 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "dtype not supported on AICPU"); |
| 199 | return std::tuple<aclTensor*, aclTensor*>(nullptr, nullptr); | 199 | return std::tuple<aclTensor*, aclTensor*>(nullptr, nullptr); |
| 200 | } | 200 | } |
| 201 | } // namespace l0op | 201 | } // namespace l0op |
| @@ -52,7 +52,7 @@ static int64_t DivRtn(int64_t x, int64_t y) | |||
| 52 | return GRAPH_FAILED; | 52 | return GRAPH_FAILED; |
| 53 | } | 53 | } |
| 54 | if (x < 0) { | 54 | if (x < 0) { |
| 55 | - OP_LOGE("MaxPool3DWithArgmaxV2", "x value cannot small than zero."); | 55 | + OP_LOGE("MaxPool3DWithArgmaxV2", "x value cannot be smaller than zero."); |
| 56 | return GRAPH_FAILED; | 56 | return GRAPH_FAILED; |
| 57 | } | 57 | } |
| 58 | int64_t q = x / y; | 58 | int64_t q = x / y; |
| @@ -222,4 +222,4 @@ static ge::graphStatus InferDataType4MaxPool3DWithArgmaxV2(gert::InferDataTypeCo | |||
| 222 | IMPL_OP_INFERSHAPE(MaxPool3DWithArgmaxV2) | 222 | IMPL_OP_INFERSHAPE(MaxPool3DWithArgmaxV2) |
| 223 | .InferShape(InferShape4MaxPool3DWithArgmaxV2) | 223 | .InferShape(InferShape4MaxPool3DWithArgmaxV2) |
| 224 | .InferDataType(InferDataType4MaxPool3DWithArgmaxV2); | 224 | .InferDataType(InferDataType4MaxPool3DWithArgmaxV2); |
| 225 | -} // namespace ops | 225 | +} // namespace ops |
| @@ -98,7 +98,7 @@ void MaxPoolGradNCHWTilingHelper::DoBufferCalculate() | |||
| 98 | bool MaxPoolGradNCHWTiling::IsCapable() | 98 | bool MaxPoolGradNCHWTiling::IsCapable() |
| 99 | { | 99 | { |
| 100 | if (inputData.inputFormat != ge::Format::FORMAT_NCHW) { | 100 | if (inputData.inputFormat != ge::Format::FORMAT_NCHW) { |
| 101 | - OP_LOGI("IsCapable", "inputFormat error, expected NCHW"); | 101 | + OP_LOGW("IsCapable", "inputFormat invalid, expected NCHW"); |
| 102 | return false; | 102 | return false; |
| 103 | } | 103 | } |
| 104 | if (inputData.hDilation != 1 || inputData.wDilation != 1) { | 104 | if (inputData.hDilation != 1 || inputData.wDilation != 1) { |
| @@ -134,7 +134,7 @@ ge::graphStatus MaxPoolGradNCHWTiling::GetShapeAttrsInfo() | |||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | if (inputData.inputFormat != ge::Format::FORMAT_NCHW) { | 136 | if (inputData.inputFormat != ge::Format::FORMAT_NCHW) { |
| 137 | - OP_LOGI("GetShapeAttrsInfo", "inputFormat error, expected NCHW"); | 137 | + OP_LOGW("GetShapeAttrsInfo", "inputFormat invalid, expected NCHW"); |
| 138 | return ge::GRAPH_PARAM_INVALID; | 138 | return ge::GRAPH_PARAM_INVALID; |
| 139 | } | 139 | } |
| 140 | 140 | ||
| @@ -167,4 +167,4 @@ ge::graphStatus MaxPoolGradNCHWTiling::GetPlatformInfo() | |||
| 167 | 167 | ||
| 168 | REGISTER_TILING_TEMPLATE("MaxPoolGrad", MaxPoolGradNCHWTiling, 0); | 168 | REGISTER_TILING_TEMPLATE("MaxPoolGrad", MaxPoolGradNCHWTiling, 0); |
| 169 | 169 | ||
| 170 | -} // namespace optiling | 170 | +} // namespace optiling |
| @@ -91,7 +91,7 @@ ge::graphStatus InferShapeForMaxPoolGradWithArgmax(gert::InferShapeContext* cont | |||
| 91 | OP_CHECK_NULL_WITH_CONTEXT(context, padsPtr); | 91 | OP_CHECK_NULL_WITH_CONTEXT(context, padsPtr); |
| 92 | std::string padding(padsPtr); | 92 | std::string padding(padsPtr); |
| 93 | if (padding != "SAME" && padding != "VALID") { | 93 | if (padding != "SAME" && padding != "VALID") { |
| 94 | - OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "pads", padding.c_str(), "Pads attritube must be SAME or VALID"); | 94 | + OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "pads", padding.c_str(), "Pads attribute must be SAME or VALID"); |
| 95 | return GRAPH_FAILED; | 95 | return GRAPH_FAILED; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| @@ -116,7 +116,7 @@ ge::graphStatus InferShapeForMaxPoolGradWithArgmax(gert::InferShapeContext* cont | |||
| 116 | return GRAPH_FAILED; | 116 | return GRAPH_FAILED; |
| 117 | } | 117 | } |
| 118 | if (strides_data[INDEX_ONE] != KSIZE_STRIDES_VALUE) { | 118 | if (strides_data[INDEX_ONE] != KSIZE_STRIDES_VALUE) { |
| 119 | - OP_LOGE_FOR_INVALID_VALUE(opName_, "strides[3]", std::to_string(strides_data[INDEX_ONE]).c_str(), "1"); | 119 | + OP_LOGE_FOR_INVALID_VALUE(opName_, "strides[1]", std::to_string(strides_data[INDEX_ONE]).c_str(), "1"); |
| 120 | return GRAPH_FAILED; | 120 | return GRAPH_FAILED; |
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| @@ -161,4 +161,4 @@ static ge::graphStatus InferDataTypeForMaxPoolGradWithArgmax(gert::InferDataType | |||
| 161 | IMPL_OP_INFERSHAPE(MaxPoolGradWithArgmax) | 161 | IMPL_OP_INFERSHAPE(MaxPoolGradWithArgmax) |
| 162 | .InferShape(InferShapeForMaxPoolGradWithArgmax) | 162 | .InferShape(InferShapeForMaxPoolGradWithArgmax) |
| 163 | .InferDataType(InferDataTypeForMaxPoolGradWithArgmax); | 163 | .InferDataType(InferDataTypeForMaxPoolGradWithArgmax); |
| 164 | -} // namespace ops | 164 | +} // namespace ops |
| @@ -213,7 +213,7 @@ ge::graphStatus MaxPoolGradWithArgmaxV3NCHWScalarTiling::CalcGradArgmax() | |||
| 213 | scalarTilingData_.argmaxBufferSize = argmaxCountInUB * ge::GetSizeByDataType(inputData.indexDtype); | 213 | scalarTilingData_.argmaxBufferSize = argmaxCountInUB * ge::GetSizeByDataType(inputData.indexDtype); |
| 214 | ge::graphStatus result = CalcGradArgmaxInner(argmaxCountInUB); | 214 | ge::graphStatus result = CalcGradArgmaxInner(argmaxCountInUB); |
| 215 | if (result != ge::GRAPH_SUCCESS) { | 215 | if (result != ge::GRAPH_SUCCESS) { |
| 216 | - OP_LOGE(context_->GetNodeName(), "calc normal interal loop failure."); | 216 | + OP_LOGE(context_->GetNodeName(), "calc normal internal loop failure."); |
| 217 | return result; | 217 | return result; |
| 218 | } | 218 | } |
| 219 | SetNormalInner(); | 219 | SetNormalInner(); |
| @@ -137,7 +137,7 @@ static ge::graphStatus InferShape4MaxPoolV2(gert::InferShapeContext* context) | |||
| 137 | return item.first == paddingMode; | 137 | return item.first == paddingMode; |
| 138 | }); | 138 | }); |
| 139 | if (it == kFuncMap.end()) { | 139 | if (it == kFuncMap.end()) { |
| 140 | - OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "paddingMode", paddingMode, "must in (VALID, SAME)"); | 140 | + OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "paddingMode", paddingMode, "must be in (VALID, SAME)"); |
| 141 | return GRAPH_FAILED; | 141 | return GRAPH_FAILED; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| @@ -113,7 +113,7 @@ const aclTensor* MaxPoolV3(const aclTensor* self, const aclIntArray* kernelShape | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | // 当前没有匹配的aicpu算子 | 115 | // 当前没有匹配的aicpu算子 |
| 116 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "No dtype not supported on AICPU"); | 116 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "dtype not supported on AICPU"); |
| 117 | return nullptr; | 117 | return nullptr; |
| 118 | } | 118 | } |
| 119 | } // namespace l0op | 119 | } // namespace l0op |
| @@ -174,7 +174,7 @@ void MaxPoolV3NHWCSmallKernelTiling::CalcSplitMaxRows(int64_t maxInCols) | |||
| 174 | void MaxPoolV3NHWCSmallKernelTiling::CalcSplitMaxCols(int64_t minInRows) | 174 | void MaxPoolV3NHWCSmallKernelTiling::CalcSplitMaxCols(int64_t minInRows) |
| 175 | { | 175 | { |
| 176 | if (minInRows <= 0) { | 176 | if (minInRows <= 0) { |
| 177 | - OP_LOGE(context_, "MaxPool minInRows is 0."); | 177 | + OP_LOGE(context_, "MaxPool minInRows is %ld.", minInRows); |
| 178 | return; | 178 | return; |
| 179 | } | 179 | } |
| 180 | int64_t outColsLower = 1; | 180 | int64_t outColsLower = 1; |
| @@ -213,7 +213,7 @@ void MaxPoolV3NHWCSmallKernelTiling::CalcSplitMaxCols(int64_t minInRows) | |||
| 213 | void MaxPoolV3NHWCSmallKernelTiling::CalcSplitMaxBatch(int64_t oneBacthBuffer, int64_t oneBatchInputSize) | 213 | void MaxPoolV3NHWCSmallKernelTiling::CalcSplitMaxBatch(int64_t oneBacthBuffer, int64_t oneBatchInputSize) |
| 214 | { | 214 | { |
| 215 | if (oneBatchInputSize <= 0 || oneBacthBuffer <= 0) { | 215 | if (oneBatchInputSize <= 0 || oneBacthBuffer <= 0) { |
| 216 | - OP_LOGI(context_, "MaxPool oneBatchInputSize is %ld, oneBacthBuffer id %ld", oneBatchInputSize, oneBacthBuffer); | 216 | + OP_LOGI(context_, "MaxPool oneBatchInputSize is %ld, oneBatchBuffer is %ld", oneBatchInputSize, oneBacthBuffer); |
| 217 | nLoop_ = ubFactorN_; | 217 | nLoop_ = ubFactorN_; |
| 218 | hLoop_ = 1; | 218 | hLoop_ = 1; |
| 219 | wLoop_ = 1; | 219 | wLoop_ = 1; |
| @@ -182,7 +182,7 @@ void MaxPoolV3SmallKernelTiling::CalcSplitMaxRows(int64_t maxInCols) | |||
| 182 | void MaxPoolV3SmallKernelTiling::CalcSplitMaxCols(int64_t minInRows) | 182 | void MaxPoolV3SmallKernelTiling::CalcSplitMaxCols(int64_t minInRows) |
| 183 | { | 183 | { |
| 184 | if (minInRows <= 0) { | 184 | if (minInRows <= 0) { |
| 185 | - OP_LOGE(context_, "MaxPool minInRows is 0."); | 185 | + OP_LOGE(context_, "MaxPool minInRows is %ld.", minInRows); |
| 186 | return; | 186 | return; |
| 187 | } | 187 | } |
| 188 | int64_t outColsLower = 1; | 188 | int64_t outColsLower = 1; |
| @@ -221,7 +221,7 @@ void MaxPoolV3SmallKernelTiling::CalcSplitMaxCols(int64_t minInRows) | |||
| 221 | void MaxPoolV3SmallKernelTiling::CalcSplitMaxBatch(int64_t oneBacthBuffer, int64_t oneBatchInputSize) | 221 | void MaxPoolV3SmallKernelTiling::CalcSplitMaxBatch(int64_t oneBacthBuffer, int64_t oneBatchInputSize) |
| 222 | { | 222 | { |
| 223 | if (oneBatchInputSize <= 0 || oneBacthBuffer <= 0) { | 223 | if (oneBatchInputSize <= 0 || oneBacthBuffer <= 0) { |
| 224 | - OP_LOGI(context_, "MaxPool oneBatchInputSize is %ld, oneBacthBuffer id %ld", oneBatchInputSize, oneBacthBuffer); | 224 | + OP_LOGI(context_, "MaxPool oneBatchInputSize is %ld, oneBatchBuffer is %ld", oneBatchInputSize, oneBacthBuffer); |
| 225 | nLoop_ = ubFactorN_; | 225 | nLoop_ = ubFactorN_; |
| 226 | hLoop_ = 1; | 226 | hLoop_ = 1; |
| 227 | wLoop_ = 1; | 227 | wLoop_ = 1; |
| @@ -266,7 +266,7 @@ static ge::graphStatus InferShape4MaxPoolV3(gert::InferShapeContext* context) | |||
| 266 | }); | 266 | }); |
| 267 | if (it == kFuncMap.end()) { | 267 | if (it == kFuncMap.end()) { |
| 268 | OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "padding_mode", padding_mode, | 268 | OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(opName_, "padding_mode", padding_mode, |
| 269 | - "must in (CALCULATED, VALID, SAME)"); | 269 | + "must be in (CALCULATED, VALID, SAME)"); |
| 270 | return GRAPH_FAILED; | 270 | return GRAPH_FAILED; |
| 271 | } | 271 | } |
| 272 | 272 | ||
| @@ -45,7 +45,8 @@ static constexpr int64_t UNKNOWN_DIM_VALUE_ = -1LL; | |||
| 45 | 45 | ||
| 46 | inline ge::graphStatus SetAllUnknownDim(const int64_t rank, gert::Shape* output_shape) | 46 | inline ge::graphStatus SetAllUnknownDim(const int64_t rank, gert::Shape* output_shape) |
| 47 | { | 47 | { |
| 48 | - OP_CHECK_IF(output_shape == nullptr, OP_LOGD("SetAllUnknownDim", "the output_shape is nullptr, return unsuccess"), | 48 | + OP_CHECK_IF(output_shape == nullptr, |
| 49 | + OP_LOGD("SetAllUnknownDim", "the output_shape is nullptr, return unsuccessful"), | ||
| 49 | return ge::GRAPH_FAILED); | 50 | return ge::GRAPH_FAILED); |
| 50 | output_shape->SetDimNum(rank); | 51 | output_shape->SetDimNum(rank); |
| 51 | for (int64_t i = 0; i < rank; ++i) { | 52 | for (int64_t i = 0; i < rank; ++i) { |
| @@ -121,7 +121,7 @@ const std::tuple<const aclTensor*, const aclTensor*> MaxPoolWithArgmaxV3( | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | // 当前没有匹配的aicpu算子 | 123 | // 当前没有匹配的aicpu算子 |
| 124 | - OP_LOGE(ACLNN_ERR_PARAM_INVALID, "no dtype not supported on ai cpu"); | 124 | + OP_LOGE(ACLNN_ERR_PARAM_INVALID, "dtype not supported on AICPU"); |
| 125 | return std::tuple<aclTensor*, aclTensor*>(nullptr, nullptr); | 125 | return std::tuple<aclTensor*, aclTensor*>(nullptr, nullptr); |
| 126 | } | 126 | } |
| 127 | } // namespace l0op | 127 | } // namespace l0op |