[Mlir-commits] [mlir] 8c63c24 - [mlir] Fix typo s/applyPermuationMap/applyPermutationMap/

Benjamin Kramer llvmlistbot at llvm.org
Tue Jul 27 03:25:16 PDT 2021


Author: Benjamin Kramer
Date: 2021-07-27T12:18:54+02:00
New Revision: 8c63c24dcaf5a5d090e40ce231c5174c15bd187e

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

LOG: [mlir] Fix typo s/applyPermuationMap/applyPermutationMap/

Added: 
    

Modified: 
    mlir/include/mlir/IR/AffineMap.h
    mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    mlir/lib/Dialect/Vector/VectorTransforms.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/AffineMap.h b/mlir/include/mlir/IR/AffineMap.h
index 41cc03735a2ad..22e3c30f517fc 100644
--- a/mlir/include/mlir/IR/AffineMap.h
+++ b/mlir/include/mlir/IR/AffineMap.h
@@ -505,7 +505,7 @@ getProjectedMap(AffineMap map,
 
 /// Apply a permutation from `map` to `source` and return the result.
 template <typename T>
-SmallVector<T> applyPermuationMap(AffineMap map, llvm::ArrayRef<T> source) {
+SmallVector<T> applyPermutationMap(AffineMap map, llvm::ArrayRef<T> source) {
   assert(map.isProjectedPermutation());
   assert(map.getNumInputs() == source.size());
   SmallVector<T> result;

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
index b225a993cb5c8..9324fa2f443e1 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
@@ -245,7 +245,7 @@ static Value buildVectorWrite(OpBuilder &b, Value value,
     AffineMap map =
         reindexIndexingMap(linalgOp.getTiedIndexingMap(outputOperand));
     SmallVector<int64_t> transposeShape =
-        applyPermuationMap(inversePermutation(map), vectorType.getShape());
+        applyPermutationMap(inversePermutation(map), vectorType.getShape());
     vectorType = VectorType::get(transposeShape, vectorType.getElementType());
     SmallVector<Value> indices(linalgOp.getRank(outputOperand),
                                b.create<ConstantIndexOp>(loc, 0));
@@ -575,7 +575,7 @@ static LogicalResult vectorizeContraction(OpBuilder &b, LinalgOp linalgOp,
     if (outShape.empty()) {
       vType = op->getResult(0).getType();
     } else {
-      SmallVector<int64_t> resultShape = applyPermuationMap(
+      SmallVector<int64_t> resultShape = applyPermutationMap(
           inversePermutation(reindexIndexingMap(
               linalgOp.getTiedIndexingMap(linalgOp.getOutputOperand(0)))),
           outShape);

diff  --git a/mlir/lib/Dialect/Vector/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/VectorTransforms.cpp
index 77edad70a1adb..cffc20caa3c20 100644
--- a/mlir/lib/Dialect/Vector/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/VectorTransforms.cpp
@@ -391,8 +391,8 @@ struct UnrollContractionPattern
       auto extractOperand = [&](unsigned index, Value operand,
                                 AffineMap permutationMap,
                                 ArrayRef<int64_t> operandOffets) {
-        SmallVector<int64_t> operandShape =
-            applyPermuationMap(permutationMap, ArrayRef<int64_t>(*targetShape));
+        SmallVector<int64_t> operandShape = applyPermutationMap(
+            permutationMap, ArrayRef<int64_t>(*targetShape));
         SmallVector<int64_t, 4> operandStrides(operandOffets.size(), 1);
         slicesOperands[index] = rewriter.create<vector::ExtractStridedSliceOp>(
             loc, operand, operandOffets, operandShape, operandStrides);
@@ -401,7 +401,7 @@ struct UnrollContractionPattern
       // Extract the new lhs operand.
       AffineMap lhsPermutationMap = contractOp.getIndexingMaps()[0];
       SmallVector<int64_t> lhsOffets =
-          applyPermuationMap(lhsPermutationMap, ArrayRef<int64_t>(offsets));
+          applyPermutationMap(lhsPermutationMap, ArrayRef<int64_t>(offsets));
       extractOperand(0, contractOp.lhs(), lhsPermutationMap, lhsOffets);
       // If there is a mask associated to lhs, extract it as well.
       if (slicesOperands.size() > 3)
@@ -410,7 +410,7 @@ struct UnrollContractionPattern
       // Extract the new rhs operand.
       AffineMap rhsPermutationMap = contractOp.getIndexingMaps()[1];
       SmallVector<int64_t> rhsOffets =
-          applyPermuationMap(rhsPermutationMap, ArrayRef<int64_t>(offsets));
+          applyPermutationMap(rhsPermutationMap, ArrayRef<int64_t>(offsets));
       extractOperand(1, contractOp.rhs(), rhsPermutationMap, rhsOffets);
       // If there is a mask associated to rhs, extract it as well.
       if (slicesOperands.size() > 4)
@@ -418,7 +418,7 @@ struct UnrollContractionPattern
 
       AffineMap accPermutationMap = contractOp.getIndexingMaps()[2];
       SmallVector<int64_t> accOffets =
-          applyPermuationMap(accPermutationMap, ArrayRef<int64_t>(offsets));
+          applyPermutationMap(accPermutationMap, ArrayRef<int64_t>(offsets));
       // If a version of the accumulator has already been computed, use it
       // otherwise extract the first version from the original operand.
       auto accIt = accCache.find(accOffets);
@@ -428,13 +428,13 @@ struct UnrollContractionPattern
         extractOperand(2, contractOp.acc(), accPermutationMap, accOffets);
 
       SmallVector<int64_t> dstShape =
-          applyPermuationMap(dstAffineMap, ArrayRef<int64_t>(*targetShape));
+          applyPermutationMap(dstAffineMap, ArrayRef<int64_t>(*targetShape));
       auto targetType = VectorType::get(dstShape, dstVecType.getElementType());
       Operation *newOp = cloneOpWithOperandsAndTypes(
           rewriter, loc, contractOp, slicesOperands, targetType);
 
       SmallVector<int64_t> dstOffets =
-          applyPermuationMap(dstAffineMap, ArrayRef<int64_t>(offsets));
+          applyPermutationMap(dstAffineMap, ArrayRef<int64_t>(offsets));
       // Save the accumulated value untill all the loops are unrolled since
       // reduction loop keep updating the accumulator.
       accCache[dstOffets] = newOp->getResult(0);


        


More information about the Mlir-commits mailing list