Helper structure to register operators.
More...
#include <op.h>
Helper structure to register operators.
- See also
- TVM_REGISTER_OP
◆ add_argument()
OpRegEntry & tvm::OpRegEntry::add_argument |
( |
const std::string & |
name, |
|
|
const std::string & |
type, |
|
|
const std::string & |
description |
|
) |
| |
|
inline |
Add argument information to the function.
- Parameters
-
name | Name of the argument. |
type | Type of the argument. |
description | Description of the argument. |
- Returns
- reference to self.
◆ add_type_rel()
Attach the type function corresponding to the return type.
- Parameters
-
rel_name | The type relation name to register. |
type_rel_func | The backing relation function which can solve an arbitrary relation on variables. |
- Returns
- reference to self.
◆ describe()
OpRegEntry & tvm::OpRegEntry::describe |
( |
const std::string & |
descr | ) |
|
|
inline |
setter function during registration Set the description of operator
- Parameters
-
descr | the description string. |
- Returns
- reference to self.
◆ op()
const Op& tvm::OpRegEntry::op |
( |
| ) |
const |
|
inline |
◆ RegisterOrGet()
Register or get a new entry.
- Parameters
-
name | The name of the operator. |
- Returns
- the corresponding entry.
◆ reset_attr()
void tvm::OpRegEntry::reset_attr |
( |
const std::string & |
attr_name | ) |
|
|
inline |
Resets an attr of the registry.
- Parameters
-
attr_name | The name of the attribute. |
◆ set_attr()
template<typename ValueType >
OpRegEntry & tvm::OpRegEntry::set_attr |
( |
const std::string & |
attr_name, |
|
|
const ValueType & |
value, |
|
|
int |
plevel = 10 |
|
) |
| |
|
inline |
Register additional attributes to operator.
- Parameters
-
attr_name | The name of the attribute. |
value | The value to be set. |
plevel | The priority level of this set, an higher priority level attribute will replace lower priority level attribute. Must be bigger than 0. |
Cannot set with same plevel twice in the code.
- Template Parameters
-
ValueType | The type of the value to be set. |
◆ set_attrs_type()
template<typename AttrsType >
Set the attrs type key and index to be AttrsType.
- Template Parameters
-
AttrsType | the attribute type to b set. |
- Returns
- reference to self.
◆ set_attrs_type_key()
Set the attrs type key and index to be AttrsType.
- Parameters
-
key | The attribute type key to be set. |
- Returns
- reference to self.
◆ set_name()
◆ set_num_inputs()
OpRegEntry & tvm::OpRegEntry::set_num_inputs |
( |
int32_t |
n | ) |
|
|
inline |
Set the num_inputs.
- Parameters
-
n | The number of inputs to be set. |
- Returns
- reference to self.
◆ set_support_level()
OpRegEntry & tvm::OpRegEntry::set_support_level |
( |
int32_t |
level | ) |
|
|
inline |
Set the support level of op.
- Parameters
-
- Returns
- reference to self.
◆ AttrRegistry
template<typename , typename >
The documentation for this class was generated from the following file: