Page MenuHomePhabricator

[mlir][Linalg] Disable const -> linalg.generic when fused op is illegal.

Authored by mravishankar on Apr 11 2021, 1:58 PM.



Fusing a constant with a linalg.generic operation can result in the
fused operation being illegal since the loop bound computation
fails. Avoid such fusions.

Diff Detail

Event Timeline

mravishankar created this revision.Apr 11 2021, 1:58 PM
mravishankar requested review of this revision.Apr 11 2021, 1:58 PM
asaadaldien accepted this revision.Apr 11 2021, 4:56 PM
asaadaldien added inline comments.

Shouldn't we consider folding that into a splat constant tensor<3xf32>?

This revision is now accepted and ready to land.Apr 11 2021, 4:56 PM
hanchung accepted this revision.Apr 11 2021, 10:42 PM
mravishankar added inline comments.Apr 12 2021, 8:48 AM

Yes, that would be a good idea. Doing this at Linalg level would be interesting, but seems harder. Seems easier to do at a higher level (say MHLO or TOSA).