Merge pull request #821 from ngc92/out-of-bounds-bugfix

fix out-of-bounds access in rmsnorm kernel
This commit is contained in:
Andrej 2025-06-26 10:01:10 -07:00 committed by GitHub
commit 5c17e4e256
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,7 @@ __global__ void fused_residual_rmsnorm_forward_kernel5(floatX* residual, floatX*
__syncthreads();
int idx = blockIdx.x * blockDim.y + threadIdx.y;
if(idx > N) return;
if(idx >= N) return;
// adjust pointers to current token
residual += C * idx;