Data Layout & Target Information‐dialect - libxsmm/tpp-mlir GitHub Wiki
Data Layout and Target Information - raison d'être
Data Layout and Target Information is crucial in ensuring the correctness of lowerings (e.g. bitwidth of datatypes like pointers) and attaining optimal performance (e.g. tiling with vector unit widths & cache sizes in mind). Despite being crucial, these target-dependent parameters are often passed into a pipeline as last-minute, tagged-on "magic values". MLIR's DLTI-dialect provides an alternative: annotate IR with hardware-describing attributes and query them through a simple API. This enables transforms to automatically obtain appropriate parameters from target info. Additionally cost models can query (and be queried through) DLTI and DLTI can facilitate auto-tuning - see the below.
Dict-like (nested) attributes to encode arbitrary hardware info in a structured way
Transforms can query DLTI to automatically fill in relevant parameters
- TODO: explain C++ interfaces (old and query-interface)
- TODO: explain
transform.dlti.query
and its role in schedules
Transform-dialect schedules and DTLI
- e.g. can specify parameter spaces to facilitate autotuning.
Exposing info fetched from elsewhere through the query interface
LLVM's Data Layout and Target Transform Info can be made accessible to MLIR infrastructure
cost models can respond to DLTI-queries while themselves relying on DLTI-queries;
General TODOs for this document
- Describe pre-summer 2024 state of DLTI.
- Describe new functionality added since then, i.e. query interface and helpers, support for nested attributes and querying, WIP on shadowing.