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

Structure information about function. More...

#include <struct_info.h>

Inheritance diagram for tvm::relax::FuncStructInfoNode:
Collaboration diagram for tvm::relax::FuncStructInfoNode:

Public Member Functions

bool IsOpaque () const
 
 TVM_DECLARE_FINAL_OBJECT_INFO (FuncStructInfoNode, StructInfoNode)
 
- Public Member Functions inherited from tvm::relax::StructInfoNode
 TVM_DECLARE_BASE_OBJECT_INFO (StructInfoNode, Object)
 

Static Public Member Functions

static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::relax::StructInfoNode
static void RegisterReflection ()
 

Public Attributes

Optional< Array< StructInfo > > params
 The parameter struct info of the function. More...
 
StructInfo ret
 The struct info of the function's return value. More...
 
Optional< StructInfoDeriveFuncderive_func
 Derivation function of opaque functions that may take any number of parameters. More...
 
bool purity
 Whether the function is pure. More...
 
- Public Attributes inherited from tvm::relax::StructInfoNode
Span span
 Span that points to the original source code. Reserved debug information. More...
 

Static Public Attributes

static constexpr const char * _type_key = "relax.FuncStructInfo"
 
- Static Public Attributes inherited from tvm::relax::StructInfoNode
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const char * _type_key = "ir.StructInfo"
 
static constexpr const uint32_t _type_child_slots = 7
 

Detailed Description

Structure information about function.

This data structure contains enough information for us to do best-effort structure information deduction.

Member Function Documentation

◆ IsOpaque()

bool tvm::relax::FuncStructInfoNode::IsOpaque ( ) const
inline
Returns
Whether the func struct info is opaque.
Note
We define a function as opaque we have no constraints on params.

◆ RegisterReflection()

static void tvm::relax::FuncStructInfoNode::RegisterReflection ( )
inlinestatic

◆ TVM_DECLARE_FINAL_OBJECT_INFO()

tvm::relax::FuncStructInfoNode::TVM_DECLARE_FINAL_OBJECT_INFO ( FuncStructInfoNode  ,
StructInfoNode   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::relax::FuncStructInfoNode::_type_key = "relax.FuncStructInfo"
staticconstexpr

◆ derive_func

Optional<StructInfoDeriveFunc> tvm::relax::FuncStructInfoNode::derive_func

Derivation function of opaque functions that may take any number of parameters.

Note
When derive_func is not empty, then params should be std::nullopt, ret should be ObjectStructInfo()

◆ params

Optional<Array<StructInfo> > tvm::relax::FuncStructInfoNode::params

The parameter struct info of the function.

Note
When params is std::nullopt means the function can take arbitrary number of arguments. We define such functions as Opaque function.

◆ purity

bool tvm::relax::FuncStructInfoNode::purity

Whether the function is pure.

Note
This parameter should be set to true only if the function is pure on all inputs. If the function may have visible side effects, set it to false.

◆ ret

StructInfo tvm::relax::FuncStructInfoNode::ret

The struct info of the function's return value.


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