Page MenuHomePhabricator

[mlir][linalg] Specialize LinalgOp canonicalization patterns (NFC).
ClosedPublic

Authored by gysit on Jul 1 2021, 8:26 AM.

Details

Summary

Specialize the DeduplicateInputs and RemoveIdentityLinalgOps patterns for GenericOp instead of implementing them for the LinalgOp interface.

This revsion is based on https://reviews.llvm.org/D105622 that moves the logic to erase identity CopyOps in a separate pattern.

Diff Detail

Event Timeline

gysit created this revision.Jul 1 2021, 8:26 AM
gysit requested review of this revision.Jul 1 2021, 8:26 AM
gysit updated this revision to Diff 355905.Jul 1 2021, 9:10 AM

Ensure the optional doc and library call attributes are copied as well.

gysit added inline comments.Jul 1 2021, 9:12 AM
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
726–733

I chose to use the generic op builder and inline the region here instead of using the LinalgOp.clone. I though this is more in line with the new pattern working on GenericOps only but I am fine to switch back to the LinalgOp.clone.

nicolasvasilache requested changes to this revision.Jul 7 2021, 1:04 PM

Some parts seem to be mechanical and NFC and should be sent for review as such.
The new pattern seems to no be NFC and to require a test?

This revision now requires changes to proceed.Jul 7 2021, 1:04 PM
gysit updated this revision to Diff 357193.Jul 8 2021, 4:35 AM
gysit retitled this revision from [mlir][linalg] Specialize LinalgOp canonicalization patterns. to [mlir][linalg] Specialize LinalgOp canonicalization patterns (NFC)..Jul 8 2021, 4:38 AM
gysit edited the summary of this revision. (Show Details)
nicolasvasilache accepted this revision.Jul 12 2021, 5:19 AM
This revision is now accepted and ready to land.Jul 12 2021, 5:19 AM
gysit updated this revision to Diff 362329.Jul 28 2021, 4:23 AM

Rebase.

This revision was landed with ongoing or failed builds.Jul 28 2021, 4:40 AM
This revision was automatically updated to reflect the committed changes.