[PATCH] D72316: [mlir][Linalg] Lower linalg.reshape to LLVM for the static case

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 02:29:36 PST 2020


ftynse accepted this revision.
ftynse marked an inline comment as done.
ftynse added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp:179
+
+    if (!dstType.hasStaticShape())
+      return matchFailure();
----------------
nicolasvasilache wrote:
> ftynse wrote:
> > I wonder whether `hasStaticShape` is the right name here. It only checks the sizes, but not the strides, which is a bit counter-intuitive. Not for this commit certainly...
> I am not sure I follow. If the destination does not have static shape we can early exit and no need to compute the strides.
> If it does, we still need to check that it has static strides, which happens below. 
I find it confusing that strides are not included in "shape", but it's a separate discussion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72316/new/

https://reviews.llvm.org/D72316





More information about the llvm-commits mailing list