Commit 98b1a3c
docs: porting a kernel means porting its arithmetic, not just its signature
The CPU layernorm matched the CUDA slot's arguments, shapes and accumulation
semantics exactly, and its header comment said it ported the CUDA kernel. It
still returned NaN on every CLIP text row, because it computed the variance as
E[x^2] - E[x]^2 while CUDA summed squared deviations. Nothing in the conventions
said the numerics had to match — only the contract — so the divergence was
invisible to review and, since the parity tests skip without a GPU, invisible to
CI on a CPU-only machine.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5855d97 commit 98b1a3c
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
0 commit comments