tilelang.cache.kernel_cache =========================== .. py:module:: tilelang.cache.kernel_cache .. autoapi-nested-parse:: The cache utils with class and database persistence - KernelCache Class Attributes ---------- .. autoapisummary:: tilelang.cache.kernel_cache.KERNEL_PATH tilelang.cache.kernel_cache.WRAPPED_KERNEL_PATH tilelang.cache.kernel_cache.KERNEL_LIB_PATH tilelang.cache.kernel_cache.KERNEL_CUBIN_PATH tilelang.cache.kernel_cache.KERNEL_PY_PATH tilelang.cache.kernel_cache.PARAMS_PATH Classes ------- .. autoapisummary:: tilelang.cache.kernel_cache.KernelCache Module Contents --------------- .. py:data:: KERNEL_PATH :value: 'kernel.cu' .. py:data:: WRAPPED_KERNEL_PATH :value: 'wrapped_kernel.cu' .. py:data:: KERNEL_LIB_PATH :value: 'kernel_lib.so' .. py:data:: KERNEL_CUBIN_PATH :value: 'kernel.cubin' .. py:data:: KERNEL_PY_PATH :value: 'kernel.py' .. py:data:: PARAMS_PATH :value: 'params.pkl' .. py:class:: KernelCache Caches compiled kernels using a class and database persistence to avoid redundant compilation. Cache files: kernel.cu: The compiled kernel source code wrapped_kernel.cu: The compiled wrapped kernel source code kernel_lib.so: The compiled kernel library params.pkl: The compiled kernel parameters .. py:attribute:: execution_backend :type: Literal['dlpack', 'ctypes', 'cython', 'nvrtc'] :value: 'cython' .. py:method:: cached(func = None, out_idx = None, *args, target = 'auto', target_host = None, execution_backend = 'cython', verbose = False, pass_configs = None, compile_flags = None) Caches and reuses compiled kernels to avoid redundant compilation. :param func: Function to be compiled or a prepared PrimFunc :param out_idx: Indices specifying which outputs to return :param target: Compilation target platform :param target_host: Host target platform :param \*args: Arguments passed to func :returns: The compiled kernel, either freshly compiled or from cache :rtype: JITKernel .. py:method:: clear_cache() Clears the entire kernel cache, including both in-memory and disk cache.