mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-28 20:35:09 -04:00
fix error in small typos in matmul_forward.cu
This commit is contained in:
parent
ef7a4867b1
commit
68d2ce0601
1 changed files with 2 additions and 2 deletions
|
|
@ -239,12 +239,12 @@ int main(int argc, char **argv) {
|
|||
printf("%f %f\n", out[i], out_gpu[i]);
|
||||
}
|
||||
// ensure correctness for all elements
|
||||
if (i >= 5 && fabs(out[i] - out_gpu[i]) > 1e-4) {
|
||||
if (fabs(out[i] - out_gpu[i]) > 1e-4) {
|
||||
printf("Mismatch at %d: %f vs %f\n", i, out[i], out_gpu[i]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
printf("Results match at block_size=256!\n");
|
||||
printf("Results match at block_size=1024!\n");
|
||||
|
||||
// time the kernel at different block sizes
|
||||
int sqrt_block_sizes[] = {4, 8, 16, 32};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue