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_partition

def get_partition(task_id: Int, num_partitions: IndexList[Int(4)], conv_shape: ConvShape, micro_kernel_height: Int, micro_kernel_f_size: Int) -> ConvPartition

Computes the ConvPartition work range for a given task id.

Args:

  • ​task_id (Int): Linear task identifier.
  • ​num_partitions (IndexList[Int(4)]): Per-dimension partition counts as (batch_group, channel, filter, spatial).
  • ​conv_shape (ConvShape): Convolution shape describing the workload.
  • ​micro_kernel_height (Int): Micro-kernel height, used as the spatial work unit when output loops are merged.
  • ​micro_kernel_f_size (Int): Micro-kernel size in the filter dimension.

Returns:

ConvPartition: The ConvPartition describing the offset and size of this task's work across batch/group, channel, filter, and spatial dimensions.

Was this page helpful?