tvm
|
namespace for target translation and codegen. More...
Functions | |
runtime::Module | Build (IRModule mod, Target target) |
Build a module from array of lowered function. More... | |
std::string | SerializeModuleToBytes (const runtime::Module &mod, bool export_dso=true) |
Serialize runtime module including its submodules. More... | |
runtime::Module | DeserializeModuleFromBytes (std::string blob) |
Deserialize runtime module including its submodules. More... | |
std::string | PackImportsToC (const runtime::Module &m, bool system_lib, const std::string &c_symbol_prefix="") |
Pack imported device library to a C file. Compile the C file and link with the host library will allow the DSO loader to automatically discover and import the dependency from the shared library. More... | |
runtime::Module | PackImportsToLLVM (const runtime::Module &m, bool system_lib, const std::string &target_triple, const std::string &c_symbol_prefix="") |
Pack imported device library to a LLVM module. Compile the LLVM module and link with the host library will allow the DSO loader to automatically discover and import the dependency from the shared library. More... | |
namespace for target translation and codegen.
runtime::Module tvm::codegen::Build | ( | IRModule | mod, |
Target | target | ||
) |
Build a module from array of lowered function.
mod | The Module to be built |
target | The target to be built. |
runtime::Module tvm::codegen::DeserializeModuleFromBytes | ( | std::string | blob | ) |
Deserialize runtime module including its submodules.
blob | byte stream, which are generated by SerializeModuleToBytes . |
std::string tvm::codegen::PackImportsToC | ( | const runtime::Module & | m, |
bool | system_lib, | ||
const std::string & | c_symbol_prefix = "" |
||
) |
Pack imported device library to a C file. Compile the C file and link with the host library will allow the DSO loader to automatically discover and import the dependency from the shared library.
m | The host module with the imports. |
system_lib | Whether expose as system library. |
c_symbol_prefix | Optional symbol prefix of the blob symbol. |
runtime::Module tvm::codegen::PackImportsToLLVM | ( | const runtime::Module & | m, |
bool | system_lib, | ||
const std::string & | target_triple, | ||
const std::string & | c_symbol_prefix = "" |
||
) |
Pack imported device library to a LLVM module. Compile the LLVM module and link with the host library will allow the DSO loader to automatically discover and import the dependency from the shared library.
m | The host module with the imports. |
system_lib | Whether expose as system library. |
target_triple | LLVM target triple |
c_symbol_prefix | Optional symbol prefix of the blob symbol. |
std::string tvm::codegen::SerializeModuleToBytes | ( | const runtime::Module & | mod, |
bool | export_dso = true |
||
) |
Serialize runtime module including its submodules.
mod | The runtime module to serialize including its import tree. |
export_dso | By default, include the info of DSOExportable modules. If disabled, an error will be raised when encountering DSO modules. |