tvm.support
Support infra of TVM.
Functions:
Get a global function by name. |
|
Detect device-runtime modules linked into the current libtvm by querying the FFI global function registry for |
|
|
Print out information about TVM and the current Python environment |
- tvm.support.get_global_func(name: str, allow_missing: bool = False) Function | None
Get a global function by name.
- Parameters:
name – The name of the global function
allow_missing – Whether allow missing function or raise an error.
- Returns:
The function to be returned,
Noneif function is missing.- Return type:
func
Examples
import tvm_ffi @tvm_ffi.register_global_func("demo.echo") def echo(x): return x f = tvm_ffi.get_global_func("demo.echo") assert f(123) == 123
See also
tvm_ffi.register_global_func()
- tvm.support.detect_active_modules() dict
Detect device-runtime modules linked into the current libtvm by querying the FFI global function registry for
ffi.Module.create.<kind>registrations.Probes a minimal set of key device runtimes (cuda, vulkan, opencl); expand the list when a new caller needs it.
- tvm.support.describe()
Print out information about TVM and the current Python environment