Browse Source

!12497 fix bias add ub fusion

From: @jjfeing
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
ba351d9648
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc

+ 6
- 4
mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_build.cc View File

@@ -1084,12 +1084,14 @@ std::string TbeKernelBuild::GetNodeFusionType(const mindspore::CNodePtr &cnode)
{kDepthwiseConv2dNativeOpName, "DepthwiseConvolution"},
{kAddNOpName, "ElemWise"},
{kReluGradV2OpName, "ElemWise"},
{kRealDivOpName, "ElemWise"}};
{kRealDivOpName, "ElemWise"},
{kBiasAddOpName, "BiasAdd"}};
auto find = fusion_type_map.find(node_type);
if (find == fusion_type_map.end()) {
MS_LOG(INFO) << "Fusion warning: get node fusion type failed, origin node type: " << node_type
<< " return null string.";
return "";
MS_LOG(INFO) << "Fusion warning: get node fusion type failed from lists, origin node type: " << node_type;
auto op_info = mindspore::kernel::tbe::TbeDynamicShapeUtil::FindOp(node_type, cnode);
MS_EXCEPTION_IF_NULL(op_info);
return op_info->fusion_type();
} else {
return find->second;
}


Loading…
Cancel
Save