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
matmul_Q6_K
def matmul_Q6_K(a_tt: TileTensor[.float32, Engine=a_tt.Engine, linear_idx_type=a_tt.linear_idx_type], b_tt: TileTensor[.uint8, Engine=b_tt.Engine, linear_idx_type=b_tt.linear_idx_type], c_tt: TileTensor[.float32, Engine=c_tt.Engine, linear_idx_type=c_tt.linear_idx_type], ctx: Optional[DeviceContext[CompilationTarget()]] = None)
Computes a matrix multiplication with Q6_K block-quantized weights.
Dispatches to an x86 or ARM NEON implementation at compile time; other targets fail to compile.
Args:
- a_tt (
TileTensor[.float32, Engine=a_tt.Engine, linear_idx_type=a_tt.linear_idx_type]): Left-hand operand tensor in float32. - b_tt (
TileTensor[.uint8, Engine=b_tt.Engine, linear_idx_type=b_tt.linear_idx_type]): Right-hand operand tensor holding Q6_K quantized uint8 weights. - c_tt (
TileTensor[.float32, Engine=c_tt.Engine, linear_idx_type=c_tt.linear_idx_type]): Output tensor in float32. - ctx (
Optional[DeviceContext[CompilationTarget()]]): Optional device context for parallel execution.
def matmul_Q6_K[EpilogueFnType: ElementwiseEpilogueFn](a_tt: TileTensor[.float32, Engine=a_tt.Engine, linear_idx_type=a_tt.linear_idx_type], b_tt: TileTensor[.uint8, Engine=b_tt.Engine, linear_idx_type=b_tt.linear_idx_type], c_tt: TileTensor[.float32, Engine=c_tt.Engine, linear_idx_type=c_tt.linear_idx_type], epilogue_fn: EpilogueFnType, ctx: Optional[DeviceContext[CompilationTarget()]] = None)
Same as the plain overload, also passing each output element to epilogue_fn.
The kernel uses c_tt as its accumulator, so it is written either way.
Parameters:
- EpilogueFnType (
ElementwiseEpilogueFn): Type ofepilogue_fn(inferred).
Args:
- a_tt (
TileTensor[.float32, Engine=a_tt.Engine, linear_idx_type=a_tt.linear_idx_type]): Left-hand operand tensor in float32. - b_tt (
TileTensor[.uint8, Engine=b_tt.Engine, linear_idx_type=b_tt.linear_idx_type]): Right-hand operand tensor holding Q6_K quantized uint8 weights. - c_tt (
TileTensor[.float32, Engine=c_tt.Engine, linear_idx_type=c_tt.linear_idx_type]): Output tensor in float32. - epilogue_fn (
EpilogueFnType): Epilogue called with each final output element. - ctx (
Optional[DeviceContext[CompilationTarget()]]): Optional device context for parallel execution.