Page MenuHomePhabricator

[mlir][Linalg] Fix load/store operations generated while lower loops when output has zero rank.
ClosedPublic

Authored by mravishankar on Feb 28 2020, 3:37 PM.

Details

Summary

While lowering to loops, no indices should be used in the load/store
operation if the buffer is zero-rank.

Diff Detail

Event Timeline

mravishankar created this revision.Feb 28 2020, 3:37 PM
nicolasvasilache accepted this revision.Mar 4 2020, 1:32 PM

Let's push this forward to unblock progress, in the future the understanding is that linalg ops will not see 0-D memrefs anymore.

mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
257

Can we invert the conditional and make it if (X > 0) {} else {} ?
I find it more readable than the not test.

This revision is now accepted and ready to land.Mar 4 2020, 1:32 PM

Updating based on comments

mravishankar marked an inline comment as done.Mar 4 2020, 1:58 PM
mravishankar edited the summary of this revision. (Show Details)Mar 4 2020, 2:04 PM
This revision was automatically updated to reflect the committed changes.