!12497 fix bias add ub fusion

From: @jjfeing
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
This commit is contained in:
mindspore-ci-bot 2021-02-22 17:03:46 +08:00 committed by Gitee
commit ba351d9648
1 changed files with 6 additions and 4 deletions

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;
}