IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

load_AB

def load_AB[a_type: DType, b_type: DType, a_scales_type: DType, a_tile_shape: Coord[a_tile_shape.element_types], a_desc_shape: Coord[a_desc_shape.element_types], b_tile_shape: Coord[b_tile_shape.element_types], b_desc_shape: Coord[b_desc_shape.element_types], a_scales_tile_shape: Coord[a_scales_tile_shape.element_types], a_scales_desc_shape: Coord[a_scales_desc_shape.element_types], num_pipeline_stages: Int, expert_ids_layout: TensorLayout, /, *, a_smem_layout: Layout, b_smem_layout: Layout, a_scales_smem_layout: Layout, block_tile_shape: IndexList[Int(3)], mma_shape: IndexList[Int(3)], cta_group: Int = Int(1)](a_tma_op: TMATensorTile[a_type, a_tile_shape, a_desc_shape], b_tma_op: TMATensorTile[b_type, b_tile_shape, b_desc_shape], a_scales_tma_op: TMATensorTile[a_scales_type, a_scales_tile_shape, a_scales_desc_shape], a_smem_base: Pointer[Scalar[a_type], address_space=AddressSpace.SHARED], b_smem_base: Pointer[Scalar[b_type], address_space=AddressSpace.SHARED], a_scales_smem_base: Pointer[Scalar[a_scales_type], address_space=AddressSpace.SHARED], load_mma_pipeline: ProducerConsumerPipeline[num_pipeline_stages], peer_cta_coord: Tuple[Int, Int, Int], work_tile_coord: Tuple[Int, Int], a_multicast_mask: UInt16, b_multicast_mask: UInt16, iter_idx: Int, elect_one_cta: Bool, scheduler: TileScheduler[static_MN=scheduler.static_MN, tile_shape=scheduler.tile_shape, cluster=scheduler.cluster, cta_group=scheduler.cta_group, swizzle=scheduler.swizzle, swapAB=scheduler.swapAB], expert_ids: TileTensor[.int32, expert_ids_layout, ImmutAnyOrigin])

Issues multicast TMA loads for A, B, and A scales into the producer stage of the load-MMA pipeline.

Waits for the consumer (MMA) to release the buffer, then launches async multicast TMA copies of A, B, and the matching A scales strip into the current pipeline stage's SMEM and signals completion through the stage's mbarrier.

Parameters:

Args:

Was this page helpful?