FlyDSL icon indicating copy to clipboard operation
FlyDSL copied to clipboard

Optimize rmsnorm/layernorm to get better performance than aiter/triton

Open cschenjunlin opened this issue 6 months ago • 1 comments

Motivation

Optimize rmsnorm/layernorm to get better performance than aiter/triton

Technical Details

Test Plan

Test Result

Submission Checklist

cschenjunlin avatar Jun 02 '26 08:06 cschenjunlin

CI failed @cschenjunlin

coderfeli avatar Jun 16 '26 13:06 coderfeli

@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.

coderfeli avatar Jun 17 '26 15:06 coderfeli

@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.

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.

cschenjunlin avatar Jun 22 '26 10:06 cschenjunlin

Merged. Thanks @cschenjunlin . We can try integrating into aiter and compare with the hip version.

coderfeli avatar Jun 22 '26 14:06 coderfeli