tvm
Classes | Functions
tvm::script::ir_builder::ir Namespace Reference

Classes

class  IRModuleFrameNode
 A frame that represents the IRModule frame with functions and global variables. More...
 
class  IRModuleFrame
 Managed reference to IRModuleFrameNode. More...
 

Functions

IRModuleFrame IRModule ()
 The IRModule declaration statement. More...
 
GlobalVar DeclFunction (const String &func_name, const BaseFunc &func_signature)
 Declare a Function without given the specific function implementation. More...
 
void DefFunction (const String &func_name, const BaseFunc &func)
 Define the function which is declared before. More...
 

Function Documentation

◆ DeclFunction()

GlobalVar tvm::script::ir_builder::ir::DeclFunction ( const String func_name,
const BaseFunc func_signature 
)

Declare a Function without given the specific function implementation.

Note
It is usually used in cross-function call. And we can specify the function by DefFunction
Parameters
func_nameThe function unique name.
func_signatureA Function w/o body, which used to specify the function signature (i.e. func params and func return type/shape).
Returns
The corresponding GlobalVar.

◆ DefFunction()

void tvm::script::ir_builder::ir::DefFunction ( const String func_name,
const BaseFunc func 
)

Define the function which is declared before.

Parameters
func_nameThe function unique name.
funcThe given function implementation

◆ IRModule()

IRModuleFrame tvm::script::ir_builder::ir::IRModule ( )

The IRModule declaration statement.

Returns
The IRModuleFrame.