[Mlir-commits] [mlir] 8fb4897 - [mlir] Disallow tensor types in VectorToSCF

Matthias Springer llvmlistbot at llvm.org
Fri May 21 06:45:54 PDT 2021


Author: Matthias Springer
Date: 2021-05-21T22:45:14+09:00
New Revision: 8fb4897934dc054974083ebc82b849fba08a4af7

URL: https://github.com/llvm/llvm-project/commit/8fb4897934dc054974083ebc82b849fba08a4af7
DIFF: https://github.com/llvm/llvm-project/commit/8fb4897934dc054974083ebc82b849fba08a4af7.diff

LOG: [mlir] Disallow tensor types in VectorToSCF

Support for tensor types can be added if needed.

Differential Revision: https://reviews.llvm.org/D102749

Added: 
    

Modified: 
    mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
index bef847c1ffac..ee439c00b9b2 100644
--- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
+++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
@@ -485,6 +485,8 @@ LogicalResult checkPrepareXferOp(OpTy xferOp,
     return failure();
   if (xferOp.getVectorType().getRank() <= options.targetRank)
     return failure();
+  if (xferOp.getShapedType().template isa<RankedTensorType>())
+    return failure();
   return success();
 }
 
@@ -802,6 +804,8 @@ struct UnrollTransferReadConversion
                                 PatternRewriter &rewriter) const override {
     if (xferOp.getVectorType().getRank() <= options.targetRank)
       return failure();
+    if (xferOp.getShapedType().template isa<RankedTensorType>())
+      return failure();
 
     auto insertOp = getInsertOp(xferOp);
     auto vec = getResultVector(xferOp, rewriter);
@@ -918,6 +922,8 @@ struct UnrollTransferWriteConversion
                                 PatternRewriter &rewriter) const override {
     if (xferOp.getVectorType().getRank() <= options.targetRank)
       return failure();
+    if (xferOp.getShapedType().template isa<RankedTensorType>())
+      return failure();
 
     auto vec = getDataVector(xferOp);
     auto xferVecType = xferOp.getVectorType();


        


More information about the Mlir-commits mailing list