25 #ifndef TVM_TARGET_COMPILATION_CONFIG_H_
26 #define TVM_TARGET_COMPILATION_CONFIG_H_
158 static constexpr
const char*
_type_key =
"CompilationConfig";
176 static Target MakeDefaultCPUTarget();
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
Gathers the Targets and distinguished VirtualDevices in canonical form needed to compile a Relay modu...
Definition: compilation_config.h:54
void VisitAttrs(AttrVisitor *v)
VirtualDevice host_virtual_device
VirtualDevice for the host.
Definition: compilation_config.h:109
Target CanonicalTarget(const Target &target) const
Returns a Target structurally equal to target, however prefer a structually equal known host or primi...
VirtualDevice CanonicalVirtualDevice(const VirtualDevice &virtual_device) const
Returns a VirtualDevice which is structurally equal to virtual_device on all its constrained fields,...
static constexpr const char * _type_key
Definition: compilation_config.h:158
Target host_target
The host target. Used for 'scalar' data and code (such as shapes and shape functions) and residual Re...
Definition: compilation_config.h:65
Array< Target > primitive_targets
Vector of all available Targets for partitioning or compiling primitive tensor operators (kernels)....
Definition: compilation_config.h:99
Target FindPrimitiveTargetForDeviceOrFail(DLDeviceType device_type) const
Returns the unique Target to use for device_type. Fail if no such target exists.
VirtualDevice default_primitive_virtual_device
VirtualDevice for primitive operators which are not otherwise constrained to a particular device....
Definition: compilation_config.h:106
Target optional_homogeneous_target
If defined then compile and/or run in 'homogenous execution mode'. In this mode all primitives are co...
Definition: compilation_config.h:120
Optional< Target > FindPrimitiveTargetForKind(const std::string &kind_name) const
Returns the unique Target to use for kind_name. Returns null if none such.
Managed reference class to CompilationConfig.
Definition: compilation_config.h:191
TVM_DEFINE_OBJECT_REF_METHODS(CompilationConfig, ObjectRef, CompilationConfigNode)
CompilationConfig(const transform::PassContext &pass_ctx, const Array< Target > &raw_targets)
Constructs the compilation config given the settings in pass_ctx and supplied raw_targets....
Managed reference class to TargetNode.
Definition: target.h:200
A cache of VirtualDevices. This can be used:
Definition: virtual_device.h:358
Managed reference class to VirtualDeviceNode.
Definition: virtual_device.h:271
static VirtualDevice FullyUnconstrained()
Returns the unique fully unconstrained VirtualDevice.
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Base class of all object reference.
Definition: object.h:519
base class of all object containers.
Definition: object.h:171
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
PassContext that is used to configure the pass behavior.
Definition: transform.h:182
constexpr const char * device_type
The device type.
Definition: stmt.h:1422
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
#define TVM_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:702
A compile time representation for where data is to be stored at runtime, and how to compile code to c...