Mojo struct
MatmulConfig
@register_passable(trivial)
struct MatmulConfig[a_type: DType, b_type: DType, c_type: DType, transpose_b: Bool = True]
Static configuration of GPU matmul.
Fields
- cta_group (
Int): - mma_shape (
IndexList[3]): - cluster_shape (
IndexList[3]): - AB_swapped (
Bool): - block_swizzle_size (
Int): - raster_order (
RasterOrder): - block_tile_shape (
IndexList[3]): - num_split_k (
Int): - num_pipeline_stages (
UInt): - num_clc_pipeline_stages (
UInt): - num_accum_pipeline_stages (
UInt): - num_output_stages (
UInt): - output_tile_shape (
IndexList[2]): - a_swizzle (
TensorMapSwizzle): - b_swizzle (
TensorMapSwizzle): - c_swizzle (
TensorMapSwizzle): - k_group_size (
UInt):
Implemented traits
AnyType,
Copyable,
EqualityComparable,
Hashable,
ImplicitlyCopyable,
Movable,
Stringable,
UnknownDestructibility,
Writable
Aliases
__copyinit__is_trivial
alias __copyinit__is_trivial = True
__del__is_trivial
alias __del__is_trivial = True
__moveinit__is_trivial
alias __moveinit__is_trivial = True
accum_type
alias accum_type = get_accum_type[a_type]()
Methods
__init__
__init__(*, cta_group: Int = 2, mma_shape: IndexList[3] = get_mma_shape[a_type, MatmulConfig[a_type, b_type, c_type, transpose_b].accum_type](), cluster_shape: IndexList[3] = Index(2, 1, 1), AB_swapped: Bool = False, num_split_k: Int = 1, block_swizzle_size: Int = 0, raster_order: RasterOrder = RasterOrder.AlongM, k_group_size: UInt = 1, num_pipeline_stages: Optional[UInt] = None, num_accum_pipeline_stages: UInt = 2, num_clc_pipeline_stages: UInt = 2) -> Self
__eq__
swap_AB_type
__str__
write_to
write_to(self, mut writer: T)
__repr__
__hash__
__hash__[H: Hasher](self, mut hasher: H)
Updates hasher with the underlying bytes.
Parameters:
- H (
Hasher): The hasher type.
Args:
- hasher (
H): The hasher instance.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!