Skip to main content

Mojo function

tile_and_unswitch

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

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:

  • workgroup_function (Static1DTileUnswitchUnitFunc): Workgroup function that processes one tile of workload.
  • tile_size_list (List): 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.

tile_and_unswitch[workgroup_function: Dynamic1DTileUnswitchUnitFunc](offset: Int, upperbound: Int, *tile_size_list: Int)

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.

Parameters:

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.

Was this page helpful?