tvm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::tirx::PrimFuncNode Class Reference

Primitive functions that contains TIR statements. More...

#include <function.h>

Inheritance diagram for tvm::tirx::PrimFuncNode:
Collaboration diagram for tvm::tirx::PrimFuncNode:

Public Member Functions

bool SEqual (const PrimFuncNode *other, ffi::TypedFunction< bool(AnyView, AnyView, bool, AnyView)> equal) const
 
int64_t SHash (int64_t init_hash, ffi::TypedFunction< int64_t(AnyView, int64_t, bool)> hash) const
 
FuncType func_type_annotation () const
 Return the derived function annotation of this function.
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tirx.PrimFunc", PrimFuncNode, BaseFuncNode)
 
- Public Member Functions inherited from tvm::BaseFuncNode
template<typename TObjectRef >
ffi::Optional< TObjectRefGetAttr (const std::string &attr_key, ffi::Optional< TObjectRef > default_value=std::nullopt) const
 Get a function attribute.
 
template<typename TObjectRef >
ffi::Optional< TObjectRefGetAttr (const std::string &attr_key, TObjectRef default_value) const
 
bool HasNonzeroAttr (const std::string &attr_key) const
 Check whether the function has an non-zero integer attr.
 
LinkageType GetLinkageType () const
 Get the type of the linkage.
 
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.BaseFunc", BaseFuncNode, ExprNode)
 
- Public Member Functions inherited from tvm::ExprNode
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.Expr", ExprNode, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::BaseFuncNode
static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::ExprNode
static void RegisterReflection ()
 

Public Attributes

ffi::Array< tirx::Varparams
 Function parameters.
 
Type ret_type = Type::Missing()
 The return type of the function.
 
tirx::Stmt body
 The body of the function.
 
- Public Attributes inherited from tvm::BaseFuncNode
DictAttrs attrs
 Additional attributes storing the meta-data.
 
- Public Attributes inherited from tvm::ExprNode
Span span
 Span that points to the original source code. Reserved debug information.
 
Type ty = Type::Missing()
 The deduced or annotated type of the expression.
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::BaseFuncNode
static constexpr const uint32_t _type_child_slots = 2
 
- Static Public Attributes inherited from tvm::ExprNode
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const uint32_t _type_child_slots = 64
 

Detailed Description

Primitive functions that contains TIR statements.

The PrimFunc provides low-level code representation does not automatically manage

See also
PrimFunc

Member Function Documentation

◆ func_type_annotation()

FuncType tvm::tirx::PrimFuncNode::func_type_annotation ( ) const

Return the derived function annotation of this function.

Returns
The function type annotation.
Note
The function type annotation of PrimExpr is directly derived from the Vars without the need of type inference.

◆ RegisterReflection()

static void tvm::tirx::PrimFuncNode::RegisterReflection ( )
inlinestatic

◆ SEqual()

bool tvm::tirx::PrimFuncNode::SEqual ( const PrimFuncNode other,
ffi::TypedFunction< bool(AnyView, AnyView, bool, AnyView)>  equal 
) const
inline

◆ SHash()

int64_t tvm::tirx::PrimFuncNode::SHash ( int64_t  init_hash,
ffi::TypedFunction< int64_t(AnyView, int64_t, bool)>  hash 
) const
inline

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::tirx::PrimFuncNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "tirx.PrimFunc"  ,
PrimFuncNode  ,
BaseFuncNode   
)

Member Data Documentation

◆ body

tirx::Stmt tvm::tirx::PrimFuncNode::body

The body of the function.

◆ params

ffi::Array<tirx::Var> tvm::tirx::PrimFuncNode::params

Function parameters.

◆ ret_type

Type tvm::tirx::PrimFuncNode::ret_type = Type::Missing()

The return type of the function.


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