Dlti
dlti
The Data Layout and Target Information (DLTI) dialect is intended to hold attributes and other components pertaining to descriptions of in-memory data layout and compilation targets.
https://mlir.llvm.org/docs/Dialects/DLTIDialect/
DictValueType: TypeAlias = Mapping[StringAttr | TypeAttribute | str, 'Attribute | str | int | DictValueType']
module-attribute
DLTI = Dialect('dlti', [], [DataLayoutEntryAttr, DataLayoutSpecAttr, MapAttr, TargetDeviceSpecAttr, TargetSystemSpecAttr])
module-attribute
DLTITypeConverters
Type converter for DLTIEntryMap and DataLayoutEntryAttr parameters
Source code in xdsl/dialects/dlti.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
convert_entry_map_type(contents: ArrayAttr[DataLayoutEntryAttr] | DictValueType) -> ArrayAttr[DataLayoutEntryAttr]
staticmethod
Source code in xdsl/dialects/dlti.py
36 37 38 39 40 41 42 43 | |
convert_entry_attr_key_type(key: StringAttr | TypeAttribute | str) -> Attribute
staticmethod
Source code in xdsl/dialects/dlti.py
45 46 47 48 49 50 51 52 | |
convert_entry_attr_value_type(value: Attribute | str | int | DictValueType) -> Attribute
staticmethod
Source code in xdsl/dialects/dlti.py
54 55 56 57 58 59 60 61 62 63 64 65 | |
DataLayoutEntryAttr
dataclass
Bases: ParametrizedAttribute
An attribute to represent an entry of a data layout specification. https://mlir.llvm.org/docs/Dialects/DLTIDialect/#datalayoutentryattr
Source code in xdsl/dialects/dlti.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
name = 'dlti.dl_entry'
class-attribute
instance-attribute
key: Attribute = param_def(converter=(DLTITypeConverters.convert_entry_attr_key_type))
class-attribute
instance-attribute
value: Attribute = param_def(converter=(DLTITypeConverters.convert_entry_attr_value_type))
class-attribute
instance-attribute
verify() -> None
Source code in xdsl/dialects/dlti.py
82 83 84 85 86 | |
DLTIEntryMap
dataclass
Bases: ParametrizedAttribute, ABC
Many DLTI dialect operations contain arrays of DataLayoutEntryInterface, with these representing different things such as data layout or information about the target hardware. This is the base class that these operations extend.
Source code in xdsl/dialects/dlti.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
entries: ArrayAttr[DataLayoutEntryAttr] = param_def(converter=(DLTITypeConverters.convert_entry_map_type))
class-attribute
instance-attribute
__getitem__(key: StringAttr | TypeAttribute | str) -> Attribute
Source code in xdsl/dialects/dlti.py
101 102 103 104 105 106 107 108 | |
parse_parameters(parser: AttrParser) -> tuple[ArrayAttr[DataLayoutEntryAttr]]
classmethod
Source code in xdsl/dialects/dlti.py
110 111 112 113 114 115 116 117 118 119 120 121 122 | |
print_parameters(printer: Printer)
Source code in xdsl/dialects/dlti.py
124 125 126 127 128 129 130 131 | |
verify() -> None
Source code in xdsl/dialects/dlti.py
133 134 135 | |
DataLayoutSpecAttr
dataclass
Bases: DLTIEntryMap
An attribute to represent a data layout specification.
A data layout specification is a list of entries that specify (partial) data layout information. It is expected to be attached to operations that serve as scopes for data layout requests.
https://mlir.llvm.org/docs/Dialects/DLTIDialect/#datalayoutspecattr
Source code in xdsl/dialects/dlti.py
138 139 140 141 142 143 144 145 146 147 148 149 150 | |
name = 'dlti.dl_spec'
class-attribute
instance-attribute
TargetDeviceSpecAttr
dataclass
Bases: DLTIEntryMap
An attribute to represent target device specification.
Each device specification describes a single device and its hardware properties. Each device specification can contain any number of optional hardware properties (e.g., max_vector_op_width below).
https://mlir.llvm.org/docs/Dialects/DLTIDialect/#targetdevicespecattr
Source code in xdsl/dialects/dlti.py
153 154 155 156 157 158 159 160 161 162 163 164 165 | |
name = 'dlti.target_device_spec'
class-attribute
instance-attribute
TargetSystemSpecAttr
dataclass
Bases: DLTIEntryMap
An attribute to represent target system specification.
A system specification describes the overall system containing multiple devices, with each device having a unique ID (string) and its corresponding TargetDeviceSpec object.
https://mlir.llvm.org/docs/Dialects/DLTIDialect/#targetsystemspecattr
Source code in xdsl/dialects/dlti.py
168 169 170 171 172 173 174 175 176 177 178 179 180 | |
name = 'dlti.target_system_spec'
class-attribute
instance-attribute
MapAttr
dataclass
Bases: DLTIEntryMap
A mapping of DLTI-information by way of key-value pairs
A Data Layout and Target Information map is a list of entries effectively encoding a dictionary, mapping DLTI-related keys to DLTI-related values.
https://mlir.llvm.org/docs/Dialects/DLTIDialect/#mapattr
Source code in xdsl/dialects/dlti.py
183 184 185 186 187 188 189 190 191 192 193 194 | |