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 struct
MLASparseConfig
struct MLASparseConfig[qkv_dtype: DType, b_topk_: Int = 128, num_mbars_: Int = 2, q_smem_depth_: Int = 192, q_tmem_depth_: Int = 384]
Fieldsβ
- βnum_q_heads (
Int): - βnum_kv_heads (
Int): - βqk_depth (
Int): - βv_depth (
Int): - βindices_stride (
Int): - βgroup (
Int):
Implemented traitsβ
comptime membersβ
B_TOPKβ
comptime B_TOPK = b_topk_
cta_groupβ
comptime cta_group = 2
k_swizzle_modeβ
comptime k_swizzle_mode = TensorMapSwizzle.SWIZZLE_128B
num_mbarsβ
comptime num_mbars = num_mbars_
num_threadsβ
comptime num_threads = 512
output_swizzle_modeβ
comptime output_swizzle_mode = TensorMapSwizzle.SWIZZLE_128B
q_smem_depthβ
comptime q_smem_depth = q_smem_depth_
q_swizzle_modeβ
comptime q_swizzle_mode = TensorMapSwizzle.SWIZZLE_128B
q_tmem_depthβ
comptime q_tmem_depth = q_tmem_depth_
qkv_dtype_sizeβ
comptime qkv_dtype_size = size_of[qkv_dtype]()
sm100_tmem_colsβ
comptime sm100_tmem_cols = 512
Methodsβ
__init__β
def __init__(out self, *, num_q_heads: Int, num_kv_heads: Int, qk_depth: Int, v_depth: Int, indices_stride: Int, group: Int)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!