Fix residual gradient in non-learnable LayerNorm backward - #449
Fix residual gradient in non-learnable LayerNorm backward#449rocketbastard wants to merge 2 commits into
Conversation
Move dx_accumulate handling into the Triton backward kernel and add focused numerical unit tests.
Greptile SummaryThe PR fuses residual-gradient accumulation into the non-learnable Triton LayerNorm backward kernel and adds focused numerical coverage.
Confidence Score: 4/5The kernel change appears sound, but the new regression test's unresolved source-tree import should be fixed before merging so it can be collected reliably. The numerical kernel path preserves the intended residual addition, while the new test imports a package that is neither rooted at the repository level nor made visible from the test module. Files Needing Attention: examples/tests/commons/test_triton_layer_norm.py Important Files Changed
Reviews (1): Last reviewed commit: "Add gradient accumulation support in lay..." | Re-trigger Greptile |
| from ops.triton_ops.triton_layer_norm import ( | ||
| triton_weighted_layer_norm_bwd, | ||
| ) |
There was a problem hiding this comment.
|
/build |
|
Hi @rocketbastard could you move the test code to hstu-specific test file ? |
|
❌ Pipeline #63652527 -- failed
Result: 11/16 jobs passed |
Description
Fix residual gradient accumulation in the non-learnable LayerNorm backward path.
dx_accumulateinto the_layer_norm_bwd_dxTriton kernel.dx.add_()operation.Supersedes #447 because the original fork was deleted.
Fixes #446
Testing
The added unit tests passed successfully in the local GPU environment.
Checklist