A Relax function.
More...
#include <expr.h>
|
| | FunctionObj (SeqExpr body) |
| |
| | FunctionObj (ffi::UnsafeInit) |
| |
| | TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("relax.expr.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) |
| |
◆ FunctionObj() [1/2]
| tvm::relax::FunctionObj::FunctionObj |
( |
SeqExpr |
body | ) |
|
|
inlineexplicit |
◆ FunctionObj() [2/2]
| tvm::relax::FunctionObj::FunctionObj |
( |
ffi::UnsafeInit |
| ) |
|
|
inlineexplicit |
◆ RegisterReflection()
| static void tvm::relax::FunctionObj::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
| tvm::relax::FunctionObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL |
( |
"relax.expr.Function" |
, |
|
|
FunctionObj |
, |
|
|
BaseFuncObj |
|
|
) |
| |
◆ _type_s_eq_hash_kind
| constexpr TVMFFISEqHashKind tvm::relax::FunctionObj::_type_s_eq_hash_kind = kTVMFFISEqHashKindDAGNode |
|
staticconstexpr |
◆ body
| SeqExpr tvm::relax::FunctionObj::body |
The body of the function.
◆ is_pure
| bool tvm::relax::FunctionObj::is_pure |
Whether the function is annotated as pure or not.
◆ params
| ffi::Array<Var> tvm::relax::FunctionObj::params |
The parameters to the function.
◆ ret_ty
The return type of the function.
The documentation for this class was generated from the following file: