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

dispatch_get_kernel_type

def dispatch_get_kernel_type[FuncType: def[x: Bool]() raises -> None & ImplicitlyCopyable](func: FuncType, m: Int, n: Int, k: Int)

Invokes func with the kernel type selected for the matmul dimensions.

Parameters:

  • ​FuncType (def[x: Bool]() raises -> None & ImplicitlyCopyable): The comptime-parameterized function type to dispatch, specialized on a boolean kernel type.

Args:

  • ​func (FuncType): The comptime-parameterized function to dispatch, specialized on a boolean kernel type.
  • ​m (Int): The M dimension of the matmul.
  • ​n (Int): The N dimension of the matmul.
  • ​k (Int): The K dimension of the matmul.

def dispatch_get_kernel_type[FuncType: def[x: Bool]() -> None & ImplicitlyCopyable](func: FuncType, m: Int, n: Int, k: Int)

Invokes func with the kernel type selected for the matmul dimensions.

Non-raising overload of dispatch_get_kernel_type.

Parameters:

  • ​FuncType (def[x: Bool]() -> None & ImplicitlyCopyable): The comptime-parameterized function type to dispatch, specialized on a boolean kernel type.

Args:

  • ​func (FuncType): The comptime-parameterized function to dispatch, specialized on a boolean kernel type.
  • ​m (Int): The M dimension of the matmul.
  • ​n (Int): The N dimension of the matmul.
  • ​k (Int): The K dimension of the matmul.