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

pack_filter_lt

def pack_filter_lt[simd_size: Int, micro_kernel_f_size: Int](filter: LayoutTensor[address_space=filter.address_space, element_layout=filter.element_layout, layout_int_type=filter.layout_int_type, linear_idx_type=filter.linear_idx_type, masked=filter.masked, alignment=filter.alignment], packed_filter: LayoutTensor[address_space=packed_filter.address_space, element_layout=packed_filter.element_layout, layout_int_type=packed_filter.layout_int_type, linear_idx_type=packed_filter.linear_idx_type, masked=packed_filter.masked, alignment=packed_filter.alignment], num_groups: Int)

This packs the filter form RSCF to FRSCf.

F is first broken down to segments of size micro_kernel_f_size, then the remainder is further divided by simd_size. The last residual elements if any is padded with zero to fill simd_size.

Parameters:

  • ​simd_size (Int): Can differ from the simd size of the input type.
  • ​micro_kernel_f_size (Int): The size of the last dimension in FRSCf, which is equals the size of the micro kernel's F dimension.

Args: