IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 struct

MatmulCPU

struct MatmulCPU

Registers the mo.matmul graph op for CPU devices.

Two execute overloads under one registration: the graph compiler calls the fused one when the output has a fused epilogue and the plain one when it has none. The CPU kernel accumulates in its output buffer, so the fused form lends it a buffer of its own, or only the output's shape when a low-precision output accumulates in the kernel's f32 scratch, and the epilogue stores each finished tile into the fused output, while the plain form has the kernel write the output directly. The pair is grandfathered on the graph compiler's allow list; new kernels declare one execute with a StoreAccess output.

Implemented traitsโ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[transpose_b: Bool, packed_b: Bool, _trace_name: StaticString](c: T, a: T, b: T, ctx: DeviceContext)

static def execute[transpose_b: Bool, packed_b: Bool, _trace_name: StaticString](c: T, a: T, b: T, ctx: DeviceContext)

Was this page helpful?