[Mlir-commits] [mlir] 636db7f - [MLIR] Fix vector::TransferWriteOp builder losing permutation map

Stella Stamenova llvmlistbot at llvm.org
Thu Dec 3 09:56:12 PST 2020


Author: Max Kudryavtsev
Date: 2020-12-03T09:53:08-08:00
New Revision: 636db7f87c7720698bbbf69c7cde3dd255bf6f78

URL: https://github.com/llvm/llvm-project/commit/636db7f87c7720698bbbf69c7cde3dd255bf6f78
DIFF: https://github.com/llvm/llvm-project/commit/636db7f87c7720698bbbf69c7cde3dd255bf6f78.diff

LOG: [MLIR] Fix vector::TransferWriteOp builder losing permutation map

Supervectorizer pass uses this builder and loses the permutation map.

Reviewed By: nicolasvasilache

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

Added: 
    

Modified: 
    mlir/lib/Dialect/Vector/VectorOps.cpp
    mlir/test/Dialect/Affine/SuperVectorize/vector_utils.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Vector/VectorOps.cpp b/mlir/lib/Dialect/Vector/VectorOps.cpp
index e6610eb59727..fe26949ced10 100644
--- a/mlir/lib/Dialect/Vector/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/VectorOps.cpp
@@ -2171,12 +2171,11 @@ void TransferWriteOp::build(OpBuilder &builder, OperationState &result,
   build(builder, result, vector, memref, indices, permMap, maskedArrayAttr);
 }
 
-/// Builder that sets permutation map to 'getMinorIdentityMap'.
 void TransferWriteOp::build(OpBuilder &builder, OperationState &result,
                             Value vector, Value memref, ValueRange indices,
                             AffineMap permutationMap) {
-  build(builder, result, vector, memref, indices,
-        /*maybeMasked=*/ArrayRef<bool>{});
+  build(builder, result, vector, memref, indices, permutationMap,
+        /*maybeMasked=*/ArrayAttr());
 }
 
 static ParseResult parseTransferWriteOp(OpAsmParser &parser,

diff  --git a/mlir/test/Dialect/Affine/SuperVectorize/vector_utils.mlir b/mlir/test/Dialect/Affine/SuperVectorize/vector_utils.mlir
index bf899cdbb975..ef8e2831a848 100644
--- a/mlir/test/Dialect/Affine/SuperVectorize/vector_utils.mlir
+++ b/mlir/test/Dialect/Affine/SuperVectorize/vector_utils.mlir
@@ -56,7 +56,7 @@ func @double_loop_nest(%a: memref<20x30xf32>, %b: memref<20xf32>) {
 // VECNEST:         vector.transfer_read
 // VECNEST-NEXT:    affine.for %{{.*}} = 0 to 30 {
 // VECNEST:           vector.transfer_read
-// VECNEST-NEXT:      vector.transfer_write
+// VECNEST-NEXT:      vector.transfer_write %{{.*}}, %{{.*}}[%{{.*}}, %{{.*}}] {permutation_map = #{{.*}}}
 // VECNEST-NEXT:    }
 // VECNEST-NEXT:    vector.transfer_write
 // VECNEST:       }


        


More information about the Mlir-commits mailing list