Skip to content

Commit 5311bd7

Browse files
committed
[bugfix] fix gpt_cross_attention memseq mismatch with seq
1 parent eb2c504 commit 5311bd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csrc/core/gpt2_cross_softmax.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void launch_cross_softmax_kernel(void *qk_buf_, const int64_t *padding_len, cons
9797
int block_dim_x;
9898

9999
assert(mem_seq_len <= 2048);
100-
if (seq_len <= 128) {
100+
if (mem_seq_len <= 128) {
101101
block_dim_x = min(((mem_seq_len + 31) / 32) * 32, 1024);
102102
cross_softmax_kernel<T><<<grid_dim_x, block_dim_x, 0, stream>>>((T *)qk_buf_, padding_len, head_num, seq_len, mem_seq_len, scalar);
103103
} else {

0 commit comments

Comments
 (0)