tvm
Public Member Functions | Static Public Member Functions | List of all members
tvm::relax::FuncStructInfo Class Reference

Managed reference to FuncStructInfoNode. More...

#include <struct_info.h>

Inheritance diagram for tvm::relax::FuncStructInfo:
Collaboration diagram for tvm::relax::FuncStructInfo:

Public Member Functions

 FuncStructInfo (Array< StructInfo > params, StructInfo ret, bool purity=true, Span span=Span())
 Constructor from parameter struct info and return value struct info. More...
 
 TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS (FuncStructInfo, StructInfo, FuncStructInfoNode)
 
- Public Member Functions inherited from tvm::relax::StructInfo
 TVM_DEFINE_OBJECT_REF_METHODS (StructInfo, ObjectRef, StructInfoNode)
 

Static Public Member Functions

static FuncStructInfo OpaqueFunc (StructInfoDeriveFunc derive_func, bool purity=false, Span span=Span())
 Constructing an opaque function struct info using derive_func. More...
 
static FuncStructInfo OpaqueFunc (StructInfo ret=ObjectStructInfo(), bool purity=false, Span span=Span())
 Construct an opaque function using from return struct info. More...
 

Detailed Description

Managed reference to FuncStructInfoNode.

See also
FuncStructInfoNode

Constructor & Destructor Documentation

◆ FuncStructInfo()

tvm::relax::FuncStructInfo::FuncStructInfo ( Array< StructInfo params,
StructInfo  ret,
bool  purity = true,
Span  span = Span() 
)

Constructor from parameter struct info and return value struct info.

Parameters
paramsThe struct info of function parameters.
retThe return value struct info.
purityThe purity of the function (true by default).
spanThe span of the AST.
Note
If the ret contains variables(tir::Var and relax::Var), they must be deducible from params. If you are unsure, you can always erase ret to static.

Member Function Documentation

◆ OpaqueFunc() [1/2]

static FuncStructInfo tvm::relax::FuncStructInfo::OpaqueFunc ( StructInfo  ret = ObjectStructInfo(),
bool  purity = false,
Span  span = Span() 
)
static

Construct an opaque function using from return struct info.

Parameters
retThe struct info of the return value.
purityThe purity of the function (false by default: most external functions are not pure).
spanThe span of the AST.
Returns
The FuncStructInfo for opaque packedfunc.
Note
Defaults to an derive func that always return ObjectStructInfo if not specified.

◆ OpaqueFunc() [2/2]

static FuncStructInfo tvm::relax::FuncStructInfo::OpaqueFunc ( StructInfoDeriveFunc  derive_func,
bool  purity = false,
Span  span = Span() 
)
static

Constructing an opaque function struct info using derive_func.

Parameters
derive_funcDerivation function.
purityThe purity of the function (false by default: most external functions are not pure).
spanThe span of the AST.
Returns
The FuncStructInfo for opaque packedfunc.
Note
Defaults to an derive func that always return ObjectStructInfo if not specified.

◆ TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS()

tvm::relax::FuncStructInfo::TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS ( FuncStructInfo  ,
StructInfo  ,
FuncStructInfoNode   
)

The documentation for this class was generated from the following file: