[mlir][Linalg] Add bounded recursion declaration to FMAOp -> LLVM conversion.
FMAOp -> LLVM conversion is done progressively by peeling off 1 dimension from FMAOp at each pattern iteration. Add the recursively bounded property declaration to the pattern so that the rewriter can apply it multiple times. Without this, FMAOps with 3+D do not lower to LLVM. Differential Revision: https://reviews.llvm.org/D113886
This commit is contained in:
@@ -752,6 +752,12 @@ class VectorFMAOpNDRewritePattern : public OpRewritePattern<FMAOp> {
|
||||
public:
|
||||
using OpRewritePattern<FMAOp>::OpRewritePattern;
|
||||
|
||||
void initialize() {
|
||||
// This pattern recursively unpacks one dimension at a time. The recursion
|
||||
// bounded as the rank is strictly decreasing.
|
||||
setHasBoundedRewriteRecursion();
|
||||
}
|
||||
|
||||
LogicalResult matchAndRewrite(FMAOp op,
|
||||
PatternRewriter &rewriter) const override {
|
||||
auto vType = op.getVectorType();
|
||||
|
||||
Reference in New Issue
Block a user