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();
205 #endif // TVM_TARGET_COMPILATION_CONFIG_H_ friend class CompilationConfig
Definition: compilation_config.h:183
Managed reference class to CompilationConfig.
Definition: compilation_config.h:191
constexpr const char * device_type
The device type.
Definition: stmt.h:1355
A compile time representation for where data is to be stored at runtime, and how to compile code to c...
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
static VirtualDevice FullyUnconstrained()
Returns the unique fully unconstrained VirtualDevice.
Optional< Target > FindPrimitiveTargetForKind(const std::string &kind_name) const
Returns the unique Target to use for kind_name. Returns null if none such.
A cache of VirtualDevices. This can be used:
Definition: virtual_device.h:359
Target CanonicalTarget(const Target &target) const
Returns a Target structurally equal to target, however prefer a structually equal known host or primi...
base class of all object containers.
Definition: object.h:167
static constexpr const char * _type_key
Definition: compilation_config.h:158
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
Managed reference class to VirtualDeviceNode.
Definition: virtual_device.h:271
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
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
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
PassContext that is used to configure the pass behavior.
Definition: transform.h:153
#define TVM_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:713
Managed reference class to TargetNode.
Definition: target.h:183
Base class of all object reference.
Definition: object.h:511
VirtualDevice default_primitive_virtual_device
VirtualDevice for primitive operators which are not otherwise constrained to a particular device...
Definition: compilation_config.h:106
#define TVM_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:671
void VisitAttrs(AttrVisitor *v)
VirtualDevice host_virtual_device
VirtualDevice for the host.
Definition: compilation_config.h:109
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
VirtualDevice CanonicalVirtualDevice(const VirtualDevice &virtual_device) const
Returns a VirtualDevice which is structurally equal to virtual_device on all its constrained fields...
Array< Target > primitive_targets
Vector of all available Targets for partitioning or compiling primitive tensor operators (kernels)...
Definition: compilation_config.h:99
Gathers the Targets and distinguished VirtualDevices in canonical form needed to compile a Relay modu...
Definition: compilation_config.h:54
Target FindPrimitiveTargetForDeviceOrFail(DLDeviceType device_type) const
Returns the unique Target to use for device_type. Fail if no such target exists.