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
◆ TargetObj() [1/2]
◆ TargetObj() [2/2]
| tvm::TargetObj::TargetObj |
( |
ffi::UnsafeInit |
tag | ) |
|
|
inlineexplicit |
◆ GetAttr() [1/2]
template<typename TObjectRef >
| ffi::Optional< TObjectRef > tvm::TargetObj::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]
template<typename TObjectRef >
| ffi::Optional< TObjectRef > tvm::TargetObj::GetAttr |
( |
const std::string & |
attr_key, |
|
|
TObjectRef |
default_value |
|
) |
| 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
◆ GetHost()
- Returns
- The ffi::Optional<Target> typed target host of the TargetObj
◆ GetTargetDeviceType()
- Returns
- The device type for this target
◆ HasKey()
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
TargetObj::keys contains the specified key, False otherwise.
◆ RegisterReflection()
| static void tvm::TargetObj::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ str()
The JSON string representation of the target.
- Returns
- JSON string of the target configuration (e.g. {"kind": "llvm", "mcpu": "cortex-a53"})
◆ ToConfig()
| TVM_TIRX_DLL ffi::Map< ffi::String, ffi::Any > tvm::TargetObj::ToConfig |
( |
| ) |
const |
- Returns
- Export target to JSON-like configuration
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
| tvm::TargetObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL |
( |
"target.Target" |
, |
|
|
TargetObj |
, |
|
|
ffi::Object |
|
|
) |
| |
◆ TargetInternal
◆ _type_s_eq_hash_kind
◆ attrs
| ffi::Map<ffi::String, Any> tvm::TargetObj::attrs |
Collection of attributes (includes feature.* keys set by canonicalizer)
◆ host
| ffi::Optional<ffi::ObjectRef> tvm::TargetObj::host |
◆ keys
| ffi::Array<ffi::String> tvm::TargetObj::keys |
◆ kind
The kind of the target device.
◆ tag
| ffi::String tvm::TargetObj::tag |
Tag of the target, can be empty.
The documentation for this class was generated from the following file: