This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Support N-D vector in InsertMap/ExtractMap op
ClosedPublic

Authored by ThomasRaoux on Nov 6 2020, 6:27 PM.

Details

Summary

Support multi-dimension vector for InsertMap/ExtractMap op and update the transformations. Currently the relation between IDs and dimension is implicitly deduced from the types. We can then calculate an AffineMap based on it. In the future the AffineMap could be part of the operation itself.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Nov 6 2020, 6:27 PM
ThomasRaoux requested review of this revision.Nov 6 2020, 6:27 PM

missed clang-format

aartbik added inline comments.Nov 9 2020, 11:05 AM
mlir/include/mlir/Dialect/Vector/VectorOps.td
467

you use small id and big ID. please unify, also perhaps link it clearl yback to the id variadic in the doc

468

typo: from

708

same comments on id

mlir/test/lib/Transforms/TestVectorTransforms.cpp
181

typo

Address review comments.

ThomasRaoux marked 3 inline comments as done.Nov 9 2020, 2:44 PM
ThomasRaoux added inline comments.
mlir/include/mlir/Dialect/Vector/VectorOps.td
467

Made it id everywhere and reference ids to clarify it.

few more nits

mlir/include/mlir/Dialect/Vector/VectorOps.td
468

Can you please say a bit more about this "implicitly deduced", i.e. how it works. We use that phrase at a few places in our doc, but in general readers don't always find it obvious. Just stating the mechanism would help a lot improving our doc.

709

came, or refer to the one above for details if you don't want to repeat

757–758

ids

mlir/include/mlir/Dialect/Vector/VectorTransforms.h
234

ids

Address more review comments

ThomasRaoux marked 3 inline comments as done.Nov 11 2020, 10:01 PM
ThomasRaoux added inline comments.
mlir/include/mlir/Dialect/Vector/VectorOps.td
468

Added more details. Hopefully that makes it clearer.

aartbik accepted this revision.Nov 12 2020, 10:28 AM
aartbik added inline comments.
mlir/lib/Dialect/Vector/VectorOps.cpp
1314

are these TABs, or is this again a phabricator display issue?

mlir/test/lib/Transforms/TestVectorTransforms.cpp
193

same question

This revision is now accepted and ready to land.Nov 12 2020, 10:28 AM
rriddle added inline comments.Nov 12 2020, 10:30 AM
mlir/lib/Dialect/Vector/VectorOps.cpp
1314

It just means that the whitespace has changed.

ThomasRaoux marked an inline comment as done.Nov 12 2020, 10:30 AM
ThomasRaoux added inline comments.
mlir/lib/Dialect/Vector/VectorOps.cpp
1314

This is Phabricator display issue. This is how Phabricator shows that the line was indented but not modified.

aartbik added inline comments.Nov 12 2020, 1:57 PM
mlir/lib/Dialect/Vector/VectorOps.cpp
1314

Thanks both for the background.