Module container of TVM.
More...
#include <module.h>
◆ ContainerType
◆ Module() [1/2]
tvm::runtime::Module::Module |
( |
| ) |
|
|
inline |
◆ Module() [2/2]
◆ GetFunction()
PackedFunc tvm::runtime::Module::GetFunction |
( |
const String & |
name, |
|
|
bool |
query_imports = false |
|
) |
| |
|
inline |
Get packed function from current module by name.
- Parameters
-
name | The name of the function. |
query_imports | Whether also query dependency modules. |
- Returns
- The result function. This function will return PackedFunc(nullptr) if function do not exist.
- Note
- Implemented in packed_func.cc
◆ Import()
void tvm::runtime::Module::Import |
( |
Module |
other | ) |
|
|
inline |
Import another module into this module.
- Parameters
-
other | The module to be imported. |
- Note
- Cyclic dependency is not allowed among modules, An error will be thrown when cyclic dependency is detected.
◆ LoadFromFile()
static Module tvm::runtime::Module::LoadFromFile |
( |
const String & |
file_name, |
|
|
const String & |
format = "" |
|
) |
| |
|
static |
Load a module from file.
- Parameters
-
file_name | The name of the host function module. |
format | The format of the file. |
- Note
- This function won't load the import relationship. Re-create import relationship by calling Import.
◆ operator->() [1/2]
- Returns
- internal container
◆ operator->() [2/2]
const ModuleNode * tvm::runtime::Module::operator-> |
( |
| ) |
const |
|
inline |
- Returns
- internal container
◆ ModuleNode
The documentation for this class was generated from the following files: