tilelang.jit.adapter.cutedsl.adapter

Attributes

類別

CuTeDSLKernelAdapter

Helper class that provides a standard way to create an ABC using

Module Contents

tilelang.jit.adapter.cutedsl.adapter.logger
class tilelang.jit.adapter.cutedsl.adapter.CuTeDSLKernelAdapter(params, result_idx, target, func_or_mod, host_mod=None, device_mod=None, host_kernel_source=None, device_kernel_source=None, verbose=False, pass_configs=None, compile_flags=None)

Bases: tilelang.jit.adapter.base.BaseKernelAdapter

Helper class that provides a standard way to create an ABC using inheritance.

參數:
  • params (list[tilelang.engine.param.KernelParam])

  • result_idx (list[int])

  • target (str | tvm.target.Target)

  • func_or_mod (tvm.tir.PrimFunc | tilelang.tvm.IRModule)

  • host_mod (tilelang.tvm.IRModule | None)

  • device_mod (tilelang.tvm.IRModule | None)

  • host_kernel_source (str | None)

  • device_kernel_source (str | None)

  • verbose (bool)

  • pass_configs (dict[str, Any] | None)

  • compile_flags (list[str] | None)

pymodule = None
params
result_idx
host_kernel_source = None
device_kernel_source = None
param_dtypes
param_shapes = []
target
verbose = False
wrapper
host_func
function_names = None
launcher_cpp_code
launcher_lib_name
lib_generator
libpath
kernel_global_source = None
classmethod from_database(params, result_idx, target, func_or_mod, host_kernel_source, device_kernel_source, kernel_lib_path, verbose=False, pass_configs=None, compile_flags=None)
參數:
  • params (list[tilelang.engine.param.KernelParam])

  • result_idx (list[int])

  • target (str)

  • func_or_mod (tvm.tir.PrimFunc | tilelang.tvm.IRModule)

  • host_kernel_source (str)

  • device_kernel_source (str)

  • kernel_lib_path (str)

  • verbose (bool)

  • pass_configs (dict[str, Any] | None)

  • compile_flags (list[str] | None)

get_kernel_source(kernel_only=True)

Get the CUDA kernel source code.

回傳:

The kernel source code, or None if not available

回傳型別:

str | None

參數:

kernel_only (bool)

cleanup()

Explicitly cleanup this adapter's CUDA resources.

This method can be called explicitly to immediately release CUDA resources without waiting for garbage collection. Useful in Jupyter notebooks or tests.

Note: This is safe to call multiple times as the C++ implementation is idempotent.

property prim_func: tvm.tir.PrimFunc

Returns the primary TIR function from the IR module.

回傳型別:

tvm.tir.PrimFunc