'iree_cpu' Dialectlink
A dialect for common functionality used by CPU focused IREE code generation.
This dialect provides operations and attributes to aid in code generation for CPU targets. The functionality in this dialect can be hardware specific, but is intended to be independent of the lowering target. Late lowerings to LLVM are handled separately.
Attributeslink
CPUEncodingResolverAttrlink
The encoding layout attribute for CPU backends.
Syntax:
#iree_cpu.cpu_encoding_resolver<
DictionaryAttr # configuration
>
This attribute can implement any layout interface methods for encoding serialization and or materialization, e.g., Encoding::LayoutMaterializerAttr, Codegen::PackedLayoutMaterializerAttr, etc. They are implemented through external model mechanism See the implementation in compiler/Codegen/ExternalInterfaces/*.
Parameters:link
| Parameter | C++ type | Description |
|---|---|---|
| configuration | DictionaryAttr |
Executable target configuration. It is expected to be used in a pass scope, but not the final IR output. |
LoweringConfigAttrlink
Drive lowering of an operation for cpu compilation.
CPU specific implementation of a lowering config. This carries just a dictionary attribute to store any relevant fields. This is the simplest form of a lowering config, offering flexibility at the cost of structure.
For some key entries, e.g., distribution, etc., they must be IREE::Codegen::LoweringConfigTilingLevelAttr, which is a list of tile sizes with optional scalable representation like vector types. E.g.,
#iree_cpu.lowering_config< distribution = [128, 128, 0], cache_parallel = [64, 64, 0], cache_reduction = [0, 0, 16], vector_common_parallel = [[4], [4], 0], vector_reduction = [0, 0, [4]], vector_inner_parallel = [0, 0, 0]
For more details, see the implementation in IREECPUAttrs.cpp.
Note that it is undefined if more than one of vector tiling levels set a value on a dimension. They are expected to be disjoint. It is not enforced in the verifier, because we want to keep the flexibility when something is wrong in a lowering config. E.g., some transformations still work even if they are not disjoint.
Parameters:link
| Parameter | C++ type | Description |
|---|---|---|
| config | DictionaryAttr |
The configured fields, including tiling levels. |
VMVXEncodingResolverAttrlink
The encoding layout attribute for VMVX backend.
Syntax:
#iree_cpu.vmvx_encoding_resolver<
DictionaryAttr # configuration
>
This attribute can implement any layout interface methods for encoding serialization and or materialization, e.g., Encoding::LayoutMaterializerAttr, Codegen::PackedLayoutMaterializerAttr, etc. They are implemented through external model mechanism See the implementation in compiler/Codegen/ExternalInterfaces/*.
Parameters:link
| Parameter | C++ type | Description |
|---|---|---|
| configuration | DictionaryAttr |
Executable target configuration. It is expected to be used in a pass scope, but not the final IR output. |