Page MenuHomePhabricator

[mlir][linalg] Fix bufferize pattern to allow unknown operations in body of generic
ClosedPublic

Authored by herhut on Sep 10 2021, 1:34 AM.

Details

Summary

The original version of the bufferization pattern for linalg.generic would manually clone operations within the region to the bufferized clone of the operation. This triggers legality requirements on those operations in the conversion infra. Instead, this now uses the rewriter to inline the region instead, avoiding those legality requirements.

Diff Detail

Event Timeline

herhut created this revision.Sep 10 2021, 1:34 AM
herhut requested review of this revision.Sep 10 2021, 1:34 AM

Note that this is already tested by existing tests that use the math dialect.

pifon2a accepted this revision.Sep 10 2021, 1:36 AM

Thank you, Stephan!

This revision is now accepted and ready to land.Sep 10 2021, 1:36 AM
herhut updated this revision to Diff 371849.Sep 10 2021, 2:52 AM

also support linalg ops with hidden regions like dot.

pifon2a accepted this revision.Sep 10 2021, 3:40 AM
herhut updated this revision to Diff 371866.Sep 10 2021, 3:58 AM

clang tidy fix