From a7a892ae95cdd0e9cc3834bdc9a3b82cd07d19d2 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 29 Aug 2022 10:53:42 +0000 Subject: [PATCH] Apply clang-tidy fixes for readability-identifier-naming in Tiling.cpp (NFC) --- mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp index 3d7f321..3a49dcb 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp @@ -275,9 +275,9 @@ static FailureOr 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 tileToForeachThreadOpImpl( nominalTileSizes.has_value() ? (*nominalTileSizes)[loopIdx] : makeComposedFoldedAffineApply( - b, loc, M.ceilDiv(N), + b, loc, m.ceilDiv(n), ArrayRef{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}); } -- 2.7.4