The UnrollVectorPattern is can be used in a programmable fashion by:
OwningRewritePatternList patterns;
patterns.insert<UnrollVectorPattern<AddFOp>>(ArrayRef<int64_t>{2, 2}, ctx);
patterns.insert<UnrollVectorPattern<vector::ContractionOp>>(
ArrayRef<int64_t>{2, 2, 2}, ctx);
...
applyPatternsAndFoldGreedily(getFunction(), patterns);
Are there any ops derived from IntArithmeticOp that shouldn't have the interface methods declared? If not, let's add the trait in IntArithmeticOp instead. Same for FloatArithmeticOp and FloatUnaryOp.