Mojo function
tile_and_unswitch
tile_and_unswitch[workgroup_function: fn[Int, Bool](Int, Int) capturing -> None, tile_size_list: VariadicList[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 (
fn[Int, Bool](Int, Int) capturing -> None
): Workgroup function that processes one tile of workload. - tile_size_list (
VariadicList[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.
tile_and_unswitch[workgroup_function: fn[Bool](Int, Int, Int) capturing -> None](offset: Int, upperbound: Int, tile_size_list: VariadicList[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:
- workgroup_function (
fn[Bool](Int, Int, Int) capturing -> None
): Workgroup function that processes one tile of workload.
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 (
VariadicList[Int]
): List of tile sizes to launch work.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!