Repository navigation
[Triton] [ATOM] MXFP8 GEMM and A8W4 MOE optimization - #3292
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
* add fused_gemm_a16w16_copy_x, remove near-moe torch.to and torch.zeros kernels * tunning * revert fill(0) change
bbaece4 to
7a0832e
Compare
brunomazzottiamd
left a comment
There was a problem hiding this comment.
Shao, I'm publishing a partial review. I still need to check the kernels in aiter/ops/triton/_triton_kernels and the tests in op_tests/triton_tests. I've just checked the wrappers and the config files. I can review the rest tomorrow.
brunomazzottiamd
left a comment
There was a problem hiding this comment.
Shao, I can't see anything wrong with this PR. Furthermore, I trust Lukasz a lot and he approved the PR!
However, I have some minor requests for you:
- Standardize
tl.dotform toacc = tl.dot(..., acc=acc). - Reason about
fp16test cases: Do we really need them or is it fine to keep justbf16cases? - Try to avoid CPU assertions in unit tests, if possible.
I've left other comments as well, but I think they aren't blockers for merging. Address them at your own judgement.
brunomazzottiamd
left a comment
There was a problem hiding this comment.
Approved! The comments from my previous review (#3292 (review)) should be addressed in a new PR.
…mm_a8w8_blockscale Both benchmarks crash before printing a single result on current main. bench_moe_gemm_int8_smoothquant passes add_residual=False to moe_gemm_int8_smoothquant, but the MXFP8 GEMM and A8W4 MoE optimization (#3292) renamed that argument to swiglu_add_residual. The meaning is unchanged: both compute s * (linear + 1) when set. The call now fails with "unexpected keyword argument 'add_residual'". bench_moe_gemm_a8w8_blockscale builds the routing GEMM inputs in fp32 (xg = x.to(torch.float32), and wg with the default dtype) and passes them to gemm_a16w16. Since #4860, gemm_a16w16 asserts fp16/bf16 activations and weights. Build both in bf16, as bench_moe_gemm_a8w8 and bench_moe_gemm_int8_smoothquant already do.
…mm_a8w8_blockscale (#6071) Both benchmarks crash before printing a single result on current main. bench_moe_gemm_int8_smoothquant passes add_residual=False to moe_gemm_int8_smoothquant, but the MXFP8 GEMM and A8W4 MoE optimization (#3292) renamed that argument to swiglu_add_residual. The meaning is unchanged: both compute s * (linear + 1) when set. The call now fails with "unexpected keyword argument 'add_residual'". bench_moe_gemm_a8w8_blockscale builds the routing GEMM inputs in fp32 (xg = x.to(torch.float32), and wg with the default dtype) and passes them to gemm_a16w16. Since #4860, gemm_a16w16 asserts fp16/bf16 activations and weights. Build both in bf16, as bench_moe_gemm_a8w8 and bench_moe_gemm_int8_smoothquant already do.
This PR is co-authored by @azaidy and @k50112113
This PR includes: