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_conv_num_partitions

def get_conv_num_partitions[micro_kernel_w: Int, micro_kernel_f: Int](num_threads: Int, conv_shape: ConvShape) -> IndexList[Int(4)]

Partition the workload in (batch, C, F, HOWO) 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_w (Int): Micro-kernel width in the spatial dimension, used as the partition granularity for row tasks.
  • ​micro_kernel_f (Int): Micro-kernel size in the filter dimension, used as the partition granularity for column tasks.

Args:

  • ​num_threads (Int): Number of worker threads available.
  • ​conv_shape (ConvShape): Convolution shape describing the workload.

Returns:

IndexList[Int(4)]

Was this page helpful?