This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix tiling for `tensor.unpack` with outer permutations
ClosedPublic

Authored by chelini on Jan 13 2023, 6:36 AM.

Details

Summary

An outer dim permutation requires adjusting the offsets and sizes of the
tensor.extract_slice operations generated during tiling. Originally
this was done by computing an inverse permutation of the outer
permutation for both tensor.pack and tensor.unpack. For packing, the
tiling is applied on interchanged dimensions; thus, it is correct to
compute the inverse. For unpacking, on the other hand, tiling involves
the output tensor that does not have interchanged dimensions, and no
inverse is required.

Diff Detail

Event Timeline

chelini created this revision.Jan 13 2023, 6:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 6:36 AM
chelini requested review of this revision.Jan 13 2023, 6:36 AM
hanchung accepted this revision.Jan 13 2023, 12:56 PM

Thanks for fixing this!

This revision is now accepted and ready to land.Jan 13 2023, 12:56 PM