[Mlir-commits] [mlir] [Linalg][Vectorization] Add support for linalg vectorization of a tensor.extract case (PR #107922)
Andrzej Warzyński
llvmlistbot at llvm.org
Thu Sep 19 11:52:00 PDT 2024
================
@@ -810,6 +810,23 @@ static Value calculateGatherOffset(RewriterBase &rewriter,
enum VectorMemoryAccessKind { ScalarBroadcast, Contiguous, Gather };
+/// Find the non constant dim in a linalgOp. This is used for finding contiguous
+/// loads and it is expected that only one dim will be non constant, if thats
+/// not the case this function will assert.
----------------
banach-space wrote:
[nit] A few suggestions regarding this comment. WDYT? I know that I am a bit pedantic, but these comments really help when re-visiting this rather ... involved logic 😅
```suggestion
/// Find the non-unit dim in a linalgOp.
/// When executing this hook, it is expected that only one dim will be non-unit.
/// Other cases (i.e. reading n-D vectors) should've been labelled as gather loads before
/// calling this method. This is used for finding contiguous
/// loads (represented as `tensor.extract`) within `linalg.generic` Ops.
```
https://github.com/llvm/llvm-project/pull/107922
More information about the Mlir-commits
mailing list