For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
get_conv_tile_shape
def get_conv_tile_shape[dtype: DType](c: Int, filter_window_size: Int, micro_kernel_width: Int) -> IndexList[Int(2)]
Compute the (c, f) tile shape in L2.
Assume NHWC layout, the tile shape is (R, S, c_tile, f_tile). R and S are by default fully covered. The heuristic tried to block in C as much as possible. If C is small, it would start to block F.
Parameters:
- βdtype (
DType): Element type of the convolution operands, used to derive the target SIMD width and L2 tile size.
Args:
- βc (
Int): Number of input channels, bounding the C tile size. - βfilter_window_size (
Int): Flattened filter window size (the product of the spatial filter dimensions, for exampleR * Sfor 2D), divided into the L2 tile budget to size the C and F tiles. - βmicro_kernel_width (
Int): Micro-kernel width in SIMD lanes; multiplied by the SIMD width to give the micro-kernel size in the F dimension, which sets the F tile granularity.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!