From 7972c8df530cdc4600bd04d1caadcedc26ceefeb Mon Sep 17 00:00:00 2001 From: PaddlePaddle-Gardener Date: Tue, 20 Apr 2021 15:44:59 +0800 Subject: [PATCH] mirgate_31998 --- paddle/fluid/operators/math/depthwise_conv.cu | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/operators/math/depthwise_conv.cu b/paddle/fluid/operators/math/depthwise_conv.cu index 7439a959d3..d116b620dc 100644 --- a/paddle/fluid/operators/math/depthwise_conv.cu +++ b/paddle/fluid/operators/math/depthwise_conv.cu @@ -613,6 +613,9 @@ class DepthwiseConvFunctor 512 && output_width <= 1024) thread = output_width; +#ifdef __HIPCC__ + thread = std::min(thread, 256); +#endif int blocks = std::min(std::max(thread / output_width, 1), output_height); dim3 threads(std::min(output_width, thread), blocks, 1); dim3 grid(output_channels, batch_size, 1); @@ -620,7 +623,13 @@ class DepthwiseConvFunctor