forked from OSchip/llvm-project
[mlir][Linalg] Small refactoring of ConvOpVectorization
This commit addresses comments that were requested on D86619 after it was landed. Differential Revision: https://reviews.llvm.org/D87354
This commit is contained in:
parent
39c1653b3d
commit
fea175b59f
|
@ -568,10 +568,11 @@ struct AffineMinSCFCanonicalizationPattern
|
|||
/// Subsequently, they are contracted together and the result is written to
|
||||
/// the first entry of the output buffer.
|
||||
template <typename ConvOp, int N>
|
||||
struct ConvOpVectorization : public OpRewritePattern<ConvOp> {
|
||||
class ConvOpVectorization : public OpRewritePattern<ConvOp> {
|
||||
using OpRewritePattern<ConvOp>::OpRewritePattern;
|
||||
SmallVector<bool, 4> mask;
|
||||
|
||||
public:
|
||||
ConvOpVectorization(MLIRContext *context, SmallVector<bool, 4> msk)
|
||||
: OpRewritePattern<ConvOp>(context) {
|
||||
assert(msk.size() == N && "Mask size does not match rank");
|
||||
|
|
|
@ -371,7 +371,7 @@ LogicalResult LinalgCopyVTWForwardingPattern::matchAndRewrite(
|
|||
template <class ConvOp, int N>
|
||||
LogicalResult ConvOpVectorization<ConvOp, N>::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);
|
||||
|
|
Loading…
Reference in New Issue