This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Linalg] Avoid generalizing `linalg.map`
ClosedPublic

Authored by chelini on Jun 21 2023, 9:49 AM.

Details

Summary

We cannot trivially generalize linalg.map, as it does not use the
output as a region argument in the block, while linalg.generic expects
many region arguments as the input/output operands.

Diff Detail

Event Timeline

chelini created this revision.Jun 21 2023, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2023, 9:49 AM
chelini requested review of this revision.Jun 21 2023, 9:49 AM
chelini edited the summary of this revision. (Show Details)Jun 22 2023, 1:20 AM
chelini added reviewers: ftynse, springerm, qcolombet.
nicolasvasilache accepted this revision.Jun 22 2023, 1:40 AM

Interesting, do you have a recommendation here ?

This revision is now accepted and ready to land.Jun 22 2023, 1:40 AM

Interesting, do you have a recommendation here ?

I would re-evaluate https://reviews.llvm.org/D134444 as it may create inconsistency between linalg.generic and named ops. I agree with the direction, but it is not just an ergonomics change. We could think of making linalg.generic consistent with this behaviour by dropping unused bb args or making linalg.named ops compatible with generics. Moving from named to generic (and vice-versa) is an essential trait of linalg and should be maintained, worth having an offline discussion.

This revision was automatically updated to reflect the committed changes.