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
pack_filter
def pack_filter(filter: TileTensor[Storage=filter.Storage, address_space=filter.address_space, linear_idx_type=filter.linear_idx_type], packed_filter: TileTensor[Storage=packed_filter.Storage, address_space=packed_filter.address_space, linear_idx_type=packed_filter.linear_idx_type], num_groups: Int)
Packs the filter from RSFC layout into the FRSCf layout expected by the direct transposed convolution kernel.
Each group is zero-padded so the feature dimension is a multiple of the micro kernel feature size, and any residual not aligned to the SIMD width is handled separately.
Args:
- โfilter (
TileTensor[Storage=filter.Storage, address_space=filter.address_space, linear_idx_type=filter.linear_idx_type]): Unpacked filter tensor in RSFC layout to read from. - โpacked_filter (
TileTensor[Storage=packed_filter.Storage, address_space=packed_filter.address_space, linear_idx_type=packed_filter.linear_idx_type]): Output tensor in packed FRSCf layout that receives the packed filter. - โnum_groups (
Int): Number of convolution groups; the filter feature dimension must be divisible by this value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!