tvm_tirx.runtime.load_module#
- tvm_tirx.runtime.load_module(path, keep_module_alive=True)#
Load module from file.
- Parameters:
path (str | PathLike) – The path to the module file.
keep_module_alive (bool) – Whether to keep the module alive. If True, the module will be kept alive for the duration of the process.
- Returns:
The loaded module
- Return type:
Module
Examples
import tvm_ffi from pathlib import Path # Works with string paths mod = tvm_ffi.load_module("path/to/module.so") # Also works with pathlib.Path objects mod = tvm_ffi.load_module(Path("path/to/module.so")) mod.func_name(*args)
See also
tvm_ffi.Module