Helper structure to register TargetKind.
More...
#include <target_kind.h>
Helper structure to register TargetKind.
- See also
- TVM_REGISTER_TARGET_KIND
◆ add_attr_option() [1/2]
template<typename ValueType >
Register a valid configuration option and its ValueType for validation.
- Parameters
-
- Template Parameters
-
ValueType | The value type to be registered |
◆ add_attr_option() [2/2]
template<typename ValueType >
Register a valid configuration option and its ValueType for validation.
- Parameters
-
key | The configuration key |
default_value | The default value of the key |
- Template Parameters
-
ValueType | The value type to be registered |
◆ ListTargetKindOptions()
Get all supported option names and types for a given Target kind.
- Returns
- Map of option name to type
◆ ListTargetKinds()
static Array<String> tvm::TargetKindRegEntry::ListTargetKinds |
( |
| ) |
|
|
static |
List all the entry names in the registry.
- Returns
- The entry names.
◆ RegisterOrGet()
Register or get a new entry.
- Parameters
-
- Returns
- the corresponding entry.
◆ set_attr()
template<typename ValueType >
TargetKindRegEntry & tvm::TargetKindRegEntry::set_attr |
( |
const String & |
attr_name, |
|
|
const ValueType & |
value, |
|
|
int |
plevel = 10 |
|
) |
| |
|
inline |
Register additional attributes to target_kind.
- Parameters
-
attr_name | The name of the attribute. |
value | The value to be set. |
plevel | The priority level of this attribute, 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_preprocessor()
template<typename FLambda >
Set the pre-processing function applied upon target creation.
- Template Parameters
-
FLambda | Type of the function |
- Parameters
-
f | The pre-processing function |
◆ set_default_device_type()
Set DLPack's device_type the target.
- Parameters
-
◆ set_default_keys()
Set DLPack's device_type the target.
- Parameters
-
◆ set_name()
Set name of the TargetKind to be the same as registry if it is empty.
◆ set_target_parser()
Set the parsing function applied upon target creation.
- Parameters
-
parser | The Target parsing function |
◆ AttrRegistry
template<typename , typename >
◆ TargetKind
The documentation for this class was generated from the following file: