[PATCH] D75722: [mlir][Linalg] Implement padding for linalg.conv and lowering to loops.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 21:54:08 PDT 2020


mehdi_amini added inline comments.


================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:189
+    ValueHandle zeroIndex = std_constant_index(0);
+    SmallVector<ValueHandle, 8> conds;
+    SmallVector<ValueHandle, 8> clampedImIdx;
----------------
Do you need a vector here? Seems like you're only every using a single value (the last one) at a given time.


================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:229
+    ValueHandle readInput = im(clampedImIdx);
+    return std_select(conds.back(), zero, readInput);
+  }
----------------
What is the guarantee that `conds` isn't empty here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75722





More information about the llvm-commits mailing list