diff --git a/paddle/fluid/framework/ir/graph_pattern_detector.cc b/paddle/fluid/framework/ir/graph_pattern_detector.cc index e811475dd83e9c8145bef60a39570b8dfe358de1..b0792ee0812c96eda9d3644d1b157168643f3448 100644 --- a/paddle/fluid/framework/ir/graph_pattern_detector.cc +++ b/paddle/fluid/framework/ir/graph_pattern_detector.cc @@ -2243,8 +2243,12 @@ PDNode *patterns::PriorBox::operator()() { return boxes_var; } +#if CUDNN_VERSION >= 8000 std::unordered_set conv_act_set( {"identity", "relu", "sigmoid", "tanh"}); +#else +std::unordered_set conv_act_set({"identity", "relu"}); +#endif PDNode *patterns::ConvElementwiseaddAct::operator()(PDNode *conv_in) { conv_in->AsInput();