IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

tile_and_unswitch

def tile_and_unswitch[tile_size_list: List[Int]](offset: Int, upperbound: Int, workgroup_function: T)

Performs time and unswitch functional transformation.

A variant of static tile given a workgroup function that can be unswitched. This generator is a fused version of tile and unswitch, where the static unswitch is true throughout the "inner" portion of the workload and is false only on the residue tile.

Parameters:

  • tile_size_list (List[Int]): List of tile sizes to launch work.

Args:

  • offset (Int): The initial index to start the work from.
  • upperbound (Int): The runtime upperbound that the work function should not exceed.
  • workgroup_function (T): Workgroup function that processes one tile of workload.

def tile_and_unswitch(offset: Int, upperbound: Int, *tile_size_list: Int, *, workgroup_function: T)

Performs time and unswitch functional transformation.

A variant of dynamic tile given a workgroup function that can be unswitched. This generator is a fused version of tile and unswitch, where the static unswitch is true throughout the "inner" portion of the workload and is false only on the residue tile.

Args:

  • offset (Int): The initial index to start the work from.
  • upperbound (Int): The runtime upperbound that the work function should not exceed.
  • *tile_size_list (Int): List of tile sizes to launch work.
  • workgroup_function (T): Workgroup function that processes one tile of workload.