|
template<typename TObjectRef > |
TObjectRef | tvm::NullValue () |
| Create a NodeRef type that represents null. More...
|
|
template<> |
DataType | tvm::NullValue< DataType > () |
|
template<typename TAttrs > |
TAttrs | tvm::AttrsWithDefaultValues () |
| Create an Attr object with all default values. More...
|
|
DictAttrs | tvm::WithAttrs (DictAttrs attrs, Map< String, ObjectRef > new_attrs) |
| Copy the DictAttrs, but overrides attributes with the entries from attrs . More...
|
|
DictAttrs | tvm::WithAttr (DictAttrs attrs, String key, ObjectRef value) |
| Copy the DictAttrs, but overrides a single attribute. More...
|
|
DictAttrs | tvm::WithAttr (DictAttrs attrs, const std::string &key, ObjectRef value) |
|
DictAttrs | tvm::WithoutAttr (DictAttrs attrs, const std::string &key) |
| Copy the DictAttrs, but without a specific attribute. More...
|
|
template<typename TFunc > |
TFunc | tvm::WithAttr (TFunc input, const std::string &attr_key, ObjectRef attr_value) |
| Copy the function or module, but overrides the attribute value key with the value. More...
|
|
template<typename TFunc > |
TFunc | tvm::WithAttrs (TFunc input, Map< String, ObjectRef > attrs) |
| Copy the function or module, but overrides the attributes with the entries from attrs . More...
|
|
template<typename TFunc > |
TFunc | tvm::WithoutAttr (TFunc input, const std::string &attr_key) |
| Copy the function or module, but removes the specified attribute. More...
|
|
template<typename T > |
void | tvm::detail::SetValue (T *ptr, const TVMArgValue &val) |
|
template<typename T > |
void | tvm::detail::SetIntValue (T *ptr, const TVMArgValue &val) |
|
template<> |
void | tvm::detail::SetValue< DataType > (DataType *ptr, const TVMArgValue &val) |
|
template<> |
void | tvm::detail::SetValue< double > (double *ptr, const TVMArgValue &val) |
|
template<> |
void | tvm::detail::SetValue< int > (int *ptr, const TVMArgValue &val) |
|
template<> |
void | tvm::detail::SetValue< int64_t > (int64_t *ptr, const TVMArgValue &val) |
|
template<> |
void | tvm::detail::SetValue< uint64_t > (uint64_t *ptr, const TVMArgValue &val) |
|
template<> |
void | tvm::detail::SetValue< bool > (bool *ptr, const TVMArgValue &val) |
|
template<typename FFind > |
AttrInitVisitor< FFind > | tvm::detail::CreateInitVisitor (const char *type_key, FFind ffind) |
|
Helpers for attribute objects.
This module enables declaration of named attributes which support default value setup and bound checking.
float learning_rate;
int num_hidden;
String name;
}
};
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:870
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
#define TVM_DECLARE_ATTRS(ClassName, TypeKey)
Declare an attribute function.
Definition: attrs.h:66
#define TVM_REGISTER_NODE_TYPE(TypeName)
Register a node type to object registry and reflection registry.
Definition: reflection.h:275
- See also
- AttrsNode, TVM_DECLARE_ATTRS, TVM_ATTR_FIELD