Primitive functions that contains TIR statements.
More...
#include <function.h>
|
| | FunctionObj (ffi::UnsafeInit tag) |
| |
| bool | SEqual (const FunctionObj *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 |
| |
| TVM_TIRX_DLL FuncType | func_type_annotation () const |
| | Return the derived function annotation of this function.
|
| |
| | TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tirx.Function", FunctionObj, BaseFuncObj) |
| |
| template<typename TObjectRef > |
| ffi::Optional< TObjectRef > | GetAttr (const std::string &attr_key, ffi::Optional< TObjectRef > default_value=std::nullopt) const |
| | Get a function attribute.
|
| |
| template<typename T > |
| ffi::Optional< T > | GetAttr (ffi::reflection::AttrKey< T > key, ffi::Optional< typename ffi::reflection::AttrKey< T >::ValueType > default_value=std::nullopt) const |
| | Get an attribute with its value type deduced only from the key.
|
| |
| template<typename T > |
| ffi::Optional< T > | GetAttr (ffi::reflection::AttrKey< T > key, typename ffi::reflection::AttrKey< T >::ValueType default_value) const |
| | Accept a default convertible to the key's value type.
|
| |
| template<typename TObjectRef > |
| ffi::Optional< TObjectRef > | GetAttr (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", BaseFuncObj, ExprObj) |
| |
| | TVM_FFI_DECLARE_OBJECT_INFO ("ir.Expr", ExprObj, ffi::Object) |
| |
Primitive functions that contains TIR statements.
The Function provides low-level code representation does not automatically manage
- See also
- Function
◆ FunctionObj()
| tvm::tirx::FunctionObj::FunctionObj |
( |
ffi::UnsafeInit |
tag | ) |
|
|
inlineexplicit |
◆ func_type_annotation()
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::FunctionObj::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ SEqual()
| bool tvm::tirx::FunctionObj::SEqual |
( |
const FunctionObj * |
other, |
|
|
ffi::TypedFunction< bool(AnyView, AnyView, bool, AnyView)> |
equal |
|
) |
| const |
|
inline |
◆ SHash()
| int64_t tvm::tirx::FunctionObj::SHash |
( |
int64_t |
init_hash, |
|
|
ffi::TypedFunction< int64_t(AnyView, int64_t, bool)> |
hash |
|
) |
| const |
|
inline |
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
◆ body
| SeqStmt tvm::tirx::FunctionObj::body |
The body of the function, empty for a marked declaration.
◆ params
| ffi::Array<tvm::Var> tvm::tirx::FunctionObj::params |
◆ ret_type
The return type of the function.
The documentation for this class was generated from the following file: