24 #ifndef TVM_RELAY_ATTRS_MEMORY_H_ 25 #define TVM_RELAY_ATTRS_MEMORY_H_ 50 .describe(
"The dtype of the tensor to allocate.")
52 TVM_ATTR_FIELD(virtual_device).describe(
"The virtual device on which to allocate memory.");
66 .describe(
"The dtype of the tensor to allocate.")
68 TVM_ATTR_FIELD(const_shape).describe(
"The shape of constant used to aid in type inference.");
71 "The shape to cast the return type of the allocation to, " 72 "used to specify the shape obtained via further analysis.");
78 #endif // TVM_RELAY_ATTRS_MEMORY_H_ std::vector< TensorType > FlattenTupleType(const Type &type)
TVM_DECLARE_ATTRS(AllocStorageAttrs, "relay.attrs.AllocStorageAttrs")
Definition: memory.h:48
A compile time representation for where data is to be stored at runtime, and how to compile code to c...
Relay expression language.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
DataType dtype
Definition: memory.h:45
static VirtualDevice FullyUnconstrained()
Returns the unique fully unconstrained VirtualDevice.
Array< IndexExpr > assert_shape
Definition: memory.h:61
std::vector< Expr > FromTupleType(const Type &type, const Expr &expr)
VirtualDevice virtual_device
Definition: memory.h:46
Helpers for attribute objects.
Options for allocating tensors.
Definition: memory.h:59
Managed reference class to VirtualDeviceNode.
Definition: virtual_device.h:271
Runtime primitive data type.
Definition: data_type.h:41
DataType dtype
Definition: memory.h:62
static DataType Float(int bits, int lanes=1)
Construct an float type.
Definition: data_type.h:178
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
tvm::Type Type
Definition: type.h:47
Options for allocating storage.
Definition: memory.h:44
tvm::RelayExpr Expr
Definition: expr.h:54
Constant const_shape
Definition: memory.h:60
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:834
TVM_DECLARE_ATTRS(AllocTensorAttrs, "relay.attrs.AllocTensorAttrs")
Definition: memory.h:64
Expr ToTupleType(const Type &t, const std::vector< Expr > &exprs)