tvm
Functions
tvm::codegen Namespace Reference

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 PackImportsToC (const runtime::Module &m, bool system_lib)
 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)
 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...
 

Detailed Description

namespace for target translation and codegen.

Function Documentation

◆ Build()

runtime::Module tvm::codegen::Build ( IRModule  mod,
Target  target 
)

Build a module from array of lowered function.

Parameters
modThe Module to be built
targetThe target to be built.
Returns
The result runtime::Module.

◆ PackImportsToC()

std::string tvm::codegen::PackImportsToC ( const runtime::Module m,
bool  system_lib 
)

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.

Parameters
mThe host module with the imports.
system_libWhether expose as system library.
Returns
cstr The C string representation of the file.

◆ PackImportsToLLVM()

runtime::Module tvm::codegen::PackImportsToLLVM ( const runtime::Module m,
bool  system_lib,
const std::string &  target_triple 
)

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.

Parameters
mThe host module with the imports.
system_libWhether expose as system library.
target_tripleLLVM target triple
Returns
runtime::Module The generated LLVM module.