[GH-ISSUE #289] Question about the scale factor layout #145

Closed
opened 2026-10-26 21:13:40 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Yyf1023 on GitHub (Feb 27, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/289

Recently I am reading the code of sm100 fp8 GEMM. I have a question:
Why must the scale factor be MN-major? Is it because this provides better performance or is it due to hardware constraints? Thank you for your reply.

Originally created by @Yyf1023 on GitHub (Feb 27, 2026). Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/289 Recently I am reading the code of sm100 fp8 GEMM. I have a question: Why must the scale factor be MN-major? Is it because this provides better performance or is it due to hardware constraints? Thank you for your reply.
Author
Owner

@zheanxu commented on GitHub (Apr 17, 2026):

Hi! This is because every time TMA loads the scale factors, it needs to load a tile of block_m * 1 or block_n * 1. This requires the scale factor data to be contiguous along the M or N dimension, hence the MN-major layout requirement.

<!-- gh-comment-id:4264896766 --> @zheanxu commented on GitHub (Apr 17, 2026): Hi! This is because every time TMA loads the scale factors, it needs to load a tile of `block_m * 1` or `block_n * 1`. This requires the scale factor data to be contiguous along the M or N dimension, hence the MN-major layout requirement.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#145
No description provided.