For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
smem_descriptor
def smem_descriptor[dtype: DType, //, *, BMN: Int, BK: Int, swizzle_mode: TensorMapSwizzle, is_k_major: Bool, page_dense: Bool = False](ptr: Pointer[Scalar[dtype], address_space=AddressSpace.SHARED, _safe=False]) -> MMASmemDescriptorPair
Creates an MMASmemDescriptorPair for an SM100 MMA operand tile in shared memory.
Selects either K-major or MN-major tile layout based on is_k_major, builds the
canonical descriptor layout, and creates the corresponding pair of SMEM descriptors
used by the SM100 UMMA instructions.
Parameters:
- βdtype (
DType): Element type of the operand. - βBMN (
Int): Block tile size along the M or N dimension. - βBK (
Int): Block tile size along the K dimension. - βswizzle_mode (
TensorMapSwizzle): Swizzle mode for the shared memory access pattern. - βis_k_major (
Bool): When True, uses K-major (A/Q@K') layout; when False, uses MN-major (V/P@V) layout. - βpage_dense (
Bool): When True, selects the page-dense (row-major atoms) variant of the tile layout for the SM100 row-major page-fold path.
Args:
- βptr (
Pointer[Scalar[dtype], address_space=AddressSpace.SHARED, _safe=False]): Pointer into shared memory for the operand tile.
Returns:
MMASmemDescriptorPair: An MMASmemDescriptorPair ready for use with SM100 UMMA instructions.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!