This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Linalg] Avoid padding attribute in `pack` when possible
ClosedPublic

Authored by chelini on Jul 6 2023, 7:06 AM.

Details

Summary

If we deal with statically known tensors and tiles and a given tile
perfectly divides a given dimension, we can omit the padding attribute.
As a bonus point, we can now run pack and unpack propagation
(currently, we bail out during propagation if we have the padding
attribute).

Diff Detail

Event Timeline

chelini created this revision.Jul 6 2023, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 7:06 AM
chelini requested review of this revision.Jul 6 2023, 7:06 AM

thank you @chelini !

mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
1826

I am not sure I understand this sentence about "assumption" especially because I don't understand the consequence of assuming something or not.

Can we rephrase this as something like:

No assumption is made on divisibility, in particular, if the tile or the shape (or both) contain dynamic values then ... (padding is required?)
This revision is now accepted and ready to land.Jul 11 2023, 12:57 AM
chelini updated this revision to Diff 538975.Jul 11 2023, 2:22 AM

Improve comment.

This revision was landed with ongoing or failed builds.Jul 11 2023, 2:32 AM
This revision was automatically updated to reflect the committed changes.