diff --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h --- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h +++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h @@ -568,10 +568,11 @@ /// Subsequently, they are contracted together and the result is written to /// the first entry of the output buffer. template -struct ConvOpVectorization : public OpRewritePattern { +class ConvOpVectorization : public OpRewritePattern { using OpRewritePattern::OpRewritePattern; SmallVector mask; +public: ConvOpVectorization(MLIRContext *context, SmallVector msk) : OpRewritePattern(context) { assert(msk.size() == N && "Mask size does not match rank"); diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @@ -371,7 +371,7 @@ template LogicalResult ConvOpVectorization::matchAndRewrite( ConvOp op, PatternRewriter &rewriter) const { - const unsigned dimSize = 3; + unsigned dimSize = 3; Location loc = op.getLoc(); MLIRContext *context = op.getContext(); edsc::ScopedContext scope(rewriter, loc);