Optimize rmsnorm/layernorm to get better performance than aiter/triton
Motivation
Optimize rmsnorm/layernorm to get better performance than aiter/triton
Technical Details
Test Plan
Test Result
Submission Checklist
CI failed @cschenjunlin
@cschenjunlin Test coverage: both _get_*_configs() now default to only (32768, 8192, "bf16"), with f32/f16, small-N, and unaligned-tail cases commented out. The generic/scalar path (which this PR also modified, e.g. xscale dtype) and f32/f16 are no longer exercised in CI. Suggest keeping at least one unaligned-N and one f32 case active.
Large default shape: 32768x8192 bf16 (~512MB/tensor, several for fused-add-quant) runs in the default non-large flow since these tests are only l2_device/rocm_lower, not large_shape (MI runs took 45-59 min). Consider a small fast-path shape for correctness + a large_shape-marked big shape for perf.
@cschenjunlin Test coverage: both
_get_*_configs()now default to only(32768, 8192, "bf16"), with f32/f16, small-N, and unaligned-tail cases commented out. The generic/scalar path (which this PR also modified, e.g. xscale dtype) and f32/f16 are no longer exercised in CI. Suggest keeping at least one unaligned-N and one f32 case active.Large default shape:
32768x8192bf16 (~512MB/tensor, several for fused-add-quant) runs in the default non-large flow since these tests are onlyl2_device/rocm_lower, notlarge_shape(MI runs took 45-59 min). Consider a small fast-path shape for correctness + alarge_shape-marked big shape for perf.
Thanks much for suggestions. In the latest commit, I have already uncommented the f32/f16, small-N, and unaligned-tail cases, and split large shape out for separate testing.
Merged. Thanks @cschenjunlin . We can try integrating into aiter and compare with the hip version.