diff --git a/llmc/rmsnorm.cuh b/llmc/rmsnorm.cuh index 8f20e98..5be05bb 100644 --- a/llmc/rmsnorm.cuh +++ b/llmc/rmsnorm.cuh @@ -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;