This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add a new pattern to handle folding unit reduction dims.
ClosedPublic

Authored by hanchung on Nov 28 2022, 11:33 AM.

Details

Summary

The output operands will be added to input operands if the generic op (on tensors)
becomes an elementwise operation. The outputs of the generic op is still the same.
They will be cleaned up by ReplaceWithEmptyTensorIfUnused pattern.

This is https://reviews.llvm.org/D138251, plus a cmake dep fix.

Diff Detail

Event Timeline

hanchung created this revision.Nov 28 2022, 11:33 AM
hanchung requested review of this revision.Nov 28 2022, 11:33 AM
mravishankar accepted this revision.Nov 28 2022, 12:43 PM
This revision is now accepted and ready to land.Nov 28 2022, 12:43 PM