MCPcopy Create free account
hub / github.com/tile-ai/tilelang / var_init_kernel

Function var_init_kernel

testing/python/amd/test_tilelang_hip_codegen.py:406–414  ·  view source on GitHub ↗
(iv, tld)

Source from the content-addressed store, hash-verified

404
405 @tilelang.jit
406 def var_init_kernel(iv, tld):
407 @T.prim_func
408 def kernel(out: T.Tensor((N,), tld)) -> None:
409 with T.Kernel(1, threads=N) as _:
410 v = T.alloc_var(tld, init=iv)
411 for i in T.Parallel(N):
412 out[i] = v
413
414 return kernel
415
416 out = torch.zeros(N, dtype=torch_dtype, device="cuda")
417 var_init_kernel(init_val, tl_dtype)(out)

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…