This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Use ReassociationIndices instead of affine maps in linalg.reshape.
ClosedPublic

Authored by pifon2a on May 4 2021, 2:27 PM.

Diff Detail

Event Timeline

pifon2a created this revision.May 4 2021, 2:27 PM
pifon2a requested review of this revision.May 4 2021, 2:27 PM
bkramer accepted this revision.May 5 2021, 2:11 AM
bkramer added a subscriber: bkramer.

Looks good (if Nicolas signed off on this before he went on vacation)

This revision is now accepted and ready to land.May 5 2021, 2:11 AM
pifon2a edited the summary of this revision. (Show Details)May 5 2021, 2:14 AM

Looks good (if Nicolas signed off on this before he went on vacation)

Yep, he did.
https://llvm.discourse.group/t/rfc-reshape-ops-restructuring/3310

mehdi_amini added inline comments.May 5 2021, 5:57 PM
mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
434

Can you document the format?

Also this seems like something that can be useful in general outside of linalg (for example the sparse attribute also has the same thing!). Could we get a first class attribute to model this instead of arrays of array of attribute? Ideally it'd be an attribute with a safer API (both accessors and constructors).
I can also be stored more densely in memory, basically the attribute could be defined in TableGen with just two ArrayRef<int64_t>. That said it may be useful for verification purpose to store the rank as well.