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. |
|
|
|
|
|
Lower to split IR under a per-compilation instrumentation session. |
|
Compile using an existing context without resolving backend state again. |
|
Compile after resolving exactly one backend context. |
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.tirx.PrimFunc)
- tilelang.engine.lower.is_device_call(func)¶
- Parameters:
func (tvm.tirx.PrimFunc)
- tilelang.engine.lower.get_device_call(is_device_c=False)¶
- tilelang.engine.lower.get_host_call(is_device_c=False)¶
- tilelang.engine.lower.extrac_params(func)¶
- Parameters:
func (tvm.tirx.PrimFunc)
- Return type:
- tilelang.engine.lower.host_codegen(host_mod, context)¶
Generate host-side code from the lowered IR module.
- Parameters:
host_mod (tvm.IRModule) – The host-side IR module to compile.
context (BackendContext) – Resolved backend, device target, host target, and execution policy.
- Return type:
tilelang.tvm.IRModule
- tilelang.engine.lower.device_codegen(device_mod, context)¶
- Parameters:
device_mod (tilelang.tvm.IRModule)
context (tilelang.backend.module.BackendContext)
- Return type:
tilelang.tvm.IRModule
- tilelang.engine.lower.device_codegen_without_compile(device_mod, context)¶
- Parameters:
device_mod (tilelang.tvm.IRModule)
context (tilelang.backend.module.BackendContext)
- Return type:
tilelang.tvm.IRModule
- tilelang.engine.lower.lower_to_host_device_ir(func_or_mod, context, runtime_only=False)¶
Lower to split IR under a per-compilation instrumentation session.
- Parameters:
func_or_mod (tvm.tirx.PrimFunc | tilelang.tvm.IRModule)
context (tilelang.backend.module.BackendContext)
runtime_only (bool)
- Return type:
tuple[tilelang.tvm.IRModule, tilelang.tvm.IRModule, list[tilelang.engine.param.KernelParam] | None, tvm.target.Target, tvm.target.Target]
- tilelang.engine.lower.lower_with_context(func_or_mod, context, *, runtime_only=False, enable_host_codegen=False, enable_device_compile=False)¶
Compile using an existing context without resolving backend state again.
enable_host_codegenbuilds the host runtime module when true. It is disabled by default because JIT adapters provide their own host-side integration.enable_device_compilesimilarly controls whether device code is compiled at this stage; JIT adapters compile it separately by default.- Parameters:
func_or_mod (tvm.tirx.PrimFunc | tilelang.tvm.IRModule)
context (tilelang.backend.module.BackendContext)
runtime_only (bool)
enable_host_codegen (bool)
enable_device_compile (bool)
- Return type:
- tilelang.engine.lower.lower(func_or_mod, target='auto', target_host=None, runtime_only=False, enable_host_codegen=False, enable_device_compile=False)¶
Compile after resolving exactly one backend context.
enable_host_codegenbuilds the host runtime module when true. It is disabled by default because JIT adapters provide their own host-side integration.enable_device_compilesimilarly controls whether device code is compiled at this stage; JIT adapters compile it separately by default.- Parameters:
- Return type: