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

get_num_partitions

def get_num_partitions[micro_kernel_height: Int, micro_kernel_f_size: Int](num_threads: Int, conv_shape: ConvShape) -> IndexList[Int(4)]

Partition the workload in (batch&group, C, F, H) dimensions. HOWO is the combination of HO and WO dimensions. The actual number of tasks are the product of return num_partitions.

Parameters:

  • ​micro_kernel_height (Int): Height of the micro kernel in the output spatial dimension.
  • ​micro_kernel_f_size (Int): Size of the micro kernel along the output channel dimension.

Args:

  • ​num_threads (Int): Number of parallel threads available for partitioning.
  • ​conv_shape (ConvShape): Shape descriptor of the transposed convolution.

Returns:

IndexList[Int(4)]

Was this page helpful?