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 uint dimSize = 3; + unsigned dimSize = 3; Location loc = op.getLoc(); MLIRContext *context = op.getContext(); edsc::ScopedContext scope(rewriter, loc); @@ -402,8 +402,8 @@ Value kernel = op.getInput(1); Value output = op.getOutputBuffer(0); - uint rank = inShapeType.getRank(); - uint numDims = mapping.size(); + unsigned rank = inShapeType.getRank(); + unsigned numDims = mapping.size(); Type elemType = inShapeType.getElementType(); auto map = AffineMap::get(rank, 0, mapping, context);