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
ConvInfoStatic
struct ConvInfoStatic[rank: Int]
Holds statically known convolution attributes (padding, stride, dilation, groups).
Stores the attributes as runtime coordinates, with UNKNOWN_VALUE for a
dimension the kernel cannot know at compile time, and reports whether every
field is known, enabling micro-kernel shape specialization.
Parameters
- rank (
Int): Spatial rank of the convolution (1, 2, or 3).
Fields
- pad (
DynamicCoord[.int64, (rank * Int(2))]): - stride (
DynamicCoord[.int64, rank]): - dilation (
DynamicCoord[.int64, rank]): - num_groups (
Int):
Implemented traits
AnyType,
Defaultable,
Deinitable,
Movable
Methods
__init__
def __init__[pad_t: CoordLike, stride_t: CoordLike, dilation_t: CoordLike](out self, pad: pad_t, stride: stride_t, dilation: dilation_t, num_groups: Int)
Builds the attributes from Coord padding, stride, and dilation.
Static extents come from the coordinates' ComptimeInt leaves; a
runtime (Scalar) leaf stays UNKNOWN_VALUE, so the attributes only
claim an extent the kernel knows at compile time.
Parameters:
- pad_t (
CoordLike): TheCoordLiketype of the padding. - stride_t (
CoordLike): TheCoordLiketype of the stride. - dilation_t (
CoordLike): TheCoordLiketype of the dilation.
Args:
- pad (
pad_t): Padding in graph-op order, reordered to per-dimension(lower, upper)pairs. - stride (
stride_t): Stride along each spatial dimension. - dilation (
dilation_t): Dilation along each spatial dimension. - num_groups (
Int): Number of convolution groups.
def __init__(out self)
def __init__[pad_t: CoordLike, stride_t: CoordLike, dilation_t: CoordLike](out self, pad: pad_t, stride: stride_t, dilation: dilation_t, input_c: Int, filter_c: Int)