[GH-ISSUE #180] Question about the sf layout #105

Closed
opened 2026-10-26 21:12:40 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @ispobock on GitHub (Aug 29, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/180

This function is checking if the sf layout is MN-major:
github.com/deepseek-ai/DeepGEMM@ea9c5d9270/csrc/utils/layout.hpp (L81)

It asserts stride(-2)==1, that means MN is the contiguous axis. IIRC, the contiguous axis is the minor axis, not the major axis (which changes the slowest).
github.com/deepseek-ai/DeepGEMM@ea9c5d9270/csrc/utils/layout.hpp (L85)

cc: @RayWang96 @LyricZhao

Originally created by @ispobock on GitHub (Aug 29, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/180 This function is checking if the sf layout is MN-major: https://github.com/deepseek-ai/DeepGEMM/blob/ea9c5d9270226c5dd7a577c212e9ea385f6ef048/csrc/utils/layout.hpp#L81 It asserts `stride(-2)==1`, that means MN is the contiguous axis. IIRC, the contiguous axis is the minor axis, not the major axis (which changes the slowest). https://github.com/deepseek-ai/DeepGEMM/blob/ea9c5d9270226c5dd7a577c212e9ea385f6ef048/csrc/utils/layout.hpp#L85 cc: @RayWang96 @LyricZhao
Author
Owner

@RayWang96 commented on GitHub (Sep 1, 2025):

We adopted the terminology in CUTLASS 3.0. For details, please see the doc at:

https://docs.nvidia.com/cutlass/media/docs/cpp/cutlass_3x_backwards_compatibility.html

Image
<!-- gh-comment-id:3240980107 --> @RayWang96 commented on GitHub (Sep 1, 2025): We adopted the terminology in CUTLASS 3.0. For details, please see the doc at: https://docs.nvidia.com/cutlass/media/docs/cpp/cutlass_3x_backwards_compatibility.html <img width="1600" height="654" alt="Image" src="https://github.com/user-attachments/assets/d1927bc9-dcba-4985-b8cc-340d3e47a6d2" />
Author
Owner

@ispobock commented on GitHub (Sep 1, 2025):

Thanks for the clarification! That makes sense to me.

<!-- gh-comment-id:3242521462 --> @ispobock commented on GitHub (Sep 1, 2025): Thanks for the clarification! That makes sense to me.
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#105
No description provided.