IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo function

conv2d_update_wo_tile

def conv2d_update_wo_tile[micro_kernel_height: Int, micro_kernel_width: Int, simd_size: Int, filter_packed: Bool, effected_by_padding: Bool, has_residual: Bool, last_c_tile: Bool, output_dt: DType, input_dt: DType, filter_dt: DType, elementwise_epilogue: Optional[def[rank: Int](coords: IndexList[rank], f_size: Int) capturing thin -> None] = None](output: Pointer[Scalar[output_dt], address_space=output.address_space, _safe=False], input: Pointer[Scalar[input_dt], address_space=input.address_space, _safe=False], filter: Pointer[Scalar[filter_dt], address_space=filter.address_space, _safe=False], first_c_tile: Bool, c_tile_size: Int, f_tile_offset: Int, f_tile_size: Int, conv_shape: ConvShape[Int(2)], n: Int, howo: IndexList[Int(2)])

Updates one micro tile of the 2D convolution output for a given (c, f) tile, accumulating over the R x S filter window and optionally applying an elementwise epilogue on the last C tile.

Parameters:

  • ​micro_kernel_height (Int): Number of output points along the WO dimension covered by the micro tile in register tiling.
  • ​micro_kernel_width (Int): Number of SIMD registers assigned to the F dimension per output point.
  • ​simd_size (Int): Number of elements in a SIMD register.
  • ​filter_packed (Bool): True when the filter is prepacked in FRSCf layout for grouped convolution.
  • ​effected_by_padding (Bool): True when the tile may touch padded input regions, requiring per-point bounds checks.
  • ​has_residual (Bool): True when F is not a multiple of simd_size. The residual elements are loaded and padded with zero to fit a simd vector.
  • ​last_c_tile (Bool): True when this is the last C tile, enabling the elementwise epilogue after accumulation.
  • ​output_dt (DType): Element type of the output tensor.
  • ​input_dt (DType): Element type of the input tensor.
  • ​filter_dt (DType): Element type of the filter tensor.
  • ​elementwise_epilogue (Optional[def[rank: Int](coords: IndexList[rank], f_size: Int) capturing thin -> None]): Optional elementwise function applied to the output after the last channel tile (defaults to None).

Args:

Was this page helpful?