From b5dd12fb1216ff5146d5dc79fb4f18edd9ef5919 Mon Sep 17 00:00:00 2001 From: Yanxing Shi <48111042+Yanxing-Shi@users.noreply.github.com> Date: Wed, 8 Dec 2021 11:33:32 +0800 Subject: [PATCH] fix softmax max dim (#37901) --- paddle/fluid/operators/softmax_cudnn_op.cu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/softmax_cudnn_op.cu.h b/paddle/fluid/operators/softmax_cudnn_op.cu.h index c538fbade8a..533488896df 100644 --- a/paddle/fluid/operators/softmax_cudnn_op.cu.h +++ b/paddle/fluid/operators/softmax_cudnn_op.cu.h @@ -449,7 +449,7 @@ void SoftmaxForwardCUDAKernelDriver(const platform::CUDADeviceContext& dev_ctx, const int N = SizeToAxis(axis, dims); const int D = SizeOutAxis(axis, dims); - constexpr int max_dim = 320; + constexpr int max_dim = 512; constexpr int warps_per_block = 4; if (D == 1 && dim <= max_dim && sizeof(T) <= 4) { @@ -540,7 +540,7 @@ void SoftmaxBackwardCUDAKernelDriver(const platform::CUDADeviceContext& dev_ctx, const int N = SizeToAxis(axis, dims); const int D = SizeOutAxis(axis, dims); - constexpr int max_dim = 320; + constexpr int max_dim = 512; constexpr int warps_per_block = 4; if (D == 1 && dim <= max_dim && sizeof(T) <= 4) { -- GitLab