Class Target#
Defined in File target.h
Inheritance Relationships#
Base Type#
public ffi::ObjectRef
Class Documentation#
-
class Target : public ffi::ObjectRef#
Managed reference class to TargetObj.
See also
Public Functions
-
explicit Target(const ffi::String &tag_or_config_or_target_str)#
Construct a Target given a string.
- Parameters:
tag_or_config_or_target_str – the string to parse for target
-
explicit Target(const ffi::Map<ffi::String, ffi::Any> &config)#
Construct a Target using a JSON-like configuration.
- Parameters:
config – The JSON-like configuration for target
-
inline explicit Target(Target target, ffi::Optional<Target> host)#
Construct a Target given target and host.
-
inline explicit Target(::tvm::ffi::UnsafeInit tag)#
-
inline __PtrType operator->() const#
-
inline __PtrType get() const#
Public Static Functions
-
static ffi::Optional<Target> Current(bool allow_not_defined = true)#
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, std::nullopt will be returned. Otherwise, an empty context stack will cause a runtime error.
- Returns:
The target that is the current context. The result may be absent if allow_not_defined is true.
-
explicit Target(const ffi::String &tag_or_config_or_target_str)#