[Mlir-commits] [mlir] a7a892a - Apply clang-tidy fixes for readability-identifier-naming in Tiling.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Sep 4 03:41:58 PDT 2022


Author: Mehdi Amini
Date: 2022-09-04T10:41:30Z
New Revision: a7a892ae95cdd0e9cc3834bdc9a3b82cd07d19d2

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

LOG: Apply clang-tidy fixes for readability-identifier-naming in Tiling.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
index 3d7f3212a68a3..3a49dcb120770 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
@@ -275,9 +275,9 @@ static FailureOr<ForeachThreadTilingResult> tileToForeachThreadOpImpl(
     }
 
     // Tiled case: compute the offset and size.
-    AffineExpr i, j, M, N, O;
+    AffineExpr i, j, m, n, o;
     bindDims(b.getContext(), i, j);
-    bindSymbols(b.getContext(), M, N, O);
+    bindSymbols(b.getContext(), m, n, o);
     OpFoldResult size = loopRanges[loopIdx].size;
     OpFoldResult offset = loopRanges[loopIdx].offset;
     OpFoldResult threadId = threadIds[threadIdIdx];
@@ -287,19 +287,19 @@ static FailureOr<ForeachThreadTilingResult> tileToForeachThreadOpImpl(
         nominalTileSizes.has_value()
             ? (*nominalTileSizes)[loopIdx]
             : makeComposedFoldedAffineApply(
-                  b, loc, M.ceilDiv(N),
+                  b, loc, m.ceilDiv(n),
                   ArrayRef<OpFoldResult>{size, nonZeroNumThreads[threadIdIdx]});
 
     // Dynamic offset shifted by threadId * maxSizePerThread.
     OpFoldResult offsetPerThread = makeComposedFoldedAffineApply(
-        b, loc, i + j * M, {offset, threadId, tileSizePerThread});
+        b, loc, i + j * m, {offset, threadId, tileSizePerThread});
     // Dynamic upper-bound depending on the threadId.
     OpFoldResult residualTileSize = makeComposedFoldedAffineApply(
-        b, loc, i + j * M - N,
+        b, loc, i + j * m - n,
         {offset, nonZeroNumThreads[threadIdIdx], tileSizePerThread, size});
     if (!isConstantIntValue(residualTileSize, 0)) {
       OpFoldResult sizeMinusOffsetPerThread = makeComposedFoldedAffineApply(
-          b, loc, -i + M, {offsetPerThread, size});
+          b, loc, -i + m, {offsetPerThread, size});
       tileSizePerThread =
           buildMin(b, loc, {sizeMinusOffsetPerThread, tileSizePerThread});
     }


        


More information about the Mlir-commits mailing list