Skip to content

Commit 5c17e4e

Browse files
authored
Merge pull request #821 from ngc92/out-of-bounds-bugfix
fix out-of-bounds access in rmsnorm kernel
2 parents d36f0e6 + 9c60616 commit 5c17e4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llmc/rmsnorm.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ __global__ void fused_residual_rmsnorm_forward_kernel5(floatX* residual, floatX*
9090
__syncthreads();
9191

9292
int idx = blockIdx.x * blockDim.y + threadIdx.y;
93-
if(idx > N) return;
93+
if(idx >= N) return;
9494

9595
// adjust pointers to current token
9696
residual += C * idx;

0 commit comments

Comments
 (0)