|
| template<typename ValueType > |
| static OpAttrMap< ValueType > | GetAttrMap (const ffi::String &attr_name) |
| | Get a typed live view of a registered attribute column.
|
| |
| template<typename ValueType > |
| static OpAttrMap< ValueType > | GetAttrMap (ffi::reflection::AttrKey< ValueType > key) |
| | Get a live attribute view with its value type deduced from the key.
|
| |
| static TVM_TIRX_DLL bool | HasAttrMap (const ffi::String &attr_name) |
| | Check whether an attribute column exists, even if some Ops lack a value.
|
| |
| template<typename ValueType > |
| static bool | HasAttrMap (ffi::reflection::AttrKey< ValueType > key) |
| | Check whether the column named by a typed key exists.
|
| |
| static TVM_TIRX_DLL Op | Get (const ffi::String &op_name) |
| | Look up a registered operator by name.
|
| |
| static TVM_TIRX_DLL ffi::Array< ffi::String > | ListNames () |
| | List registered operator names.
|
| |
Reference-counted handle to a canonical named operator.
OpDef temporarily builds metadata on the same Op returned by Get. Independent registrations may attach different attributes; replacing an existing attribute requires explicit override. Cached attribute maps observe subsequent changes. args_info describes required value operands; var_args_info permits a suffix. ty_args_info describes type arguments; a typed signature installs a validator that checks their count and classes.
constexpr ffi::reflection::AttrKey<bool>
kPure{
"FPurity"};
TVM_FFI_STATIC_INIT_BLOCK() {
OpDef(
"example.identity",
"Return the input expression.")
.signature(sig::arg("value", "The input expression."))
.expose();
}
Op op =
Op::Get(
"example.identity");
friend class OpDef
Definition op.h:197
static TVM_TIRX_DLL Op Get(const ffi::String &op_name)
Look up a registered operator by name.
static OpAttrMap< ValueType > GetAttrMap(const ffi::String &attr_name)
Get a typed live view of a registered attribute column.
Definition op.h:767
@ kPure
Pure function that do not interacts with any external state.