Package org.apache.tvm
Class Module
java.lang.Object
org.apache.tvm.TVMValue
org.apache.tvm.TVMObject
org.apache.tvm.Module
Container of compiled functions of TVM.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionasModule()
Easy for user to get the instance from returned TVMValue.static boolean
Whether module runtime is enabled for target, e.g., The following code checks if cuda is enabled.Get the entry function.getFunction
(String name) getFunction
(String name, boolean queryImports) Get function from the module.void
importModule
(Module module) Add module to the import list of current one.static Module
static Module
Load module from file.typeKey()
Get type key of the module.
-
Method Details
-
asModule
Easy for user to get the instance from returned TVMValue. -
entryFunc
Get the entry function.- Returns:
- The entry function if exist
-
getFunction
Get function from the module.- Parameters:
name
- The name of the function.queryImports
- Whether also query modules imported by this module.- Returns:
- The result function.
-
getFunction
-
importModule
Add module to the import list of current one.- Parameters:
module
- The other module.
-
typeKey
Get type key of the module.- Returns:
- type key of the module.
-
load
Load module from file.- Parameters:
path
- The path to the module file.fmt
- The format of the file, if not specified it will be inferred from suffix of the file.- Returns:
- The loaded module
-
load
-
enabled
Whether module runtime is enabled for target, e.g., The following code checks if cuda is enabled. Module.enabled("cuda")- Parameters:
target
- The target device type.- Returns:
- Whether runtime is enabled.
-