tilelang.rocm.language.kernel ============================= .. py:module:: tilelang.rocm.language.kernel .. autoapi-nested-parse:: ROCm dialect of ``T.Kernel``: the common launch plus ROCm launch annotations. Functions --------- .. autoapisummary:: tilelang.rocm.language.kernel.Kernel Module Contents --------------- .. py:function:: Kernel(*blocks, threads = None, prelude = None) Construct a kernel launch frame for ROCm: a grid of workgroups. Code inside the launch operates at the workgroup level: ``T.Parallel``, ``T.copy`` and friends are mapped onto threads by the compiler. ``T.get_thread_binding()`` exposes the thread index for thread-level code. The keyword arguments are recorded at trace time and materialized by the ROCm pipeline once the target is known. :param \*blocks: Grid extent along each axis (1-3 dimensions). The launch yields one workgroup index per axis. :type \*blocks: int | PrimExpr :param threads: Threads per workgroup: a count or up to three per-dimension extents. Defaults to 128 when omitted. :type threads: int | list[int] | tuple[int, ...], optional :param prelude: Source injected before the generated kernel, e.g. ``#include`` lines or helper functions. :type prelude: str, optional .. rubric:: Examples .. code-block:: python with T.Kernel(T.ceildiv(N, 128), threads=128) as bx: ...