Page MenuHomePhabricator

[mlir][Linalg] Add methods to charecterize the loops of a ConvolutionOpInterface.
Needs ReviewPublic

Authored by mravishankar on Sep 18 2021, 11:52 PM.
This revision needs review, but all reviewers have resigned.

Details

Reviewers
nicolasvasilache
Summary

The loops in convolution/pooling ops (as defined/used today in Linalg)
can have the loops charecterized as

  • batch dimensions,
  • loop over output image dimensions,
  • loop over output channel dimensions,
  • loop over convolved filter dimensions,
  • loop over input channel dimension,
  • loop over depth multiplier.

Add interface methods that given an op that implements the
ConvolutionOpInterface that returns the loop that fall into one of
these categories.

Depends On D109793

Diff Detail

Event Timeline

mravishankar created this revision.Sep 18 2021, 11:52 PM
mravishankar requested review of this revision.Sep 18 2021, 11:52 PM

I still fail to see why these methods are desirable?
I'd venture that if some compiler pass (e.g. vectorization) uses this information it is thinking about the wrong abstractions.

Another way to phrase this is that in the fullness of time, the generic vectorization + enough canonicalizations and foldings does what we want.
Wrting code based on this information seems wrong to me.

nicolasvasilache resigned from this revision.Thu, Nov 25, 12:24 PM

vectorization works fine without any of this as I was hoping, declaring bankruptcy here, thanks!