tilelang.engine.lowerΒΆ
The compiler for TL programs.
FunctionsΒΆ
|
|
|
Check if the attributes indicate a device kernel launch. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Generate host-side code from the lowered IR module. |
|
|
|
|
|
enable_host_codegen: whether to enable host codegen, default is False, as we have our |
Module ContentsΒΆ
- tilelang.engine.lower.is_cpu_device_backend(target)ΒΆ
- Parameters:
target (tvm.target.Target)
- tilelang.engine.lower.has_device_kernel_launch(attrs)ΒΆ
Check if the attributes indicate a device kernel launch.
- Return type:
- tilelang.engine.lower.is_device_call_c_device(func)ΒΆ
- Parameters:
func (tvm.tir.PrimFunc)
- tilelang.engine.lower.is_device_call(func)ΒΆ
- Parameters:
func (tvm.tir.PrimFunc)
- tilelang.engine.lower.get_device_call(is_device_c=False)ΒΆ
- tilelang.engine.lower.get_host_call(is_device_c=False)ΒΆ
- tilelang.engine.lower.tilelang_callback_cuda_compile(code, target, pass_config=None)ΒΆ
- tilelang.engine.lower.tilelang_callback_hip_compile(code, target)ΒΆ
- tilelang.engine.lower.extrac_params(func)ΒΆ
- Parameters:
func (tvm.tir.PrimFunc)
- Return type:
- tilelang.engine.lower.canon_target_host(target, target_host)ΒΆ
- Parameters:
target (str | tvm.target.Target)
target_host (str | tvm.target.Target | None)
- tilelang.engine.lower.host_codegen(host_mod, target_host, target=None)ΒΆ
Generate host-side code from the lowered IR module.
- Parameters:
host_mod (tvm.IRModule) β The host-side IR module to compile.
target_host (Target) β The host compilation target (e.g. βllvmβ or βcβ).
target (Target, optional) β The device target. When the device target is Metal, the pass MarkHostMetalContext is applied so that the generated host code contains the Metal/MPS synchronisation logic.
- Return type:
tilelang.tvm.IRModule
- tilelang.engine.lower.device_codegen(device_mod, target)ΒΆ
- Parameters:
device_mod (tilelang.tvm.IRModule)
target (tvm.target.Target)
- Return type:
tilelang.tvm.IRModule
- tilelang.engine.lower.device_codegen_without_compile(device_mod, target)ΒΆ
- Parameters:
device_mod (tilelang.tvm.IRModule)
target (tvm.target.Target)
- Return type:
tilelang.tvm.IRModule
- tilelang.engine.lower.lower(func_or_mod, target='auto', target_host=None, runtime_only=False, enable_host_codegen=False, enable_device_compile=False)ΒΆ
enable_host_codegen: whether to enable host codegen, default is False, as we have our own host codegen implementation in jit. enable_device_compile: whether to enable device codegen, default is False, as we have our own device codegen implementation in jit.
- Parameters:
func_or_mod (tvm.tir.PrimFunc | tilelang.tvm.IRModule)
target (str | tvm.target.Target)
target_host (str | tvm.target.Target | None)
- Return type: