[Mlir-commits] [mlir] [mlir] Return vectorized values instead of replacing (PR #144158)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Jun 19 10:26:11 PDT 2025
================
@@ -771,17 +771,24 @@ LogicalResult deallocateGPUPrivateMemory(OpBuilder &, Value /*buffer*/);
/// to work (these are checked by the vectorizer itself).
bool hasVectorizationImpl(Operation *);
+/// Transformation information returned after vectorizing.
+struct VectorizationResult {
+ /// Results of the vectorization transform to replace the original operation.
+ SmallVector<Value> replacements;
+};
----------------
banach-space wrote:
1. Not quite "transformation information" ;-)
2. Do we need a vector of results? I don't want to sound "limiting" or call for a bigger refactor in this PR, but from what I recall, the vectorizer always gets an Op with one result and returns a vectorized result. Is this true? I just suspect that a single `Value` would be sufficient. This could be something for a follow-up PR.
3. `VectorizationResult` -> `VectorizedResult`? This name is a bit too close to `VectorizationHookResult` and the distinction is not well documented. My suggestion is not that much better, but it "hints" it's just the actual vectorized Op (as opposed to "vectorized Op + status flag"). I will try to come back with sth better :)
https://github.com/llvm/llvm-project/pull/144158
More information about the Mlir-commits
mailing list