Page MenuHomePhabricator

[mlir][Linalg] Add support for fusion between indexed_generic ops and tensor_reshape ops
ClosedPublic

Authored by hanchung on May 20 2020, 5:48 PM.

Details

Summary

The fusion for tensor_reshape is embedding the information to indexing maps,
thus the exising pattenr also works for indexed_generic ops.

Depends On D80347

Diff Detail

Event Timeline

hanchung created this revision.May 20 2020, 5:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2020, 5:48 PM
mravishankar requested changes to this revision.May 23 2020, 12:05 PM

Good to know that this minimal change works as expected (I hoped it would). Thanks for adding tests.
Based on the previous patch in this stack, if we can combine the methods for fusion of generic/indexed-generic producer/consumer then I think this change will not be needed. The tests are still useful though. Will wait to review this again after that.

This revision now requires changes to proceed.May 23 2020, 12:05 PM
hanchung updated this revision to Diff 266378.May 26 2020, 4:55 PM

Update parents

Good to know that this minimal change works as expected (I hoped it would). Thanks for adding tests.
Based on the previous patch in this stack, if we can combine the methods for fusion of generic/indexed-generic producer/consumer then I think this change will not be needed. The tests are still useful though. Will wait to review this again after that.

This is a bit tricky, we still need the change to deduce the type of the op to create (whether this is GenericOp or IndexedGenericOp).

mravishankar accepted this revision.May 27 2020, 10:14 AM

This is a bit tricky, we still need the change to deduce the type of the op to create (whether this is GenericOp or IndexedGenericOp).

I agree. This is more evidence for me that the indexed-generic and generic should really become op-interfaces after the named ops are replaced with generated ops in Linalg. @nicolasvasilache what do you think. I can start a discussion on discourse if thats a better forum.

This revision is now accepted and ready to land.May 27 2020, 10:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2020, 2:15 PM
This revision was automatically updated to reflect the committed changes.