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_tasks

def get_conv_num_tasks(num_threads: Int, conv_shape: ConvShape) -> Int

Returns the number of tasks to partition the convolution into.

Scales the matmul-equivalent complexity by a minimum task size and clamps the result to the available thread count.

Args:

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

Returns:

Int: The number of tasks, bounded by num_threads.

Was this page helpful?