提交 a1fa2032 编写于 作者: T Tomasz Patejko

MKLDNN conv + elementwise_add fusion: name of the pass reused with name_scope_

上级 2c43419d
...@@ -54,16 +54,15 @@ void CorrectGraphEdges(Graph* graph, Node* from, Node* to) { ...@@ -54,16 +54,15 @@ void CorrectGraphEdges(Graph* graph, Node* from, Node* to) {
using graph_ptr = std::unique_ptr<ir::Graph>; using graph_ptr = std::unique_ptr<ir::Graph>;
graph_ptr ConvElementwiseAddMKLDNNFusePass::ApplyImpl(graph_ptr graph) const { graph_ptr ConvElementwiseAddMKLDNNFusePass::ApplyImpl(graph_ptr graph) const {
FusePassBase::Init("conv_elementwise_add_mkldnn_fuse_pass", graph.get()); FusePassBase::Init(name_scope_, graph.get());
GraphPatternDetector gpd; GraphPatternDetector gpd;
auto pattern = gpd.mutable_pattern(); auto pattern = gpd.mutable_pattern();
patterns::Conv conv_pattern{pattern, "skip_connections_fusion"}; patterns::Conv conv_pattern{pattern, name_scope_};
auto conv_output = conv_pattern(); auto conv_output = conv_pattern();
patterns::ElementwiseAdd elementwise_add_pattern{pattern, patterns::ElementwiseAdd elementwise_add_pattern{pattern, name_scope_};
"skip_connections_fusion"};
elementwise_add_pattern(conv_output); elementwise_add_pattern(conv_output);
conv_output->AsIntermediate(); conv_output->AsIntermediate();
......
...@@ -30,7 +30,7 @@ class ConvElementwiseAddMKLDNNFusePass : public FusePassBase { ...@@ -30,7 +30,7 @@ class ConvElementwiseAddMKLDNNFusePass : public FusePassBase {
protected: protected:
std::unique_ptr<ir::Graph> ApplyImpl(std::unique_ptr<ir::Graph> graph) const; std::unique_ptr<ir::Graph> ApplyImpl(std::unique_ptr<ir::Graph> graph) const;
const std::string name_scope_{"conv_elementwise_add_mkldnn_fuse_pass"}; const std::string name_scope_{"residual_connections_fuse_pass"};
}; };
} // namespace ir } // namespace ir
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册