This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Handle linalg.index correctly in TilingInterface
ClosedPublic

Authored by ftynse on Jul 8 2022, 4:54 AM.

Details

Summary

The existing implementation of the TilingInterface for Linalg ops was not
modifying the linalg.index ops contained within other Linalg ops (they need
to be summed up with the values of respective tile loop induction variables),
which led to the interface-based tiling being incorrect for any Linalg op with
index semantics.

In the process, fix the function performing the index offsetting to use the
pattern rewriter API instead of RAUW as it is being called from patterns and
may mess up the internal state of the rewriter. Also rename the function to
clearly catch all uses.

Depends On D129365

Diff Detail

Event Timeline

ftynse created this revision.Jul 8 2022, 4:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2022, 4:54 AM
ftynse requested review of this revision.Jul 8 2022, 4:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2022, 4:54 AM
ftynse updated this revision to Diff 443215.Jul 8 2022, 5:03 AM

Fix test.

mravishankar accepted this revision.Jul 11 2022, 7:51 PM

Thanks Alex!

This revision is now accepted and ready to land.Jul 11 2022, 7:51 PM
This revision was automatically updated to reflect the committed changes.