Skip to main content

Mojo function

mla_prefill

mla_prefill[q_type: DType, k_t: MHAOperand, v_t: MHAOperand, k_rope_t: MHAOperand, output_type: DType, softmax_type: DType, mask_t: MHAMask, score_mod_t: ScoreModTrait, config: MHAConfig, group: Int = 128, q_depth: Int = 192, cache_depth: Int = 576, use_score_mod: Bool = False, write_softmax_info: Bool = False, use_cascade_attention: Bool = False, _ndbuffer_mha_operand: Bool = False](q_ptr: UnsafePointer[Scalar[q_type]], k: k_t, v: v_t, k_rope: k_rope_t, output_ptr: UnsafePointer[Scalar[output_type]], softmax_info_ptr: UnsafePointer[Scalar[softmax_type]], prev_output_ptr: UnsafePointer[Scalar[output_type]], prev_softmax_info_ptr: UnsafePointer[Scalar[softmax_type]], scale: Float32, batch_size: Int, seq_len_arg: Int, valid_length: NDBuffer[DType.uint32, 1, MutableAnyOrigin], cache_offsets: OptionalReg[NDBuffer[DType.uint32, 1, MutableAnyOrigin]], mask: mask_t, score_mod: score_mod_t)

Was this page helpful?