Managed reference class to TargetNode.
More...
#include <target.h>
Managed reference class to TargetNode.
- See also
- TargetNode
◆ Target() [1/4]
| tvm::Target::Target |
( |
std::nullptr_t |
| ) |
|
|
inlineexplicit |
◆ Target() [2/4]
| tvm::Target::Target |
( |
const String & |
tag_or_config_or_target_str | ) |
|
|
explicit |
Construct a Target given a string.
- Parameters
-
| tag_or_config_or_target_str | the string to parse for target |
◆ Target() [3/4]
Construct a Target using a JSON-like configuration.
- Parameters
-
| config | The JSON-like configuration for target |
◆ Target() [4/4]
Construct a Target given target and host.
- Parameters
-
| target | The Target typed object with host field undefined for target |
| host | The Target typed object for target host |
- Returns
- The Target with given target and host context information
◆ Current()
| static tvm::Target tvm::Target::Current |
( |
bool |
allow_not_defined = true | ) |
|
|
static |
Get the current target context from thread local storage.
- Parameters
-
| allow_not_defined | If the context stack is empty and this is set to true, an undefined Target will be returned. Otherwise, an empty context stack will cause a runtime error. |
- Returns
- The target that is the current context. The target may not be defined if allow_not_defined is true.
◆ IsExternalCodegen()
| bool tvm::Target::IsExternalCodegen |
( |
| ) |
const |
Returns true if this target represents an external codegen. If so, this->kind->name can be used as the "Compiler" attribute on partitioned functions, and can be used to retrieve a partitioning pattern table using get_pattern_table.
◆ IsExternalCodegenFor()
| bool tvm::Target::IsExternalCodegenFor |
( |
const Target & |
that | ) |
const |
Returns true if this target represents an external codegen which is compatible with that target. In particular:
After partitioning, the external codegen compilation path may use that to guide it's compilation to a runtime::Module. Given this, an appropriate that can be found using CompilationConfig::FindPrimitiveTargetOrFail(this->GetTargetDeviceType()).
The CollagePartition pass uses this method to guide it's search over candidate partitions using external codegen.
◆ TVM_DEFINE_OBJECT_REF_METHODS()
◆ WithHost()
Create a new Target object with given target (w.o host) and target host.
- Parameters
-
| target | The current Target typed object target, with or without host field. |
| host | The given Target typed object target host |
- Returns
- The new Target object with the given target and host field of given host.
◆ TargetInternal
| friend class TargetInternal |
|
friend |
◆ With< Target >
The documentation for this class was generated from the following file: