iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.85k stars 620 forks source link

[Encoding] Introduce EncodingLayoutAttrInterface. #19216

Closed hanhanW closed 20 hours ago

hanhanW commented 2 days ago

The revisions introduces a new attribute interface in the Encoding dialect. The interface is used to query layout information needed to materialize encoding attributes.

Any backend can implement the interface to interpret an encoding layout based on their needs.

The current expectation of the interface is to propagate layout information from backends to the host compilation or other targets. The expectation can be adjusted as long as we identify additional needs for encodings/layouts.

It is a step towards https://github.com/iree-org/iree/issues/17924