Compilation target.
More...
#include <target.h>
|
| TargetKind | kind |
| | The kind of the target device.
|
| |
| ffi::Optional< ffi::ObjectRef > | host |
| | Target host information, must be Target type.
|
| |
| ffi::String | tag |
| | Tag of the target, can be empty.
|
| |
| ffi::Array< ffi::String > | keys |
| | Keys for this target.
|
| |
| ffi::Map< ffi::String, Any > | attrs |
| | Collection of attributes (includes feature.* keys set by canonicalizer)
|
| |
Compilation target.
- See also
- Target
◆ GetAttr() [1/2]
| ffi::Optional< TObjectRef > tvm::TargetNode::GetAttr |
( |
const std::string & |
attr_key, |
|
|
ffi::Optional< TObjectRef > |
default_value = ffi::Optional<TObjectRef>(std::nullopt) |
|
) |
| const |
|
inline |
Get an entry from attrs of the target.
- Template Parameters
-
| TObjectRef | Type of the attribute |
- Parameters
-
| attr_key | The name of the attribute key |
| default_value | The value returned if the key is not present |
- Returns
- An optional, std::nullopt if not found, otherwise the value found
◆ GetAttr() [2/2]
Get an entry from attrs of the target.
- Template Parameters
-
| TObjectRef | Type of the attribute |
- Parameters
-
| attr_key | The name of the attribute key |
| default_value | The value returned if the key is not present |
- Returns
- An optional, std::nullopt if not found, otherwise the value found
◆ GetHost()
| ffi::Optional< Target > tvm::TargetNode::GetHost |
( |
| ) |
const |
- Returns
- The ffi::Optional<Target> typed target host of the TargetNode
◆ GetTargetDeviceType()
| int tvm::TargetNode::GetTargetDeviceType |
( |
| ) |
const |
- Returns
- The device type for this target
◆ HasKey()
| bool tvm::TargetNode::HasKey |
( |
const std::string & |
query_key | ) |
const |
Check if the target contains a key.
- Parameters
-
| query_key | The string name of the key to be checked |
- Returns
- True if the target's
TargetNode::keys contains the specified key, False otherwise.
◆ RegisterReflection()
| static void tvm::TargetNode::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ str()
| const std::string & tvm::TargetNode::str |
( |
| ) |
const |
The JSON string representation of the target.
- Returns
- JSON string of the target configuration (e.g. {"kind": "llvm", "mcpu": "cortex-a53"})
◆ ToConfig()
| ffi::Map< ffi::String, ffi::Any > tvm::TargetNode::ToConfig |
( |
| ) |
const |
- Returns
- Export target to JSON-like configuration
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
| tvm::TargetNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL |
( |
"target.Target" |
, |
|
|
TargetNode |
, |
|
|
ffi::Object |
|
|
) |
| |
◆ TargetInternal
◆ _type_s_eq_hash_kind
◆ attrs
| ffi::Map<ffi::String, Any> tvm::TargetNode::attrs |
Collection of attributes (includes feature.* keys set by canonicalizer)
◆ host
| ffi::Optional<ffi::ObjectRef> tvm::TargetNode::host |
◆ keys
| ffi::Array<ffi::String> tvm::TargetNode::keys |
◆ kind
The kind of the target device.
◆ tag
| ffi::String tvm::TargetNode::tag |
Tag of the target, can be empty.
The documentation for this class was generated from the following file: