已合并
针对nn仓部分算子存在错误日志问题进行统一整改 #9275
gaomingyuan创建于 27 天前
针对nn仓部分算子存在错误日志问题进行统一整改 #9275
已合并
共 12 个文件变更+46-63
| @@ -47,7 +47,6 @@ static inline const gert::Shape& EnsureNotScalar(const gert::Shape& in_shape) | |||
| 47 | 47 | ||
| 48 | ge::graphStatus LeakyReluTiling::CalcInputDtype() | 48 | ge::graphStatus LeakyReluTiling::CalcInputDtype() |
| 49 | { | 49 | { |
| 50 | - OP_LOGD(tilingContext->GetNodeName(), "LeakyReluTiling CalcInputDtype enter."); | ||
| 51 | auto inputDesc = tilingContext->GetInputDesc(0); | 50 | auto inputDesc = tilingContext->GetInputDesc(0); |
| 52 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputDesc); | 51 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputDesc); |
| 53 | this->inputDtype = inputDesc->GetDataType(); | 52 | this->inputDtype = inputDesc->GetDataType(); |
| @@ -63,7 +62,6 @@ ge::graphStatus LeakyReluTiling::CalcInputDtype() | |||
| 63 | 62 | ||
| 64 | ge::graphStatus LeakyReluTiling::CheckShape() | 63 | ge::graphStatus LeakyReluTiling::CheckShape() |
| 65 | { | 64 | { |
| 66 | - OP_LOGD(tilingContext->GetNodeName(), "LeakyReluTiling CheckShape enter."); | ||
| 67 | auto inputStorageShape = tilingContext->GetInputShape(0); | 65 | auto inputStorageShape = tilingContext->GetInputShape(0); |
| 68 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputStorageShape); | 66 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputStorageShape); |
| 69 | const gert::Shape& inputYShape = EnsureNotScalar(inputStorageShape->GetStorageShape()); | 67 | const gert::Shape& inputYShape = EnsureNotScalar(inputStorageShape->GetStorageShape()); |
| @@ -83,7 +81,6 @@ ge::graphStatus LeakyReluTiling::CheckShape() | |||
| 83 | 81 | ||
| 84 | ge::graphStatus LeakyReluTiling::CalcOutputDtype() | 82 | ge::graphStatus LeakyReluTiling::CalcOutputDtype() |
| 85 | { | 83 | { |
| 86 | - OP_LOGD(tilingContext->GetNodeName(), "LeakyReluTiling CalcOutputDtype enter."); | ||
| 87 | auto outputDesc = tilingContext->GetOutputDesc(0); | 84 | auto outputDesc = tilingContext->GetOutputDesc(0); |
| 88 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, outputDesc); | 85 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, outputDesc); |
| 89 | this->outputDtype = outputDesc->GetDataType(); | 86 | this->outputDtype = outputDesc->GetDataType(); |
| @@ -99,7 +96,6 @@ ge::graphStatus LeakyReluTiling::CalcOutputDtype() | |||
| 99 | 96 | ||
| 100 | ge::graphStatus LeakyReluTiling::RunTiling() | 97 | ge::graphStatus LeakyReluTiling::RunTiling() |
| 101 | { | 98 | { |
| 102 | - OP_LOGD(tilingContext->GetNodeName(), "LeakyReluTiling RunTiling enter."); | ||
| 103 | ElewiseBaseTiling eleBaseTiling(tilingContext); | 99 | ElewiseBaseTiling eleBaseTiling(tilingContext); |
| 104 | 100 | ||
| 105 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "get input dtype failed"), | 101 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "get input dtype failed"), |
| @@ -130,7 +126,9 @@ ge::graphStatus LeakyReluTiling::RunTiling() | |||
| 130 | "DT_FLOAT16, DT_BF16, DT_FLOAT"); | 126 | "DT_FLOAT16, DT_BF16, DT_FLOAT"); |
| 131 | return ge::GRAPH_FAILED; | 127 | return ge::GRAPH_FAILED; |
| 132 | } | 128 | } |
| 133 | - OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "elewiseBaseTiling failed"), | 129 | + OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 130 | + OP_LOGE(tilingContext->GetNodeName(), "elewiseBaseTiling failed, output dtype: %s.", | ||
| 131 | + ge::TypeUtils::DataTypeToSerialString(this->outputDtype).c_str()), | ||
| 134 | return ge::GRAPH_FAILED); | 132 | return ge::GRAPH_FAILED); |
| 135 | 133 | ||
| 136 | eleBaseTiling.SetScalar<float>(negativeSlope); | 134 | eleBaseTiling.SetScalar<float>(negativeSlope); |
| @@ -156,7 +154,6 @@ static ge::graphStatus TilingForLeakyRelu(gert::TilingContext* context) | |||
| 156 | 154 | ||
| 157 | auto compileInfo = context->GetCompileInfo<LeakrReluCompileInfo>(); | 155 | auto compileInfo = context->GetCompileInfo<LeakrReluCompileInfo>(); |
| 158 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); | 156 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); |
| 159 | - OP_LOGD("LeakyReluTiling", "Enter new LeakyReluTiling"); | ||
| 160 | LeakyReluTiling tiling(context); | 157 | LeakyReluTiling tiling(context); |
| 161 | return tiling.RunTiling(); | 158 | return tiling.RunTiling(); |
| 162 | } | 159 | } |
| @@ -65,7 +65,8 @@ ge::graphStatus LeakyReluGradTiling::DoOpTiling() | |||
| 65 | BroadcastBaseTiling<LeakyReluGradDag<half>::OpDag> brcBaseTiling(context_); | 65 | BroadcastBaseTiling<LeakyReluGradDag<half>::OpDag> brcBaseTiling(context_); |
| 66 | baseTilingResult = brcBaseTiling.DoTiling(); | 66 | baseTilingResult = brcBaseTiling.DoTiling(); |
| 67 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, | 67 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 68 | - OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling<LeakyReluGradDag<half>::OpDag> failed"), | 68 | + OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling failed, input dtype: %s.", |
| 69 | + ge::TypeUtils::DataTypeToSerialString(input0DType).c_str()), | ||
| 69 | return ge::GRAPH_FAILED); | 70 | return ge::GRAPH_FAILED); |
| 70 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode(), LEAKY_RELU_GRAD_TPL_FP16); | 71 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode(), LEAKY_RELU_GRAD_TPL_FP16); |
| 71 | brcBaseTiling.SetScalar<float>(negativeSlope); | 72 | brcBaseTiling.SetScalar<float>(negativeSlope); |
| @@ -73,7 +74,8 @@ ge::graphStatus LeakyReluGradTiling::DoOpTiling() | |||
| 73 | BroadcastBaseTiling<LeakyReluGradDag<bfloat16_t>::OpDag> brcBaseTiling(context_); | 74 | BroadcastBaseTiling<LeakyReluGradDag<bfloat16_t>::OpDag> brcBaseTiling(context_); |
| 74 | baseTilingResult = brcBaseTiling.DoTiling(); | 75 | baseTilingResult = brcBaseTiling.DoTiling(); |
| 75 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, | 76 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 76 | - OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling<LeakyReluGradDag<bfloat16_t>::OpDag> failed"), | 77 | + OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling failed, input dtype: %s.", |
| 78 | + ge::TypeUtils::DataTypeToSerialString(input0DType).c_str()), | ||
| 77 | return ge::GRAPH_FAILED); | 79 | return ge::GRAPH_FAILED); |
| 78 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode(), LEAKY_RELU_GRAD_TPL_BF16); | 80 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode(), LEAKY_RELU_GRAD_TPL_BF16); |
| 79 | brcBaseTiling.SetScalar<float>(negativeSlope); | 81 | brcBaseTiling.SetScalar<float>(negativeSlope); |
| @@ -81,7 +83,8 @@ ge::graphStatus LeakyReluGradTiling::DoOpTiling() | |||
| 81 | BroadcastBaseTiling<LeakyReluGradDag<float>::OpDag> brcBaseTiling(context_); | 83 | BroadcastBaseTiling<LeakyReluGradDag<float>::OpDag> brcBaseTiling(context_); |
| 82 | baseTilingResult = brcBaseTiling.DoTiling(); | 84 | baseTilingResult = brcBaseTiling.DoTiling(); |
| 83 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, | 85 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 84 | - OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling<LeakyReluGradDag<float>::OpDag> failed"), | 86 | + OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling failed, input dtype: %s.", |
| 87 | + ge::TypeUtils::DataTypeToSerialString(input0DType).c_str()), | ||
| 85 | return ge::GRAPH_FAILED); | 88 | return ge::GRAPH_FAILED); |
| 86 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode(), LEAKY_RELU_GRAD_TPL_FP32); | 89 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode(), LEAKY_RELU_GRAD_TPL_FP32); |
| 87 | brcBaseTiling.SetScalar<float>(negativeSlope); | 90 | brcBaseTiling.SetScalar<float>(negativeSlope); |
| @@ -113,7 +116,6 @@ ge::graphStatus TilingForLeakyReluGrad(gert::TilingContext* context) | |||
| 113 | } | 116 | } |
| 114 | auto compileInfo = reinterpret_cast<const BroadcastCompileInfo*>(context->GetCompileInfo()); | 117 | auto compileInfo = reinterpret_cast<const BroadcastCompileInfo*>(context->GetCompileInfo()); |
| 115 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); | 118 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); |
| 116 | - OP_LOGD("LeakyReluGradTiling", "Enter new LeakyReluGradTiling"); | ||
| 117 | LeakyReluGradTiling tiling(context); | 119 | LeakyReluGradTiling tiling(context); |
| 118 | return tiling.DoTiling(); | 120 | return tiling.DoTiling(); |
| 119 | } | 121 | } |
| @@ -134,4 +136,4 @@ IMPL_OP_OPTILING(LeakyReluGrad) | |||
| 134 | .Tiling(TilingForLeakyReluGrad) | 136 | .Tiling(TilingForLeakyReluGrad) |
| 135 | .TilingParse<BroadcastCompileInfo>(TilingPrepareForBroadcast); | 137 | .TilingParse<BroadcastCompileInfo>(TilingPrepareForBroadcast); |
| 136 | REGISTER_OPS_TILING_TEMPLATE(LeakyReluGrad, LeakyReluGradTiling, LEAKY_RELU_GRAD_COMMON_TILING_PRIORITY); | 138 | REGISTER_OPS_TILING_TEMPLATE(LeakyReluGrad, LeakyReluGradTiling, LEAKY_RELU_GRAD_COMMON_TILING_PRIORITY); |
| 137 | -} // namespace optiling | 139 | +} // namespace optiling |
| @@ -47,7 +47,6 @@ bool PreluTiling::IsCapable() { return true; } | |||
| 47 | 47 | ||
| 48 | ge::graphStatus PreluTiling::DoOpTiling() | 48 | ge::graphStatus PreluTiling::DoOpTiling() |
| 49 | { | 49 | { |
| 50 | - OP_LOGD(context_->GetNodeName(), "PreluTiling RunTiling enter."); | ||
| 51 | auto xInputDesc = context_->GetInputDesc(0); | 50 | auto xInputDesc = context_->GetInputDesc(0); |
| 52 | OP_CHECK_NULL_WITH_CONTEXT(context_, xInputDesc); | 51 | OP_CHECK_NULL_WITH_CONTEXT(context_, xInputDesc); |
| 53 | ge::DataType xInputDtype = xInputDesc->GetDataType(); | 52 | ge::DataType xInputDtype = xInputDesc->GetDataType(); |
| @@ -81,26 +80,26 @@ ge::graphStatus PreluTiling::DoOpTiling() | |||
| 81 | if (xInputDtype == ge::DT_FLOAT16) { | 80 | if (xInputDtype == ge::DT_FLOAT16) { |
| 82 | BroadcastBaseTiling<PreluDAG<half>::OpDag> brcBaseTiling(context_); | 81 | BroadcastBaseTiling<PreluDAG<half>::OpDag> brcBaseTiling(context_); |
| 83 | baseTilingResult = brcBaseTiling.DoTiling(); | 82 | baseTilingResult = brcBaseTiling.DoTiling(); |
| 84 | - OP_CHECK_IF( | 83 | + OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 85 | - baseTilingResult == ge::GRAPH_FAILED, | 84 | + OPS_REPORT_VECTOR_INNER_ERR(context_->GetNodeName(), "BroadcastBaseTiling failed, x dtype: %s.", |
| 86 | - OPS_REPORT_VECTOR_INNER_ERR(context_->GetNodeName(), "BroadcastBaseTiling<PreluDAG<half>::OpDag> failed"), | 85 | + ge::TypeUtils::DataTypeToSerialString(xInputDtype).c_str()), |
| 87 | - return ge::GRAPH_FAILED); | 86 | + return ge::GRAPH_FAILED); |
| 88 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode()); | 87 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode()); |
| 89 | } else if (xInputDtype == ge::DT_BF16) { | 88 | } else if (xInputDtype == ge::DT_BF16) { |
| 90 | BroadcastBaseTiling<PreluDAG<bfloat16_t>::OpDag> brcBaseTiling(context_); | 89 | BroadcastBaseTiling<PreluDAG<bfloat16_t>::OpDag> brcBaseTiling(context_); |
| 91 | baseTilingResult = brcBaseTiling.DoTiling(); | 90 | baseTilingResult = brcBaseTiling.DoTiling(); |
| 92 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, | 91 | OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 93 | - OPS_REPORT_VECTOR_INNER_ERR(context_->GetNodeName(), | 92 | + OPS_REPORT_VECTOR_INNER_ERR(context_->GetNodeName(), "BroadcastBaseTiling failed, x dtype: %s.", |
| 94 | - "BroadcastBaseTiling<PreluDAG<bfloat16_t>::OpDag> failed"), | 93 | + ge::TypeUtils::DataTypeToSerialString(xInputDtype).c_str()), |
| 95 | return ge::GRAPH_FAILED); | 94 | return ge::GRAPH_FAILED); |
| 96 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode()); | 95 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode()); |
| 97 | } else if (xInputDtype == ge::DT_FLOAT) { | 96 | } else if (xInputDtype == ge::DT_FLOAT) { |
| 98 | BroadcastBaseTiling<PreluDAG<float>::OpDag> brcBaseTiling(context_); | 97 | BroadcastBaseTiling<PreluDAG<float>::OpDag> brcBaseTiling(context_); |
| 99 | baseTilingResult = brcBaseTiling.DoTiling(); | 98 | baseTilingResult = brcBaseTiling.DoTiling(); |
| 100 | - OP_CHECK_IF( | 99 | + OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 101 | - baseTilingResult == ge::GRAPH_FAILED, | 100 | + OPS_REPORT_VECTOR_INNER_ERR(context_->GetNodeName(), "BroadcastBaseTiling failed, x dtype: %s.", |
| 102 | - OPS_REPORT_VECTOR_INNER_ERR(context_->GetNodeName(), "BroadcastBaseTiling<PreluDAG<float>::OpDag> failed"), | 101 | + ge::TypeUtils::DataTypeToSerialString(xInputDtype).c_str()), |
| 103 | - return ge::GRAPH_FAILED); | 102 | + return ge::GRAPH_FAILED); |
| 104 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode()); | 103 | tilingKey = GET_TPL_TILING_KEY(brcBaseTiling.GetSchMode()); |
| 105 | } else { | 104 | } else { |
| 106 | OP_LOGE_FOR_INVALID_DTYPE(context_->GetNodeName(), "x", ge::TypeUtils::DataTypeToSerialString(xInputDtype), | 105 | OP_LOGE_FOR_INVALID_DTYPE(context_->GetNodeName(), "x", ge::TypeUtils::DataTypeToSerialString(xInputDtype), |
| @@ -136,19 +135,16 @@ ge::graphStatus Tiling4PRelu(gert::TilingContext* context) | |||
| 136 | 135 | ||
| 137 | ge::graphStatus TilingPrepare4PRelu(gert::TilingParseContext* context) | 136 | ge::graphStatus TilingPrepare4PRelu(gert::TilingParseContext* context) |
| 138 | { | 137 | { |
| 139 | - OP_LOGD(context->GetNodeName(), "begin to do TilingPrepare4PRelu."); | ||
| 140 | auto compileInfoPtr = context->GetCompiledInfo<Ops::Base::BroadcastCompileInfo>(); | 138 | auto compileInfoPtr = context->GetCompiledInfo<Ops::Base::BroadcastCompileInfo>(); |
| 141 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfoPtr); | 139 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfoPtr); |
| 142 | - OP_LOGD("BroadCastTiling", "Current is regbase soc version."); | ||
| 143 | fe::PlatFormInfos* platformInfoPtr = context->GetPlatformInfo(); | 140 | fe::PlatFormInfos* platformInfoPtr = context->GetPlatformInfo(); |
| 144 | OP_CHECK_NULL_WITH_CONTEXT(context, platformInfoPtr); | 141 | OP_CHECK_NULL_WITH_CONTEXT(context, platformInfoPtr); |
| 145 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr); | 142 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr); |
| 146 | compileInfoPtr->coreNum = ascendcPlatform.GetCoreNumAiv(); | 143 | compileInfoPtr->coreNum = ascendcPlatform.GetCoreNumAiv(); |
| 147 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, compileInfoPtr->ubSize); | 144 | ascendcPlatform.GetCoreMemSize(platform_ascendc::CoreMemType::UB, compileInfoPtr->ubSize); |
| 148 | - OP_LOGD(context->GetNodeName(), "end to do TilingPrepare4PRelu."); | ||
| 149 | return ge::GRAPH_SUCCESS; | 145 | return ge::GRAPH_SUCCESS; |
| 150 | } | 146 | } |
| 151 | 147 | ||
| 152 | IMPL_OP_OPTILING(PRelu).Tiling(Tiling4PRelu).TilingParse<BroadcastCompileInfo>(TilingPrepare4PRelu); | 148 | IMPL_OP_OPTILING(PRelu).Tiling(Tiling4PRelu).TilingParse<BroadcastCompileInfo>(TilingPrepare4PRelu); |
| 153 | REGISTER_OPS_TILING_TEMPLATE(PRelu, PreluTiling, PRELU_COMMON_TILING_PRIORITY); | 149 | REGISTER_OPS_TILING_TEMPLATE(PRelu, PreluTiling, PRELU_COMMON_TILING_PRIORITY); |
| 154 | -} // namespace optiling | 150 | +} // namespace optiling |
| @@ -79,7 +79,10 @@ ge::graphStatus ReluTiling::RunTiling() | |||
| 79 | return ge::GRAPH_FAILED; | 79 | return ge::GRAPH_FAILED; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | - OP_CHECK_IF(res == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "DoTiling failed"), return ge::GRAPH_FAILED); | 82 | + OP_CHECK_IF(res == ge::GRAPH_FAILED, |
| 83 | + OP_LOGE(tilingContext->GetNodeName(), "DoTiling failed, output dtype: %s.", | ||
| 84 | + ge::TypeUtils::DataTypeToSerialString(this->outputDtype).c_str()), | ||
| 85 | + return ge::GRAPH_FAILED); | ||
| 83 | 86 | ||
| 84 | size_t* currentWorkspace = tilingContext->GetWorkspaceSizes(1); | 87 | size_t* currentWorkspace = tilingContext->GetWorkspaceSizes(1); |
| 85 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, currentWorkspace); | 88 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, currentWorkspace); |
| @@ -112,8 +115,6 @@ static ge::graphStatus Tiling4Relu(gert::TilingContext* context) | |||
| 112 | 115 | ||
| 113 | auto compileInfo = context->GetCompileInfo<ReluCompileInfo>(); | 116 | auto compileInfo = context->GetCompileInfo<ReluCompileInfo>(); |
| 114 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); | 117 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); |
| 115 | - // 走新的模板tiling | ||
| 116 | - OP_LOGD("ReluTiling", "Enter new ReluTiling"); | ||
| 117 | ReluTiling tiling(context); | 118 | ReluTiling tiling(context); |
| 118 | return tiling.RunTiling(); | 119 | return tiling.RunTiling(); |
| 119 | } | 120 | } |
| @@ -131,4 +132,4 @@ ge::graphStatus TilingPrepareForRelu(gert::TilingParseContext* context) | |||
| 131 | } | 132 | } |
| 132 | 133 | ||
| 133 | IMPL_OP_OPTILING(Relu).Tiling(Tiling4Relu).TilingParse<ReluCompileInfo>(TilingPrepareForRelu); | 134 | IMPL_OP_OPTILING(Relu).Tiling(Tiling4Relu).TilingParse<ReluCompileInfo>(TilingPrepareForRelu); |
| 134 | -} // namespace optiling | 135 | +} // namespace optiling |
| @@ -74,7 +74,9 @@ ge::graphStatus ReluGradTiling::DoOpTiling() | |||
| 74 | return ge::GRAPH_FAILED; | 74 | return ge::GRAPH_FAILED; |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | - OP_CHECK_IF(status != ge::GRAPH_SUCCESS, OP_LOGE(context_, "BroadcastBaseTiling do tiling failed."), | 77 | + OP_CHECK_IF(status != ge::GRAPH_SUCCESS, |
| 78 | + OP_LOGE(context_->GetNodeName(), "BroadcastBaseTiling do tiling failed, input dtype: %s.", | ||
| 79 | + ge::TypeUtils::DataTypeToSerialString(inputDtype).c_str()), | ||
| 78 | return ge::GRAPH_FAILED); | 80 | return ge::GRAPH_FAILED); |
| 79 | return ge::GRAPH_SUCCESS; | 81 | return ge::GRAPH_SUCCESS; |
| 80 | } | 82 | } |
| @@ -98,7 +100,6 @@ static ge::graphStatus TilingForReluGrad(gert::TilingContext* context) | |||
| 98 | } | 100 | } |
| 99 | auto compileInfo = context->GetCompileInfo<BroadcastCompileInfo>(); | 101 | auto compileInfo = context->GetCompileInfo<BroadcastCompileInfo>(); |
| 100 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); | 102 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); |
| 101 | - OP_LOGD("ReluGradTiling", "Enter new ReluGradTiling"); | ||
| 102 | ReluGradTiling tiling(context); | 103 | ReluGradTiling tiling(context); |
| 103 | return tiling.DoTiling(); | 104 | return tiling.DoTiling(); |
| 104 | } | 105 | } |
| @@ -42,7 +42,7 @@ const gert::Shape g_vec_1_shape = {1}; | |||
| 42 | 42 | ||
| 43 | class ReluV2Tiling { | 43 | class ReluV2Tiling { |
| 44 | public: | 44 | public: |
| 45 | - explicit ReluV2Tiling(gert::TilingContext* context) : tilingContext(context){}; | 45 | + explicit ReluV2Tiling(gert::TilingContext* context) : tilingContext(context) {}; |
| 46 | ge::graphStatus RunTiling(); | 46 | ge::graphStatus RunTiling(); |
| 47 | ReluV2TilingData* tiling = nullptr; | 47 | ReluV2TilingData* tiling = nullptr; |
| 48 | 48 | ||
| @@ -60,7 +60,6 @@ private: | |||
| 60 | 60 | ||
| 61 | ge::graphStatus ReluV2Tiling::SetTilingData() | 61 | ge::graphStatus ReluV2Tiling::SetTilingData() |
| 62 | { | 62 | { |
| 63 | - OP_LOGD(tilingContext->GetNodeName(), "Enter SetTilingData"); | ||
| 64 | auto rawTilingData = tilingContext->GetRawTilingData(); | 63 | auto rawTilingData = tilingContext->GetRawTilingData(); |
| 65 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, rawTilingData); | 64 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, rawTilingData); |
| 66 | 65 | ||
| @@ -146,7 +145,6 @@ ge::graphStatus ReluV2Tiling::CalcOutputDtype() | |||
| 146 | 145 | ||
| 147 | ge::graphStatus ReluV2Tiling::RunTiling() | 146 | ge::graphStatus ReluV2Tiling::RunTiling() |
| 148 | { | 147 | { |
| 149 | - OP_LOGD(tilingContext->GetNodeName(), "ReluV2Tiling RunTiling Enter."); | ||
| 150 | ElewiseBaseTiling elewiseBaseTiling(tilingContext); | 148 | ElewiseBaseTiling elewiseBaseTiling(tilingContext); |
| 151 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "Get input dtype failed"), | 149 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "Get input dtype failed"), |
| 152 | return ge::GRAPH_FAILED); | 150 | return ge::GRAPH_FAILED); |
| @@ -187,7 +185,10 @@ ge::graphStatus ReluV2Tiling::RunTiling() | |||
| 187 | return ge::GRAPH_FAILED; | 185 | return ge::GRAPH_FAILED; |
| 188 | } | 186 | } |
| 189 | 187 | ||
| 190 | - OP_CHECK_IF(res == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "DoTiling failed"), return ge::GRAPH_FAILED); | 188 | + OP_CHECK_IF(res == ge::GRAPH_FAILED, |
| 189 | + OP_LOGE(tilingContext->GetNodeName(), "DoTiling failed, output dtype: %s.", | ||
| 190 | + ge::TypeUtils::DataTypeToSerialString(this->outputDtype).c_str()), | ||
| 191 | + return ge::GRAPH_FAILED); | ||
| 191 | return SetTilingData(); | 192 | return SetTilingData(); |
| 192 | } | 193 | } |
| 193 | 194 | ||
| @@ -200,8 +201,6 @@ static ge::graphStatus Tiling4ReluV2(gert::TilingContext* context) | |||
| 200 | } | 201 | } |
| 201 | auto compileInfo = context->GetCompileInfo<ReluV2CompileInfo>(); | 202 | auto compileInfo = context->GetCompileInfo<ReluV2CompileInfo>(); |
| 202 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); | 203 | OP_CHECK_NULL_WITH_CONTEXT(context, compileInfo); |
| 203 | - // 走新的模板tiling | ||
| 204 | - OP_LOGD("ReluV2Tiling", "Enter new ReluV2Tiling"); | ||
| 205 | ReluV2Tiling tiling(context); | 204 | ReluV2Tiling tiling(context); |
| 206 | return tiling.RunTiling(); | 205 | return tiling.RunTiling(); |
| 207 | } | 206 | } |
| @@ -135,8 +135,8 @@ ge::graphStatus SigmoidTiling::DoOpTiling() | |||
| 135 | 135 | ||
| 136 | ElewiseTilingData elewiseTilingData; | 136 | ElewiseTilingData elewiseTilingData; |
| 137 | auto status = ElewiseTiling(elewiseTilingParams, elewiseTilingData); | 137 | auto status = ElewiseTiling(elewiseTilingParams, elewiseTilingData); |
| 138 | - OP_CHECK_IF((status == ge::GRAPH_FAILED), OP_LOGE(context_->GetNodeName(), "elewise tiling failed"), | 138 | + OP_CHECK_IF((status == ge::GRAPH_FAILED), |
| 139 | - return ge::GRAPH_FAILED); | 139 | + OP_LOGE(context_->GetNodeName(), "elewise tiling failed, opKey: %lu.", opKey), return ge::GRAPH_FAILED); |
| 140 | 140 | ||
| 141 | tilingKey_ = GenerateTilingKey(elewiseTilingData.innerKey); | 141 | tilingKey_ = GenerateTilingKey(elewiseTilingData.innerKey); |
| 142 | blockNum = elewiseTilingData.blockNum; | 142 | blockNum = elewiseTilingData.blockNum; |
| @@ -143,8 +143,8 @@ ge::graphStatus SigmoidGradTiling::DoOpTiling() | |||
| 143 | 143 | ||
| 144 | Ops::Base::ElewiseTilingData elewiseTilingData; | 144 | Ops::Base::ElewiseTilingData elewiseTilingData; |
| 145 | auto status = Ops::Base::ElewiseTiling(elewiseTilingParams, elewiseTilingData); | 145 | auto status = Ops::Base::ElewiseTiling(elewiseTilingParams, elewiseTilingData); |
| 146 | - OP_CHECK_IF((status == ge::GRAPH_FAILED), OP_LOGE(context_->GetNodeName(), "elewise tiling failed"), | 146 | + OP_CHECK_IF((status == ge::GRAPH_FAILED), |
| 147 | - return ge::GRAPH_FAILED); | 147 | + OP_LOGE(context_->GetNodeName(), "elewise tiling failed, opKey: %lu.", opKey), return ge::GRAPH_FAILED); |
| 148 | 148 | ||
| 149 | tilingKey_ = GenerateTilingKey(elewiseTilingData.innerKey); | 149 | tilingKey_ = GenerateTilingKey(elewiseTilingData.innerKey); |
| 150 | blockNum = elewiseTilingData.blockNum; | 150 | blockNum = elewiseTilingData.blockNum; |
| @@ -181,7 +181,7 @@ ge::graphStatus SiluGradTiling::DoOpTiling() | |||
| 181 | Ops::Base::BroadcastTilingData broadcastTilingData; | 181 | Ops::Base::BroadcastTilingData broadcastTilingData; |
| 182 | ge::graphStatus status = BroadcastTiling(broadcastTilingParams, broadcastTilingData); | 182 | ge::graphStatus status = BroadcastTiling(broadcastTilingParams, broadcastTilingData); |
| 183 | if (status != ge::GRAPH_SUCCESS) { | 183 | if (status != ge::GRAPH_SUCCESS) { |
| 184 | - OP_LOGE(context_->GetNodeName(), "broadcast tiling failed."); | 184 | + OP_LOGE(context_->GetNodeName(), "broadcast tiling failed, opKey: %lu.", opKey); |
| 185 | return ge::GRAPH_FAILED; | 185 | return ge::GRAPH_FAILED; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| @@ -103,7 +103,6 @@ bool GluBaseTiling4RegBase::CheckShapeValid(const gert::Shape& gradYShape, const | |||
| 103 | // 1、获取平台信息比如CoreNum、UB/L1/L0C资源大小 | 103 | // 1、获取平台信息比如CoreNum、UB/L1/L0C资源大小 |
| 104 | ge::graphStatus GluBaseTiling4RegBase::GetPlatformInfo() | 104 | ge::graphStatus GluBaseTiling4RegBase::GetPlatformInfo() |
| 105 | { | 105 | { |
| 106 | - OP_LOGD(opName_, "GluBaseTiling4RegBase GetPlatformInfo."); | ||
| 107 | auto platformInfo = platform_ascendc::PlatformAscendC(context_->GetPlatformInfo()); | 106 | auto platformInfo = platform_ascendc::PlatformAscendC(context_->GetPlatformInfo()); |
| 108 | blockDim_ = platformInfo.GetCoreNumAiv(); | 107 | blockDim_ = platformInfo.GetCoreNumAiv(); |
| 109 | 108 | ||
| @@ -120,7 +119,6 @@ ge::graphStatus GluBaseTiling4RegBase::GetPlatformInfo() | |||
| 120 | // 2、获取INPUT/OUTPUT/ATTR信息 | 119 | // 2、获取INPUT/OUTPUT/ATTR信息 |
| 121 | ge::graphStatus GluBaseTiling4RegBase::GetShapeAttrsInfo() | 120 | ge::graphStatus GluBaseTiling4RegBase::GetShapeAttrsInfo() |
| 122 | { | 121 | { |
| 123 | - OP_LOGD(opName_, "GluBaseTiling4RegBase GetShapeAttrsInfo."); | ||
| 124 | auto inputGrad = context_->GetInputShape(0); | 122 | auto inputGrad = context_->GetInputShape(0); |
| 125 | OPS_CHECK_NULL_WITH_CONTEXT(context_, inputGrad); | 123 | OPS_CHECK_NULL_WITH_CONTEXT(context_, inputGrad); |
| 126 | 124 | ||
| @@ -151,7 +149,6 @@ bool GluBaseTiling4RegBase::IsCapable() { return true; } | |||
| 151 | // 3、计算数据切分TilingData | 149 | // 3、计算数据切分TilingData |
| 152 | ge::graphStatus GluBaseTiling4RegBase::DoOpTiling() | 150 | ge::graphStatus GluBaseTiling4RegBase::DoOpTiling() |
| 153 | { | 151 | { |
| 154 | - OP_LOGD(opName_, "GluBaseTiling4RegBase DoOpTiling."); | ||
| 155 | dataSize_ = ge::GetSizeByDataType(this->dataType_); | 152 | dataSize_ = ge::GetSizeByDataType(this->dataType_); |
| 156 | if (dataSize_ <= static_cast<uint64_t>(0)) { | 153 | if (dataSize_ <= static_cast<uint64_t>(0)) { |
| 157 | return ge::GRAPH_FAILED; | 154 | return ge::GRAPH_FAILED; |
| @@ -175,7 +172,6 @@ ge::graphStatus GluBaseTiling4RegBase::DoLibApiTiling() { return ge::GRAPH_SUCCE | |||
| 175 | // 5、计算TilingKey | 172 | // 5、计算TilingKey |
| 176 | uint64_t GluBaseTiling4RegBase::GetTilingKey() const | 173 | uint64_t GluBaseTiling4RegBase::GetTilingKey() const |
| 177 | { | 174 | { |
| 178 | - OP_LOGD(opName_, "GluBaseTiling4RegBase GetTilingKey."); | ||
| 179 | enum class DtypeEnum : uint8_t { FLOAT16 = 0, FLOAT32 = 1, BFLOAT16 = 2 }; | 175 | enum class DtypeEnum : uint8_t { FLOAT16 = 0, FLOAT32 = 1, BFLOAT16 = 2 }; |
| 180 | 176 | ||
| 181 | DtypeEnum inDtype = DtypeEnum::FLOAT16; | 177 | DtypeEnum inDtype = DtypeEnum::FLOAT16; |
| @@ -202,7 +198,6 @@ ge::graphStatus GluBaseTiling4RegBase::GetWorkspaceSize() { return ge::GRAPH_SUC | |||
| 202 | // 7、保存Tiling数据 | 198 | // 7、保存Tiling数据 |
| 203 | ge::graphStatus GluBaseTiling4RegBase::PostTiling() | 199 | ge::graphStatus GluBaseTiling4RegBase::PostTiling() |
| 204 | { | 200 | { |
| 205 | - OP_LOGD(opName_, "GluBaseTiling4RegBase PostTiling."); | ||
| 206 | SetTilingData(); | 201 | SetTilingData(); |
| 207 | context_->SetBlockDim(static_cast<uint32_t>(usedCoreNum_)); | 202 | context_->SetBlockDim(static_cast<uint32_t>(usedCoreNum_)); |
| 208 | 203 | ||
| @@ -214,7 +209,6 @@ ge::graphStatus GluBaseTiling4RegBase::PostTiling() | |||
| 214 | 209 | ||
| 215 | void GluBaseTiling4RegBase::AutoTiling() | 210 | void GluBaseTiling4RegBase::AutoTiling() |
| 216 | { | 211 | { |
| 217 | - OP_LOGD(opName_, "GluBaseTiling4RegBase AutoTiling Enter."); | ||
| 218 | int64_t base = static_cast<int64_t>(static_cast<uint64_t>(BASE_BLOCK_COPY_ALIGN) / dataSize_); | 212 | int64_t base = static_cast<int64_t>(static_cast<uint64_t>(BASE_BLOCK_COPY_ALIGN) / dataSize_); |
| 219 | int64_t colNumAlign = (colTotalNum_ + base - 1) / base; | 213 | int64_t colNumAlign = (colTotalNum_ + base - 1) / base; |
| 220 | /* | 214 | /* |
| @@ -315,7 +309,6 @@ uint64_t GluBaseTiling4RegBase::ComputeTiling(const std::vector<uint32_t>& args) | |||
| 315 | 309 | ||
| 316 | void GluBaseTiling4RegBase::SetTilingData() | 310 | void GluBaseTiling4RegBase::SetTilingData() |
| 317 | { | 311 | { |
| 318 | - OP_LOGD(opName_, "GluBaseTiling4RegBase SetTilingData."); | ||
| 319 | GluBaseTilingData* tilingData = context_->GetTilingData<GluBaseTilingData>(); | 312 | GluBaseTilingData* tilingData = context_->GetTilingData<GluBaseTilingData>(); |
| 320 | tilingData->rowTotal = rowTotalNum_; | 313 | tilingData->rowTotal = rowTotalNum_; |
| 321 | tilingData->colTotal = colTotalNum_; | 314 | tilingData->colTotal = colTotalNum_; |
| @@ -41,7 +41,6 @@ static constexpr float ZERO = 0.0; | |||
| 41 | 41 | ||
| 42 | ge::graphStatus SwishTiling::CalcInputDtype() | 42 | ge::graphStatus SwishTiling::CalcInputDtype() |
| 43 | { | 43 | { |
| 44 | - OP_LOGD(tilingContext->GetNodeName(), "SwishTiling CalcInputDtype enter."); | ||
| 45 | auto inputDesc = tilingContext->GetInputDesc(0); | 44 | auto inputDesc = tilingContext->GetInputDesc(0); |
| 46 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputDesc); | 45 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputDesc); |
| 47 | this->inputDtype = inputDesc->GetDataType(); | 46 | this->inputDtype = inputDesc->GetDataType(); |
| @@ -56,7 +55,6 @@ ge::graphStatus SwishTiling::CalcInputDtype() | |||
| 56 | 55 | ||
| 57 | ge::graphStatus SwishTiling::CalcOutputDtype() | 56 | ge::graphStatus SwishTiling::CalcOutputDtype() |
| 58 | { | 57 | { |
| 59 | - OP_LOGD(tilingContext->GetNodeName(), "SwishTiling CalcOutputDtype enter."); | ||
| 60 | auto outputDesc = tilingContext->GetOutputDesc(0); | 58 | auto outputDesc = tilingContext->GetOutputDesc(0); |
| 61 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, outputDesc); | 59 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, outputDesc); |
| 62 | this->outputDtype = outputDesc->GetDataType(); | 60 | this->outputDtype = outputDesc->GetDataType(); |
| @@ -77,7 +75,6 @@ ge::graphStatus SwishTiling::CalcOutputDtype() | |||
| 77 | 75 | ||
| 78 | ge::graphStatus SwishTiling::CheckShape() | 76 | ge::graphStatus SwishTiling::CheckShape() |
| 79 | { | 77 | { |
| 80 | - OP_LOGD(tilingContext->GetNodeName(), "SwishTiling CheckShape enter."); | ||
| 81 | auto inputStorageShape = tilingContext->GetInputShape(0); | 78 | auto inputStorageShape = tilingContext->GetInputShape(0); |
| 82 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputStorageShape); | 79 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, inputStorageShape); |
| 83 | const gert::Shape& inputYShape = EnsureNotScalar(inputStorageShape->GetStorageShape()); | 80 | const gert::Shape& inputYShape = EnsureNotScalar(inputStorageShape->GetStorageShape()); |
| @@ -97,7 +94,6 @@ ge::graphStatus SwishTiling::CheckShape() | |||
| 97 | 94 | ||
| 98 | ge::graphStatus SwishTiling::SetAttr() | 95 | ge::graphStatus SwishTiling::SetAttr() |
| 99 | { | 96 | { |
| 100 | - OP_LOGD(tilingContext->GetNodeName(), "SwishTiling GetAttrs enter."); | ||
| 101 | auto attrs = tilingContext->GetAttrs(); | 97 | auto attrs = tilingContext->GetAttrs(); |
| 102 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, attrs); | 98 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, attrs); |
| 103 | const float* scaleValueAttr = attrs->GetAttrPointer<float>(SwishDag::PLACEHOLDER_INDEX_0); | 99 | const float* scaleValueAttr = attrs->GetAttrPointer<float>(SwishDag::PLACEHOLDER_INDEX_0); |
| @@ -118,7 +114,6 @@ ge::graphStatus SwishTiling::SetAttr() | |||
| 118 | 114 | ||
| 119 | ge::graphStatus SwishTiling::RunTiling() | 115 | ge::graphStatus SwishTiling::RunTiling() |
| 120 | { | 116 | { |
| 121 | - OP_LOGD(tilingContext->GetNodeName(), "SwishTiling RunTiling enter."); | ||
| 122 | ElewiseBaseTiling elewiseBaseTiling(tilingContext); | 117 | ElewiseBaseTiling elewiseBaseTiling(tilingContext); |
| 123 | 118 | ||
| 124 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "get input dtype failed"), | 119 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "get input dtype failed"), |
| @@ -160,7 +155,9 @@ ge::graphStatus SwishTiling::RunTiling() | |||
| 160 | "DT_FLOAT16, DT_BF16, DT_FLOAT"); | 155 | "DT_FLOAT16, DT_BF16, DT_FLOAT"); |
| 161 | return ge::GRAPH_FAILED; | 156 | return ge::GRAPH_FAILED; |
| 162 | } | 157 | } |
| 163 | - OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "elewiseBaseTiling failed"), | 158 | + OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 159 | + OP_LOGE(tilingContext->GetNodeName(), "elewiseBaseTiling failed, output dtype: %s.", | ||
| 160 | + ge::TypeUtils::DataTypeToSerialString(this->outputDtype).c_str()), | ||
| 164 | return ge::GRAPH_FAILED); | 161 | return ge::GRAPH_FAILED); |
| 165 | elewiseBaseTiling.SetScalar<float>(attrScale); | 162 | elewiseBaseTiling.SetScalar<float>(attrScale); |
| 166 | size_t* currentWorkspace = tilingContext->GetWorkspaceSizes(1); | 163 | size_t* currentWorkspace = tilingContext->GetWorkspaceSizes(1); |
| @@ -31,8 +31,6 @@ const size_t ASCEND_WORKSPACE = 16777216; // 16M | |||
| 31 | 31 | ||
| 32 | ge::graphStatus SwishGradTiling::SetTilingData() const | 32 | ge::graphStatus SwishGradTiling::SetTilingData() const |
| 33 | { | 33 | { |
| 34 | - OP_LOGD(tilingContext->GetNodeName(), "SwishGradTiling SetTilingData enter."); | ||
| 35 | - | ||
| 36 | size_t* currentWorkspace = tilingContext->GetWorkspaceSizes(1); | 34 | size_t* currentWorkspace = tilingContext->GetWorkspaceSizes(1); |
| 37 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, currentWorkspace); | 35 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, currentWorkspace); |
| 38 | currentWorkspace[0] = ASCEND_WORKSPACE; | 36 | currentWorkspace[0] = ASCEND_WORKSPACE; |
| @@ -129,7 +127,6 @@ ge::graphStatus SwishGradTiling::CalcOutputDtype() | |||
| 129 | 127 | ||
| 130 | ge::graphStatus SwishGradTiling::SetAttr() | 128 | ge::graphStatus SwishGradTiling::SetAttr() |
| 131 | { | 129 | { |
| 132 | - OP_LOGD(tilingContext->GetNodeName(), "SwishGradTiling SetAttr enter."); | ||
| 133 | auto attrs = tilingContext->GetAttrs(); | 130 | auto attrs = tilingContext->GetAttrs(); |
| 134 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, attrs); | 131 | OP_CHECK_NULL_WITH_CONTEXT(tilingContext, attrs); |
| 135 | const float* scaleValueAttr = attrs->GetAttrPointer<float>(0); | 132 | const float* scaleValueAttr = attrs->GetAttrPointer<float>(0); |
| @@ -141,8 +138,6 @@ ge::graphStatus SwishGradTiling::SetAttr() | |||
| 141 | 138 | ||
| 142 | ge::graphStatus SwishGradTiling::RunTiling() | 139 | ge::graphStatus SwishGradTiling::RunTiling() |
| 143 | { | 140 | { |
| 144 | - OP_LOGD(tilingContext->GetNodeName(), "SwishGradTiling RunTiling enter."); | ||
| 145 | - | ||
| 146 | ElewiseBaseTiling elewiseBaseTiling(tilingContext); | 141 | ElewiseBaseTiling elewiseBaseTiling(tilingContext); |
| 147 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "get input dtype failed"), | 142 | OP_CHECK_IF(CalcInputDtype() == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "get input dtype failed"), |
| 148 | return ge::GRAPH_FAILED); | 143 | return ge::GRAPH_FAILED); |
| @@ -173,7 +168,9 @@ ge::graphStatus SwishGradTiling::RunTiling() | |||
| 173 | "The dtype of grad_x must be DT_FLOAT16, DT_BF16 or DT_FLOAT"); | 168 | "The dtype of grad_x must be DT_FLOAT16, DT_BF16 or DT_FLOAT"); |
| 174 | return ge::GRAPH_FAILED; | 169 | return ge::GRAPH_FAILED; |
| 175 | } | 170 | } |
| 176 | - OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, OP_LOGE(tilingContext, "elewiseBaseTiling failed"), | 171 | + OP_CHECK_IF(baseTilingResult == ge::GRAPH_FAILED, |
| 172 | + OP_LOGE(tilingContext->GetNodeName(), "elewiseBaseTiling failed, output dtype: %s.", | ||
| 173 | + ge::TypeUtils::DataTypeToSerialString(this->outputDtype).c_str()), | ||
| 177 | return ge::GRAPH_FAILED); | 174 | return ge::GRAPH_FAILED); |
| 178 | 175 | ||
| 179 | return SetTilingData(); | 176 | return SetTilingData(); |
| @@ -193,4 +190,4 @@ static ge::graphStatus TilingPrepareForSwishGrad([[maybe_unused]] gert::TilingPa | |||
| 193 | } | 190 | } |
| 194 | 191 | ||
| 195 | IMPL_OP_OPTILING(SwishGrad).Tiling(Tiling4SwishGrad).TilingParse<ElewiseCompileInfo>(TilingPrepareForSwishGrad); | 192 | IMPL_OP_OPTILING(SwishGrad).Tiling(Tiling4SwishGrad).TilingParse<ElewiseCompileInfo>(TilingPrepareForSwishGrad); |
| 196 | -} // namespace optiling | 193 | +} // namespace optiling |