This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Extend linalg vectorization to MatmulOp
ClosedPublic

Authored by nicolasvasilache on Jan 17 2020, 11:33 AM.

Details

Summary

This is a simple extension to allow vectorization to work not only on GenericLinalgOp
but more generally across named ops too.
For now, this still only vectorizes matmul-like ops but is a step towards more
generic vectorization of Linalg ops.

Diff Detail

Event Timeline

Unit tests: pass. 61909 tests passed, 0 failed and 782 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

The change is mostly renaming/clean-up. I only have minor comments, feel free to land after addressing.

mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
192–193

Why SmallVector<Value, 0> ? Maybe just use std::vector if you don't need stack elements.

ftynse accepted this revision.Jan 17 2020, 11:54 AM
tra resigned from this revision.Jan 17 2020, 12:02 PM
This revision is now accepted and ready to land.Jan 17 2020, 12:02 PM
tra removed a reviewer: tra.Jan 17 2020, 12:03 PM
nicolasvasilache marked 2 inline comments as done.Jan 17 2020, 2:13 PM
nicolasvasilache added inline comments.
mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
192–193

This connects to RewriterGen.cpp in subtle ways and the only thing I have found to work with brace initializations and without changing RewriterGen too much is this.
Ther eis an internal bug I filed if you want to try and make the world a better place.
For me, I have shelved it for now :)

This revision was automatically updated to reflect the committed changes.
nicolasvasilache marked an inline comment as done.