Commit a09d5f88 authored by Nick Korovaiko's avatar Nick Korovaiko Committed by Scott Cyphers

Give Fusions Names (#2178)

* give fusions names

* fix build breaks

* fix perms
parent 06916cbc
......@@ -137,7 +137,8 @@ void ngraph::pass::ConstantFolding::construct_constant_pad()
return false;
};
auto pad_matcher = make_shared<pattern::Matcher>(pad, constant_pad_callback);
auto pad_matcher =
make_shared<pattern::Matcher>(pad, constant_pad_callback, "ConstantFolding.ConstantPad");
this->add_matcher(pad_matcher);
}
......@@ -185,7 +186,8 @@ void ngraph::pass::ConstantFolding::construct_constant_reshape()
return false;
};
auto reshape_matcher = make_shared<pattern::Matcher>(reshape, constant_reshape_callback);
auto reshape_matcher = make_shared<pattern::Matcher>(
reshape, constant_reshape_callback, "ConstantFolding.ConstantReshape");
this->add_matcher(reshape_matcher);
}
......@@ -250,7 +252,8 @@ void ngraph::pass::ConstantFolding::construct_constant_broadcast()
return false;
};
auto broadcast_matcher = make_shared<pattern::Matcher>(broadcast, constant_broadcast_callback);
auto broadcast_matcher = make_shared<pattern::Matcher>(
broadcast, constant_broadcast_callback, "ConstantFolding.ConstantBroadcast");
this->add_matcher(broadcast_matcher);
}
......@@ -374,7 +377,8 @@ void ngraph::pass::ConstantFolding::construct_constant_binary()
return false;
};
auto reshape_matcher = make_shared<pattern::Matcher>(bea, constant_binary_callback);
auto reshape_matcher = make_shared<pattern::Matcher>(
bea, constant_binary_callback, "ConstantFolding.ConstantBinary");
this->add_matcher(reshape_matcher);
}
......@@ -464,7 +468,8 @@ void ngraph::pass::ConstantFolding::construct_constant_unary()
return false;
};
auto reshape_matcher = make_shared<pattern::Matcher>(uea, constant_unary_callback);
auto reshape_matcher = make_shared<pattern::Matcher>(
uea, constant_unary_callback, "ConstantFolding.ConstantUnary");
this->add_matcher(reshape_matcher);
}
......@@ -536,7 +541,8 @@ void ngraph::pass::ConstantFolding::construct_constant_dequantize()
return false;
};
auto dequantize_matcher = make_shared<pattern::Matcher>(dequant, constant_dequantize_callback);
auto dequantize_matcher = make_shared<pattern::Matcher>(
dequant, constant_dequantize_callback, "ConstantFolding.ConstantDequantize");
this->add_matcher(dequantize_matcher);
}
......@@ -610,6 +616,7 @@ void ngraph::pass::ConstantFolding::construct_constant_quantize()
return false;
};
auto quantize_matcher = make_shared<pattern::Matcher>(quant, constant_quantize_callback);
auto quantize_matcher = make_shared<pattern::Matcher>(
quant, constant_quantize_callback, "ConstantFolding.ConstantQuantize");
this->add_matcher(quantize_matcher);
}
......@@ -80,7 +80,7 @@ void pass::CoreFusion::construct_relu()
return true;
};
auto m = make_shared<pattern::Matcher>(max, callback);
auto m = make_shared<pattern::Matcher>(max, callback, "CoreFusion.Relu");
this->add_matcher(m);
}
......@@ -123,7 +123,8 @@ void pass::CoreFusion::construct_sigmoid()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(divide_1_over_exp, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
divide_1_over_exp, callback, "CoreFusion.Sigmoid");
this->add_matcher(m);
}
......@@ -175,7 +176,8 @@ void pass::CoreFusion::construct_sigmoid_bprop()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(negtive_2, callback);
auto m =
std::make_shared<ngraph::pattern::Matcher>(negtive_2, callback, "CoreFusion.SigmoidBprop");
this->add_matcher(m);
}
......@@ -256,7 +258,7 @@ void pass::CoreFusion::construct_folded_batch_norm()
};
auto m = std::make_shared<ngraph::pattern::Matcher>(bn, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(bn, callback, "CoreFusion.FoldedBatchNorm");
this->add_matcher(m);
}
......@@ -367,7 +369,8 @@ void pass::CoreFusion::construct_conv_affine_folding()
};
auto m = std::make_shared<ngraph::pattern::Matcher>(add, callback);
auto m =
std::make_shared<ngraph::pattern::Matcher>(add, callback, "CoreFusion.ConvAffineFolding");
this->add_matcher(m);
}
......@@ -615,6 +618,7 @@ void pass::CoreFusion::construct_optimized_strided_conv()
return true;
};
auto m = make_shared<pattern::Matcher>(eltwise_conv, callback);
auto m =
make_shared<pattern::Matcher>(eltwise_conv, callback, "CoreFusion.OptimizedStridedConv");
this->add_matcher(m);
}
......@@ -158,7 +158,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_matmulbias()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(padd, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(padd, callback, "CPUFusion.MatMulBias");
this->add_matcher(m);
}
......@@ -231,7 +231,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_matmul()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(pdot, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(pdot, callback, "CPUFusion.MatMul");
this->add_matcher(m);
}
......@@ -328,7 +328,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_fprop_bn()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(add_beta, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(add_beta, callback, "CPUFusion.FpropBN");
this->add_matcher(m);
}
......@@ -472,7 +472,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_zero_padded_reshaped_conv(
return true;
};
this->add_matcher(std::make_shared<ngraph::pattern::Matcher>(conv_label, callback));
this->add_matcher(std::make_shared<ngraph::pattern::Matcher>(
conv_label, callback, "CPUFusion.ZeroPaddedReshapedConv"));
}
void ngraph::runtime::cpu::pass::CPUFusion::construct_zero_padded_conv()
......@@ -541,7 +542,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_zero_padded_conv()
return true;
};
this->add_matcher(std::make_shared<ngraph::pattern::Matcher>(conv_label, callback));
this->add_matcher(std::make_shared<ngraph::pattern::Matcher>(
conv_label, callback, "CPUFusion.ZeroPaddedConv"));
}
void ngraph::runtime::cpu::pass::CPUFusion::construct_zero_padded_conv_backprop_filters()
......@@ -613,7 +615,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_zero_padded_conv_backprop_
return true;
};
this->add_matcher(std::make_shared<ngraph::pattern::Matcher>(conv_label, callback));
this->add_matcher(std::make_shared<ngraph::pattern::Matcher>(
conv_label, callback, "CPUFusion.ZeroPaddedConvBackpropFilters"));
}
void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias()
......@@ -667,7 +670,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(p_conv_bias, callback);
auto m =
std::make_shared<ngraph::pattern::Matcher>(p_conv_bias, callback, "CPUFusion.ConvBias");
this->add_matcher(m);
}
......@@ -749,7 +753,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias_bprop()
return false;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(conv_bprop_filter, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
conv_bprop_filter, callback, "CPUFusion.ConvBiasBprop");
this->add_matcher(m);
}
......@@ -812,7 +817,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_batch_norm_relu()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(prelu, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(prelu, callback, "CPUFusion.BatchNormRelu");
this->add_matcher(m);
}
......@@ -874,7 +879,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_batch_norm_relu_global_sta
return false;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(prelu, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
prelu, callback, "CPUFusion.BatchNormReluGlobalStats");
this->add_matcher(m);
}
......@@ -917,7 +923,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_relu()
return true;
};
auto m = std::make_shared<pattern::Matcher>(prelu, callback);
auto m = std::make_shared<pattern::Matcher>(prelu, callback, "CPUFusion.ConvRelu");
this->add_matcher(m);
}
......@@ -967,7 +973,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias_relu()
return true;
};
auto m = std::make_shared<pattern::Matcher>(prelu, callback);
auto m = std::make_shared<pattern::Matcher>(prelu, callback, "CPUFusion.ConvBiasRelu");
this->add_matcher(m);
}
......@@ -1033,7 +1039,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_add()
return true;
};
auto m = std::make_shared<pattern::Matcher>(padd, callback, "conv_add");
auto m = std::make_shared<pattern::Matcher>(padd, callback, "CPUFusion.ConvAdd");
this->add_matcher(m);
}
......@@ -1082,7 +1088,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_add_relu()
return true;
};
auto m = std::make_shared<pattern::Matcher>(prelu, callback, "conv_add_relu");
auto m = std::make_shared<pattern::Matcher>(prelu, callback, "CPUFusion.ConvAddRelu");
this->add_matcher(m);
}
......@@ -1151,7 +1157,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias_add()
return true;
};
auto m = std::make_shared<pattern::Matcher>(padd, callback, "conv_bias_add");
auto m = std::make_shared<pattern::Matcher>(padd, callback, "CPUFusion.ConvBiasAdd");
this->add_matcher(m);
}
......@@ -1214,7 +1220,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias_add_relu()
return true;
};
auto m = std::make_shared<pattern::Matcher>(prelu, callback, "conv_bias_add_relu");
auto m = std::make_shared<pattern::Matcher>(prelu, callback, "CPUFusion.ConvBiasAddRelu");
this->add_matcher(m);
}
......@@ -1335,7 +1341,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_leaky_relu()
return true;
};
auto m = std::make_shared<pattern::Matcher>(leaky_relu, callback);
auto m = std::make_shared<pattern::Matcher>(leaky_relu, callback, "CPUFusion.LeakyRelu");
this->add_matcher(m);
}
void ngraph::runtime::cpu::pass::CPUFusion::construct_bounded_relu()
......@@ -1387,7 +1393,7 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_bounded_relu()
return true;
};
auto m = std::make_shared<pattern::Matcher>(min, callback);
auto m = std::make_shared<pattern::Matcher>(min, callback, "CPUFusion.BoundedRelu");
this->add_matcher(m);
}
......@@ -1467,7 +1473,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias_folded_batch_nor
};
auto m = std::make_shared<ngraph::pattern::Matcher>(bn, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
bn, callback, "CPUFusion.ConvBiasFoldedBatchNorm");
this->add_matcher(m);
}
......@@ -1594,7 +1601,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_conv_bias_affine_folding()
};
auto m = std::make_shared<ngraph::pattern::Matcher>(multiply, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
multiply, callback, "CPUFusion.ConvBiasAffineFolding");
this->add_matcher(m);
}
......@@ -1689,7 +1697,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::construct_groupconv_batchnorm_global
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(bn, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
bn, callback, "CPUFusion.GroupconvBatchNormGlobalStatsFolding");
this->add_matcher(m);
}
......@@ -1751,7 +1760,8 @@ void ngraph::runtime::cpu::pass::CPUFusion::
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(prelu, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
prelu, callback, "CPUFusion.GroupconvBatchNormGlobalStatsFoldingRelu");
this->add_matcher(m);
}
......
......@@ -188,6 +188,7 @@ void ngraph::runtime::cpu::pass::CPUHorizontalFusion::cpu_conv_horizontal_fusion
return true;
};
auto m = make_shared<pattern::Matcher>(conv_bias, callback);
auto m = make_shared<pattern::Matcher>(
conv_bias, callback, "CPUHorizontalFusion.CpuConvHorizontalFusion");
this->add_matcher(m);
}
......@@ -116,7 +116,8 @@ void ngraph::runtime::cpu::pass::CPUPostLayoutOptimizations::construct_weight_fu
return true;
};
auto m = make_shared<pattern::Matcher>(conv, callback);
auto m = make_shared<pattern::Matcher>(
conv, callback, "CPUPostLayoutOptimizations.ConstructWeight_fusion");
this->add_matcher(m);
}
......@@ -167,7 +168,8 @@ void ngraph::runtime::cpu::pass::CPUPostLayoutOptimizations::construct_slice_con
return true;
};
auto m = make_shared<pattern::Matcher>(cvt_lt, callback);
auto m = make_shared<pattern::Matcher>(
cvt_lt, callback, "CPUPostLayoutOptimizations.ConstructSliceConvertLayoutFusion");
this->add_matcher(m);
}
......@@ -260,6 +262,7 @@ void ngraph::runtime::cpu::pass::CPUPostLayoutOptimizations::
return true;
};
auto m = make_shared<pattern::Matcher>(cvt_lt, callback);
auto m = make_shared<pattern::Matcher>(
cvt_lt, callback, "CPUPostLayoutOptimizations.ConstructReshapeConvertLayoutFusion");
this->add_matcher(m);
}
......@@ -97,7 +97,8 @@ void ngraph::runtime::cpu::pass::LSTMFusion::construct_sigmoid()
return true;
};
auto m = std::make_shared<ngraph::pattern::Matcher>(divide_1_over_exp, callback);
auto m = std::make_shared<ngraph::pattern::Matcher>(
divide_1_over_exp, callback, "LSTMFusion.Sigmoid");
this->add_matcher(m);
}
......@@ -311,7 +312,7 @@ void ngraph::runtime::cpu::pass::LSTMFusion::construct_lstm_fprop()
ngraph::replace_node(m.get_match_root(), ht_slice);
return true;
};
auto m = std::make_shared<pattern::Matcher>(ht, callback);
auto m = std::make_shared<pattern::Matcher>(ht, callback, "LSTMFusion.Fprop");
this->add_matcher(m);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment