Open hanhanW opened 3 days ago
Here is an example that we use attribute aliases in lit tests.
Here is an example that it prints A LOT OF chars in IR dump. It does not show up because we elide the types in matmul.
I personally find that the IR is hard to read when they are all in one line. The support should help it a lot, IMO.
Actually I think I'll need this feature in my prototype. It makes IR much more friendly. Assigning it to myself for now
Cool! This would be so nice to have!
Request description
Currently the tests related to encodings we have are written with using alias. It reduces a lot of visual noise. However, it is not implemented in printer, so the IR dumps still have those visual noise. What we can do is adding the support for encoding attributes, which should make IR dumps friendly. Filing an issue for tracking the feature. Below is an example that we can follow. (Unfortunately I did not find the MLIR documentations. It says that it is doable, but it does not teach me how. I spent some time to browse the code and have a rough picture about how it can be done, hopefully.)
https://github.com/iree-org/iree/blob/1444755ad2e19707f0f5461cf9e499d8f3c093a9/compiler/src/iree/compiler/Dialect/HAL/IR/HALDialect.cpp#L31-L52
cc @Max191 who might be interested in it.
What component(s) does this issue relate to?
Compiler, MLIR
Additional context
No response