The patch extends the vectorization pass to lower linalg index operations to vector code. It allocates constant 1d vectors that enumerate the indexes along the iteration dimensions and broadcasts/transposes these 1d vectors to the iteration space.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Please give @nicolasvasilache a chance to review.
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td | ||
---|---|---|
1247 | Naming nit: "StaticOperandDims" was confusing to me consider swapping to "OperandStaticDims" that makes clear _what_ is static (dimensions) | |
mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp | ||
201–202 | llvm::append_range(res, t.getShape()) spares you the loop, and decreases the number of dynamic allocations | |
227 | Nit: please spell out the auto. We generally use auto when the type is excessively long (iterators, lambdas) or evident from context (RHS is a cast). |
Comment Actions
Addressing review comments:
- rename StaticOperandDims to OperandStaticDims
- spell out auto
- use llvm::append instead of a loop
Naming nit: "StaticOperandDims" was confusing to me consider swapping to "OperandStaticDims" that makes clear _what_ is static (dimensions)