iree-org / iree

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

[Codegen][NFC] Move encoding related containers to Dialect/Codegen/Utils #19234

Closed hanhanW closed 4 days ago

hanhanW commented 5 days ago

The revision moves MaterializeEncodingInfo struct and TileSwizzle struct to compiler/Codegen/Dialect/Codegen/Utils/Utils.[h|cpp]. It is a preparation for https://github.com/iree-org/iree/issues/17924 because they are how we define layouts in data-tiling and we're going to expose the layouts to EncodingAttr.

The revision also updates the namespace in GPUTileSwizzleUtils.[h|cpp], which follows the convention; a typo in license. They are all created in 2024, so the year should be 2024: https://github.com/iree-org/iree/commit/740e301d61e18a5833e1a2d75b476ae850f8c17e

hanhanW commented 5 days ago

I do not like to have IREE::Codegen:: prefix after we move it to the other folders.. Perhaps we can forward some declares like mlir/Support/LLVM.h, then we wont be bothered in the compiler/Codegen/* anymore?

Max191 commented 4 days ago

I do not like to have IREE::Codegen:: prefix after we move it to the other folders.. Perhaps we can forward some declares like mlir/Support/LLVM.h, then we wont be bothered in the compiler/Codegen/* anymore?

Yeah, that sounds like a nice cleanup to do at some point. The Flow namespace also adds a lot of chars in many of the pre-codegen files.