[Mlir-commits] [mlir] [mlir][vector] Reuse vector TD op in vector.xfer flatten tests (PR #180606)

Andrzej Warzyński llvmlistbot at llvm.org
Tue Feb 10 01:57:27 PST 2026


banach-space wrote:

> @banach-space Do you want to reorganize vector tests to this style in general

Sadly I have neither plans nor bandwidth to reorganize Vector tests. I may occasionally send a patch to align things a bit better, but that’s it.

If that helps, my guiding principles are:
* Tests in mlir/test/Dialect/Vector should only test Vector patterns.
* TD/ ops are infra and we don’t really write tests for infra. Instead, we use infra in tests.
* Every test file should make it clear what is being tested.
* Test files should be orthogonal (i.e. there should be no overlap in what they test).

> Is it preferred placement for new ops/patterns?

Yes - I suggest putting them in "mlir/test/Dialect/Vector/td/". We also have "mlir/test/Dialect/Linalg/td/". Perhaps naming could be improved 🤷🏻

If a file doesn’t use `// -----` to separate tests, then IMO the TD sequence can be embedded directly. I only use dedicated TD files to avoid repeating patterns in files that use `--split-input-file`.

Hopefully this makes sense :)

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


More information about the Mlir-commits mailing list