'dlti' Dialect
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.
Attributes ¶
DataLayoutEntryAttr ¶
An attribute to represent an entry of a data layout specification.
A data layout entry attribute is a key-value pair where the key is a type or an identifier and the value is another attribute. These entries form a data layout specification.
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
key | DataLayoutEntryKey | |
value | Attribute |
DataLayoutSpecAttr ¶
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.
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
entries | ::llvm::ArrayRef<DataLayoutEntryInterface> |
TargetDeviceSpecAttr ¶
An attribute to represent target device specification.
Syntax:
#dlti.target_device_spec<
::llvm::ArrayRef<DataLayoutEntryInterface> # entries
>
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).
Example:
#dlti.target_device_spec<
#dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
entries | ::llvm::ArrayRef<DataLayoutEntryInterface> |
TargetSystemSpecAttr ¶
An attribute to represent target system specification.
Syntax:
#dlti.target_system_spec<
::llvm::ArrayRef<DeviceIDTargetDeviceSpecPair> # entries
>
A system specification describes the overall system containing multiple devices, with each device having a unique ID (string) and its corresponding TargetDeviceSpec object.
Example:
dlti.target_system_spec =
#dlti.target_system_spec<
"CPU": #dlti.target_device_spec<
#dlti.dl_entry<"dlti.L1_cache_size_in_bytes", 4096: ui32>>,
"GPU": #dlti.target_device_spec<
#dlti.dl_entry<"dlti.max_vector_op_width", 64 : ui32>>,
"XPU": #dlti.target_device_spec<
#dlti.dl_entry<"dlti.max_vector_op_width", 4096 : ui32>>>
Parameters: ¶
Parameter | C++ type | Description |
---|---|---|
entries | ::llvm::ArrayRef<DeviceIDTargetDeviceSpecPair> |