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
update_w_tile_2d
def update_w_tile_2d[micro_kernel_height: Int, micro_kernel_width: Int, simd_size: Int, effected_by_padding: Bool, has_residual: Bool, last_c_tile: Bool, output_dt: DType, input_dt: DType, filter_dt: DType](output: Pointer[Scalar[output_dt], _safe=False], input: Pointer[Scalar[input_dt], _safe=False], filter: Pointer[Scalar[filter_dt], _safe=False], _init_output: Bool, c_tile_size: Int, f_tile_offset: Int, f_tile_size: Int, conv_shape: ConvShape[Int(2)], n: Int, hw: IndexList[Int(2)])
Updates one output tile of a 2D transposed convolution using register tiling.
Iterates over the filter window for a single output point and accumulates the input and packed filter contributions into the output tile, skipping neighbors that fall inside the padding region.
Parameters:
- βmicro_kernel_height (
Int): Height of the micro kernel in the output spatial dimension. - βmicro_kernel_width (
Int): Width of the micro kernel along the output channel dimension. - βsimd_size (
Int): SIMD vector width for the output element type. - βeffected_by_padding (
Bool): Whether the current tile is affected by spatial padding. - βhas_residual (
Bool): Whether the tile contains a residual not aligned to the micro kernel size. - βlast_c_tile (
Bool): Whether this is the last channel tile for epilogue fusion. - β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.
Args:
- βoutput (
Pointer[Scalar[output_dt], _safe=False]): Pointer to the output tile to accumulate into. - βinput (
Pointer[Scalar[input_dt], _safe=False]): Pointer to the input tile to read from. - βfilter (
Pointer[Scalar[filter_dt], _safe=False]): Pointer to the packed filter tile to read from. - β_init_output (
Bool): Unused flag retained for API compatibility. - βc_tile_size (
Int): Size of the channel tile. - βf_tile_offset (
Int): Offset of the feature tile within the output channel dimension. - βf_tile_size (
Int): Size of the feature tile. - βconv_shape (
ConvShape[Int(2)]): Shape descriptor of the 2D transposed convolution. - βn (
Int): Batch index of the current sample. - βhw (
IndexList[Int(2)]): Spatial coordinates of the current output point.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!