Skip to main content

Mojo function

split_smem

split_smem[first_size: Int, second_size: Int, first_dtype: DType, second_dtype: DType](tensor: TileTensor[tensor.dtype, tensor.LayoutType, tensor.origin, address_space=AddressSpace.SHARED, linear_idx_type=tensor.linear_idx_type, element_size=tensor.element_size]) -> Tuple[TileTensor[first_dtype, Layout[ComptimeInt[first_size], ComptimeInt[1]], MutAnyOrigin, address_space=AddressSpace.SHARED], TileTensor[second_dtype, Layout[ComptimeInt[second_size], ComptimeInt[1]], MutAnyOrigin, address_space=AddressSpace.SHARED]]

Split a shared memory tensor into two TileTensors at the boundary of first_size elements.

TMA only uses .ptr — flat row_major layout avoids needing InternalLayout equivalents of swizzled layouts.

Returns:

Tuple

Was this page helpful?