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

ConvCPU

struct ConvCPU

Registers the mo.conv 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 keeps partial sums in its output buffer, so the fused form gives the kernel only the output's layout and the kernel accumulates in a buffer of its own, then the epilogue stores each finished row into the fused output. 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[input_layout: StaticString, filter_layout: StaticString, static_strides: Coord[*static_strides.element_types], static_dilations: Coord[*static_dilations.element_types], static_padding: Coord[*static_padding.element_types], _trace_name: StaticString](output: T, input: T, filter: T, strides: T, dilation: T, paddings: T, num_groups: Scalar, ctx: DeviceContext)

static def execute[input_layout: StaticString, filter_layout: StaticString, static_strides: Coord[*static_strides.element_types], static_dilations: Coord[*static_dilations.element_types], static_padding: Coord[*static_padding.element_types], _trace_name: StaticString](output: T, input: T, filter: T, strides: T, dilation: T, paddings: T, num_groups: Scalar, ctx: DeviceContext) where not conforms_to(T, Fused).__bool__()

Was this page helpful?