From d7ccf83a15c3fd30020d5007415a9c16e99f5f42 Mon Sep 17 00:00:00 2001 From: byshiue Date: Thu, 20 Apr 2023 08:28:43 +0800 Subject: [PATCH] Update unfused_attention_kernels.cu fix bug of softmax kernel --- src/fastertransformer/kernels/unfused_attention_kernels.cu | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fastertransformer/kernels/unfused_attention_kernels.cu b/src/fastertransformer/kernels/unfused_attention_kernels.cu index 497db4289..d0fb0a197 100644 --- a/src/fastertransformer/kernels/unfused_attention_kernels.cu +++ b/src/fastertransformer/kernels/unfused_attention_kernels.cu @@ -602,6 +602,7 @@ __global__ void softmax_kernel_h2_v2(T* attn_score, #define LAUNCH_MAKSED_SOFTMAX_(T_, ITEMS_PER_THREAD) \ block.x /= ITEMS_PER_THREAD; \ + block.x = (block.x + 31) / 32 * 32; \ assert(block.x <= 1024); \ if (is_half2) { \ if (grid.x % 4 == 0) { \