From cf8b8f9c5ea41ae30a9cf87e84e748bcc30aefc4 Mon Sep 17 00:00:00 2001 From: Wilber Date: Thu, 18 Feb 2021 22:30:48 -0600 Subject: [PATCH] resolve memory leak in cudnn8.0 (#31029) --- paddle/fluid/inference/api/paddle_pass_builder.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/api/paddle_pass_builder.cc b/paddle/fluid/inference/api/paddle_pass_builder.cc index 107d5119b1..e5c4f3ee4b 100644 --- a/paddle/fluid/inference/api/paddle_pass_builder.cc +++ b/paddle/fluid/inference/api/paddle_pass_builder.cc @@ -96,9 +96,13 @@ const std::vector kTRTSubgraphPasses({ "conv_bn_fuse_pass", // #if CUDNN_VERSION >= 7100 // To run conv_fusion, the version of cudnn must be // guaranteed at least v7 +// cudnn8.0 has memory leak problem in conv + eltwise + act, so we +// disable the pass. +#if !(CUDNN_VERSION >= 8000 && CUDNN_VERSION < 8100) "conv_elementwise_add_act_fuse_pass", // "conv_elementwise_add2_act_fuse_pass", // -#endif // +#endif +#endif "transpose_flatten_concat_fuse_pass", }); @@ -228,7 +232,7 @@ void CpuPassStrategy::EnableMKLDNN() { "batch_norm_act_fuse_pass", // TODO(intel): Please fix the bug on windows. // https://github.com/PaddlePaddle/Paddle/issues/29710 - //"mkldnn_inplace_pass", // This pass should be activated after + // "mkldnn_inplace_pass", // This pass should be activated after // fuses. Disabled by default due to // little gain and lots of problems })) { -- GitLab