Skip to content

Commit

Permalink
Update unfused_attention_kernels.cu
Browse files Browse the repository at this point in the history
fix bug of softmax kernel
  • Loading branch information
byshiue authored Apr 20, 2023
1 parent adb21c3 commit d7ccf83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fastertransformer/kernels/unfused_attention_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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) { \
Expand Down

0 comments on commit d7ccf83

Please sign in to comment.