[Mlir-commits] [mlir] 7c4c274 - [MLIR][NFC] Fix some comments in padding transform. (#81741)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 14 09:00:47 PST 2024


Author: Javed Absar
Date: 2024-02-14T17:00:42Z
New Revision: 7c4c274643cedcf9671e1db65361231a7d9bee70

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

LOG: [MLIR][NFC] Fix some comments in padding transform. (#81741)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Padding.cpp b/mlir/lib/Dialect/Linalg/Transforms/Padding.cpp
index 278f3499f53e82..8c4b70db248989 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Padding.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Padding.cpp
@@ -23,7 +23,7 @@ using namespace mlir::linalg;
 #define DBGSNL() (llvm::dbgs() << "\n")
 
 /// Compute the padded shape of the given operand. The operand is padded to a
-/// static bounding box according to the specified options.
+/// static bounding box according to the specified padding options.
 static LogicalResult computePaddedShape(linalg::LinalgOp opToPad,
                                         OpOperand *opOperand,
                                         const LinalgPaddingOptions &options,
@@ -75,7 +75,7 @@ static LogicalResult computePaddedShape(linalg::LinalgOp opToPad,
             presburger::BoundType::UB, opOperand->get(),
             /*dim=*/i, /*stopCondition=*/nullptr, /*closedUB=*/true);
     if (failed(upperBound)) {
-      LLVM_DEBUG(DBGS() << "----count not compute a bounding box for padding");
+      LLVM_DEBUG(DBGS() << "----could not compute a bounding box for padding");
       return failure();
     }
     paddedShape[i] = ceil(*upperBound, shapeDimToMultiple[i]);
@@ -89,7 +89,7 @@ static LogicalResult computePaddedShape(linalg::LinalgOp opToPad,
 /// the nofold flag found in "paddingValues" and "packPaddings", respectively.
 ///
 /// Exit early and return the `opOperand` value if it already has the requested
-/// shape. I.e.:
+/// shape. i.e.:
 /// - static shape
 /// - nofold is not set
 /// - dim sizes are multiples of "padToMultipleOf"
@@ -232,7 +232,7 @@ linalg::rewriteAsPaddedOp(RewriterBase &rewriter, LinalgOp opToPad,
 
   // Copy back unpadded results to the original destination (i.e., inits of the
   // linalg op), so that the destination buffer of the computation does not
-  // change. If the padding folds away, this will materizalize as a memcpy
+  // change. If the padding folds away, this will materialize as a memcpy
   // between two identical buffers, which will then also fold away.
   assert(static_cast<int64_t>(paddedSubtensorResults.size()) ==
              opToPad.getNumDpsInits() &&


        


More information about the Mlir-commits mailing list