Reduce unnecessary IRs from CodeGen encoding materialization tests #20825
Labels
codegen
Shared code generation infrastructure and dialects
onboarding/codegen
Tasks suitable for new team member onboarding
quality of life 😊
Nice things are nice; let's have some
The existing tests and future lit tests add too many unnecessary IRs like tensor_ext ops and hal ops. The tricky part is that it uses type converter and it runs CSE within the pass. CSE is needed for more robust checks, as there could be many same constants created during the pass, etc.
I've been thinking how to reduce the burden for this, and my initial idea was adding
optimization_barrier
at the end of the function. Now I think maybe we should just add the support for func ops and return ops to complete the pass. The patterns are simple, and it saves a lot of IRs from the tests. IMO, we don't need to consider if they are valid inputs for codegen or not. It is more about completeness. In this case, the tests could be structured like in few categories:It also helps future support. E.g., people don't need to have those bindings in the new lit tests.
iree/compiler/src/iree/compiler/Codegen/Common/test/materialize_encoding_gfx950.mlir
Lines 11 to 27 in a96d9cf
It can just be
The text was updated successfully, but these errors were encountered: