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
conv_transposed_cpu
def conv_transposed_cpu[filter_packed: Bool, filter_is_cfrs: Bool, has_epilogue_fusion: Bool, elementwise_lambda: def[dtype: DType, rank: Int, width: SIMDLength, alignment: Int = Int(1)](IndexList[rank], SIMD[dtype, width]) capturing thin -> None](output: TileTensor[Storage=output.Storage, linear_idx_type=output.linear_idx_type], input: TileTensor[Storage=input.Storage, linear_idx_type=input.linear_idx_type], filter: TileTensor[Storage=filter.Storage, linear_idx_type=filter.linear_idx_type], stride: IndexList[(input.LayoutType.rank - Int(2))], dilation: IndexList[(input.LayoutType.rank - Int(2))], pad_d: IndexList[Int(2)], pad_h: IndexList[Int(2)], pad_w: IndexList[Int(2)], ctx: Optional[DeviceContext] = None)
Runs a transposed convolution on the CPU using the direct register-tiled kernel.
Packs the filter when needed, builds the convolution shape, and dispatches the tiled computation across the available CPU parallelism, optionally fusing an elementwise epilogue.
Parameters:
- βfilter_packed (
Bool): Whether the filter is already in packed FRSCf layout. - βfilter_is_cfrs (
Bool): Whether the filter is in CFRS layout, which is unsupported. - βhas_epilogue_fusion (
Bool): Whether to fuse an elementwise epilogue into the kernel. - βelementwise_lambda (
def[dtype: DType, rank: Int, width: SIMDLength, alignment: Int = Int(1)](IndexList[rank], SIMD[dtype, width]) capturing thin -> None): Elementwise epilogue closure applied to each output row segment.
Args:
- βoutput (
TileTensor[Storage=output.Storage, linear_idx_type=output.linear_idx_type]): Output tensor that receives the transposed convolution result. - βinput (
TileTensor[Storage=input.Storage, linear_idx_type=input.linear_idx_type]): Input tensor in NHWC or NDHWC layout. - βfilter (
TileTensor[Storage=filter.Storage, linear_idx_type=filter.linear_idx_type]): Filter tensor in RSFC layout, packed or unpacked. - βstride (
IndexList[(input.LayoutType.rank - Int(2))]): Stride along each spatial axis. - βdilation (
IndexList[(input.LayoutType.rank - Int(2))]): Dilation value along each spatial axis of the filter. - βpad_d (
IndexList[Int(2)]): Padding in the depth dimension. - βpad_h (
IndexList[Int(2)]): Padding in the height dimension. - βpad_w (
IndexList[Int(2)]): Padding in the width dimension. - βctx (
Optional[DeviceContext]): Optional device context used to query the parallelism level.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!