mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-27 20:25:09 -04:00
Merge pull request #821 from ngc92/out-of-bounds-bugfix
fix out-of-bounds access in rmsnorm kernel
This commit is contained in:
commit
5c17e4e256
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue