[Mlir-commits] [mlir] [mlir][arith] Add more canonicalization and integration tests coverage (PR #92272)

Jacob Yu llvmlistbot at llvm.org
Thu Aug 29 05:04:29 PDT 2024


pingshiyu wrote:

@joker-eph @banach-space 

Thank you for the comments! 

On motivation: some of the existing tests do indeed test existing/historical bugs in MLIR, and others are motivated by bugs found in my independent implementation of MLIR semantics (which would be useful safeguards since those are bugs that _may be tempting_ to introduce). From these some extra tests were added for a more complete test suite (if they are very natural to add, and that there's not an overwhelming number of them). I'll add more details in the comments about these where appropriate.

On integration vs. unit testing: there may indeed be some duplication here - like @banach-space suggested also audit these against existing unit tests once these are merged in! Although, several of the bugs the tests cover are from lowering steps down to LLVM. To test the produced LLVM code, to the best of my knowledge, integration tests seems to be the way (comparing LLVM code directly, rather than executing them, would be a bit fragile imo), but would be happy to be corrected by someone who have deeper knowledge about the testing infrastructure.

As for runtime costs of these tests, I did some tests earlier today (personal laptop, default options, all integration tests), and all of the new tests adds ~1 second to the total running time (263.67s with all new tests, 262.87s without, average taken over 3 runs). 

https://github.com/llvm/llvm-project/pull/92272


More information about the Mlir-commits mailing list