[Mlir-commits] [mlir] Make createReadOrMaskedRead and isValidMaskedInputVector vector utilities (PR #89119)

Lubomir Litchev llvmlistbot at llvm.org
Fri Apr 19 07:55:16 PDT 2024


================
@@ -1593,3 +1593,40 @@ void linalg::populateDecomposeConvolutionPatterns(RewritePatternSet &patterns,
       DownscaleSizeOneWindowed2DConvolution<PoolingNchwMaxOp, PoolingNcwMaxOp>>(
       patterns.getContext(), benefit);
 }
+
+Value mlir::linalg::createReadOrMaskedRead(OpBuilder &builder, Location loc,
+                                           Value source,
+                                           ArrayRef<int64_t> readShape,
+                                           Value padValue, bool doMasking) {
+  assert(llvm::none_of(readShape,
+                       [](int64_t s) { return s == ShapedType::kDynamic; }));
+  auto sourceShape = dyn_cast<ShapedType>(source.getType()).getShape();
----------------
LLITCHEV wrote:

Fixed.

https://github.com/llvm/llvm-project/pull/89119


More information about the Mlir-commits mailing list