-
Couldn't load subscription status.
- Fork 286
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
For some cases, we want to use dummy kernels to pad the CUDA stream for specific purpose (e.g. to delay the later kernel launches). But for the following cases, TileLang fails to compile an empty kernel:
pid length matching
import tilelang
from tilelang import language as T
@tilelang.jit()
def get_buggy_kernel():
@T.prim_func
def buggy_kernel():
with T.Kernel(1, threads=32) as (pid, ):
pass
return buggy_kernel
if __name__ == '__main__':
kernel = get_buggy_kernel()
print(kernel.get_kernel_source())
kernel()error: cannot unpack non-iterable Var object, which is not friendly and I struggle to find (pid, ) has to be changed into pid.
Failed to compile
import tilelang
from tilelang import language as T
@tilelang.jit()
def get_buggy_kernel():
@T.prim_func
def buggy_kernel():
with T.Kernel(1, threads=32) as pid:
pass
return buggy_kernel
if __name__ == '__main__':
kernel = get_buggy_kernel()
print(kernel.get_kernel_source())
kernel()TypeError: Downcast from ir.IntImm to tir.Call failed.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers