This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tensor] Add producer fusion for tensor.pack op.
ClosedPublic

Authored by hanchung on Aug 14 2023, 3:50 PM.

Details

Summary

We are able to fuse the pack op only if inner tiles are not tiled or
they are fully used. Otherwise, it could generate a sequence of
non-trivial ops.

Diff Detail

Event Timeline

hanchung created this revision.Aug 14 2023, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 3:50 PM
hanchung requested review of this revision.Aug 14 2023, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 3:50 PM
chelini added inline comments.Aug 15 2023, 10:49 AM
mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
231

Thanks, looks good, but I am not sure I understand this comment. If we want to fuse with the producer we want to iterate on the full tile (0 offest and full dim) and not a partial one, right?

hanchung added inline comments.Aug 15 2023, 11:10 AM
mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp
231

Good catch. You are right, I miswrote the comment.... Sorry about that...

hanchung updated this revision to Diff 550405.Aug 15 2023, 11:13 AM

update comments

hanchung updated this revision to Diff 550407.Aug 15 2023, 11:14 AM

update comments

chelini accepted this revision.Aug 16 2023, 5:01 AM

Nice, thanks!

This revision is now accepted and ready to land.Aug 16 2023, 5:01 AM
This revision was automatically updated to reflect the committed changes.