[Mlir-commits] [mlir] [mlir][linalg] Vectorize directly to a named contraction (PR #147296)
Adam Siemieniuk
llvmlistbot at llvm.org
Wed Jul 16 05:53:18 PDT 2025
adam-smnk wrote:
Rebased on main + addressed comments.
Thanks for the feedback again!
I updated the vectorizer behavior to align with the above discussions. The vectorizer will fail on named contraction ops with broadcasts. This will force users to make an explicit decision: either decompose broadcasts first or generalize ops to use the existing generic path as a fallback.
About making it the default now or later.
The new vectorization path for `ContractionOpInterface` diverges from the current generic path in: will produce `vector.contract` directly (probably desired), will fail when broadcasts are present (requires user pipeline update), created `vector.contract` retains mixed precision - same as calling `vector::populateFoldArithExtensionPatterns` today (will require user pipeline update).
If we were to enable this new vectorization path as a default, the old vectorizer behavior can still be achieved by generalizing linalg ops first. This will force the current generic path and vectorization through `multi_reduction`.
This should be minimally invasive but still requires user intervention.
@banach-space @dcaballe @hanhanW Any preferences on how to proceed here?
https://github.com/llvm/llvm-project/pull/147296
More information about the Mlir-commits
mailing list