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
mla_prefill_legacy
def mla_prefill_legacy[q_type: DType, k_t: MHAOperand, v_t: MHAOperand, k_rope_t: MHAOperand, output_type: DType, mask_t: MHAMask, valid_layout: TensorLayout, config: MHAConfig[config.dtype], group: Int = Int(128), q_depth: Int = Int(192), cache_depth: Int = Int(576), _ndbuffer_mha_operand: Bool = False, v_depth: Int = config.depth](q_ptr: MutPointer[Scalar[q_type], MutAnyOrigin], k: k_t, v: v_t, k_rope: k_rope_t, output_ptr: MutPointer[Scalar[output_type], MutAnyOrigin], scale: Float32, batch_size: Int32, seq_len_arg: Int32, valid_length_tt: TileTensor[.uint32, valid_layout, ImmutAnyOrigin], cache_offsets: OptionalReg[TileTensor[.uint32, Layout[TypeList[Int64](), TypeList[ComptimeInt[Int(1)]]()], ImmutAnyOrigin]], mask: mask_t)