|
|
|
@ -86,7 +86,8 @@ const std::vector<std::string> kAnakinSubgraphPasses({
|
|
|
|
|
|
|
|
|
|
GpuPassStrategy::GpuPassStrategy() : PassStrategy({}) {
|
|
|
|
|
passes_.assign({
|
|
|
|
|
"infer_clean_graph_pass", //
|
|
|
|
|
"infer_clean_graph_pass", //
|
|
|
|
|
"runtime_context_cache_pass", //
|
|
|
|
|
// "identity_scale_op_clean_pass", //
|
|
|
|
|
"conv_affine_channel_fuse_pass", //
|
|
|
|
|
"conv_eltwiseadd_affine_channel_fuse_pass", //
|
|
|
|
@ -96,7 +97,6 @@ GpuPassStrategy::GpuPassStrategy() : PassStrategy({}) {
|
|
|
|
|
"conv_elementwise_add_act_fuse_pass", //
|
|
|
|
|
"conv_elementwise_add2_act_fuse_pass", //
|
|
|
|
|
"conv_elementwise_add_fuse_pass", //
|
|
|
|
|
"runtime_context_cache_pass", //
|
|
|
|
|
#endif //
|
|
|
|
|
"transpose_flatten_concat_fuse_pass",
|
|
|
|
|
});
|
|
|
|
@ -116,7 +116,11 @@ CpuPassStrategy::CpuPassStrategy() : PassStrategy({}) {
|
|
|
|
|
// NOTE the large fusions should be located in the front, so that they will
|
|
|
|
|
// not be damaged by smaller ones.
|
|
|
|
|
passes_.assign({
|
|
|
|
|
"infer_clean_graph_pass", //
|
|
|
|
|
"infer_clean_graph_pass", //
|
|
|
|
|
// TODO(luotao): runtime_context_cache_pass should be located in the
|
|
|
|
|
// front, see https://github.com/PaddlePaddle/Paddle/issues/16609,
|
|
|
|
|
// will enhance this pass later.
|
|
|
|
|
"runtime_context_cache_pass", //
|
|
|
|
|
"attention_lstm_fuse_pass", //
|
|
|
|
|
"seqpool_concat_fuse_pass", //
|
|
|
|
|
"seqconv_eltadd_relu_fuse_pass", //
|
|
|
|
@ -132,8 +136,6 @@ CpuPassStrategy::CpuPassStrategy() : PassStrategy({}) {
|
|
|
|
|
"conv_bn_fuse_pass", //
|
|
|
|
|
"conv_eltwiseadd_bn_fuse_pass", //
|
|
|
|
|
"is_test_pass", //
|
|
|
|
|
"identity_scale_op_clean_pass", //
|
|
|
|
|
"runtime_context_cache_pass", //
|
|
|
|
|
});
|
|
|
|
|
use_gpu_ = false;
|
|
|
|
|
}
|
|
|
|
|