This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add scalar operands inlining pattern
ClosedPublic

Authored by herhut on May 18 2021, 3:16 AM.

Details

Summary

This pattern inlines operands to a linalg.generic operation that use a constant index and hence are loop-invariant scalars. This reduces the number of linalg.generic operands and unlocks some canonicalizations that rely on seeing an explicit tensor.extract.

Diff Detail

Event Timeline

herhut created this revision.May 18 2021, 3:16 AM
herhut requested review of this revision.May 18 2021, 3:17 AM
herhut updated this revision to Diff 346094.May 18 2021, 3:21 AM

Minor cleanup

herhut updated this revision to Diff 346157.May 18 2021, 6:26 AM

Fix Cmake files.

bkramer accepted this revision.May 21 2021, 6:08 AM

looks good, thanks

mlir/lib/Dialect/Linalg/Transforms/InlineScalarOperands.cpp
11

opernand

This revision is now accepted and ready to land.May 21 2021, 6:08 AM
herhut updated this revision to Diff 347007.May 21 2021, 6:24 AM

Fix spelling

herhut marked an inline comment as done.May 21 2021, 6:24 AM

Thanks!

This revision was landed with ongoing or failed builds.May 21 2021, 6:25 AM
This revision was automatically updated to reflect the committed changes.