mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-27 20:25:09 -04:00
fix the 0.0f initialization for double
This commit is contained in:
parent
e991fe1efa
commit
0c92ea9b90
1 changed files with 1 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ void matmul_backward_cpu(float* dinp, float* dweight, float* dbias,
|
|||
__global__ void matmul_backward_bias_kernel_naive(float* dbias, const float* dout, int B, int T, int OC) {
|
||||
int o = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (o < OC) {
|
||||
double sum = ;
|
||||
double sum = 0.0;
|
||||
for (int b = 0; b < B; b++) {
|
||||
for (int t = 0; t < T; t++) {
|
||||
sum += dout[b * T * OC + t * OC + o];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue