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
convert_entry_map_type(contents: ArrayAttr[DataLayoutEntryAttr] | DictValueType) -> ArrayAttr[DataLayoutEntryAttr]
staticmethod
¶
Source code in xdsl/dialects/dlti.py
convert_entry_attr_key_type(key: StringAttr | TypeAttribute | str) -> Attribute
staticmethod
¶
convert_entry_attr_value_type(value: Attribute | str | int | DictValueType) -> Attribute
staticmethod
¶
Source code in xdsl/dialects/dlti.py
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
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
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
entries: ArrayAttr[DataLayoutEntryAttr] = param_def(converter=DLTITypeConverters.convert_entry_map_type)
class-attribute
instance-attribute
¶
__getitem__(key: StringAttr | TypeAttribute | str) -> Attribute
¶
parse_parameters(parser: AttrParser) -> tuple[ArrayAttr[DataLayoutEntryAttr]]
classmethod
¶
Source code in xdsl/dialects/dlti.py
print_parameters(printer: Printer)
¶
Source code in xdsl/dialects/dlti.py
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
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
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
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