warp.launch_tiled#
- warp.launch_tiled(*args, **kwargs)[source]#
A helper method for launching a grid with an extra trailing dimension equal to the block size.
For example, to launch a 2D grid, where each element has 64 threads assigned you would use the following:
warp.launch_tiled(kernel, [M, N], inputs=[...], block_dim=64)
Which is equivalent to the following:
warp.launch(kernel, [M, N, 64], inputs=[...], block_dim=64)
Inside your kernel code you can retrieve the first two indices of the thread as usual, ignoring the implicit third dimension if desired:
@warp.kernel def compute() i, j = warp.tid() ...