[Mlir-commits] [mlir] [mlir][nfc] Update vectorize-tensor-extract.mlir (3/N) (PR #119121)

Andrzej Warzyński llvmlistbot at llvm.org
Wed Dec 11 07:20:20 PST 2024


banach-space wrote:

> I can see that you are putting a lot of effort in naming things properly, including the CHECK variable. I appreciate the effort. 

Thank you :)

> I wonder if it would make sense to implement a utility that could help with that and make it more efficient. 

We could extend [generate-test-checks.py](https://github.com/llvm/llvm-project/blob/main/mlir/utils/generate-test-checks.py) to generate "smarter" LIT variable names for function arguments, e.g., 
* `%src` -> `%[[SRC:.*]]`. 

That said, I’m not sure how much beyond this could be effectively automated. In my view, writing good tests with descriptive variables requires thoughtful input from humans who understand:

*  the code being tested.
* the purpose of the test itself.

>From there, we ("humans") need to ensure consistent naming within each test file. Consistency is especially valuable when dealing with hundreds of CHECK lines.

In the case of the "vectorization of tensor.extract" tests, I’ll admit I didn’t do the best job (that was mostly me!), so I’m now trying to fix it - hopefully to the benefit of everyone! 😊

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


More information about the Mlir-commits mailing list