Repository navigation
Add Layer Norm Backward challenge (medium #144) - #353
kunal-mansukhani merged 1 commit into
Conversation
|
Thanks @programmingGod-byte! Verified the reference against float64 autograd on every test (max error 2.6e-3 on the 16384x4096 perf case, well inside 1e-3 rtol), and lint, validation and Mojo 1.1 format are all clean. Merged as medium #144, and it's live at https://leetgpu.com/challenges/layer-norm-backward. Nice addition to the normalization set. |
|
Reviewed against the CLAUDE.md checklist. Everything passes: the HTML structure, the example matches There was one small checklist gap: the test comments didn't say which mistake each case catches. I've fixed that in #354, which changes comments only. Looks good to merge with that. 🤖 Generated with Claude Code |
Summary
Adds Layer Normalization Backward (Medium #144) to complete the transformer normalization suite alongside #113 (LayerNorm forward), #142 (RMSNorm backward), and #143 (Fused Residual Add + LayerNorm with saved statistics).
Challenge Overview
x,gamma, savedmean,rstd, and upstream gradientdyof shape(N, C), computes the input gradientdxof shape(N, C)and parameter gradientsdgammaanddbetaof shape(C,).Test Coverage
Includes 11 targeted test cases:
123.0to ensure uninitialized atomic accumulation fails.Files Included
challenges/medium/144_layer_norm_backward/challenge.htmlchallenges/medium/144_layer_norm_backward/challenge.py.cu,.triton.py,.pytorch.py,.jax.py,.cute.py,.mojoValidation
python scripts/validate_challenges.py: 0 errors, 0 warningsblackandclang-format.