[Mlir-commits] [mlir] 192e111 - [mlir][linalg] Fix comments around ConstraintsSet

Matthias Springer llvmlistbot at llvm.org
Mon Aug 2 01:53:45 PDT 2021


Author: Matthias Springer
Date: 2021-08-02T17:53:28+09:00
New Revision: 192e111e760b442c366ba053fe0a696edc2ea35b

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

LOG: [mlir][linalg] Fix comments around ConstraintsSet

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

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h
    mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h b/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h
index c1ed91123884d..32ffd97235eac 100644
--- a/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h
+++ b/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h
@@ -25,7 +25,7 @@ class ConstraintsSet : public FlatAffineConstraints {
   ConstraintsSet() : FlatAffineConstraints() {}
 
   /// Assuming `val` is defined by `val = affine.min map (operands)`, introduce
-  /// all the constraints `val >= expr_i(operands)`, where expr_i are all the
+  /// all the constraints `val <= expr_i(operands)`, where expr_i are all the
   /// results of `map`.
   // This API avoids taking a dependence on the AffineMinOp definition.
   LogicalResult composeMin(Value val, AffineMap map, ValueRange operands) {
@@ -33,7 +33,7 @@ class ConstraintsSet : public FlatAffineConstraints {
   }
 
   /// Assuming `val` is defined by `val = affine.max map (operands)`, introduce
-  /// all the constraints `val <= expr_i(operands)`, where expr_i are all the
+  /// all the constraints `val >= expr_i(operands)`, where expr_i are all the
   /// results of `map`.
   // This API avoids taking a dependence on the AffineMaxOp definition.
   LogicalResult composeMax(Value val, AffineMap map, ValueRange operands) {

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
index b6829171c580e..b6fbdb7612599 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
@@ -553,7 +553,7 @@ static Value buildLoopIterationCount(OpBuilder &b, scf::ForOp outer,
 }
 
 /// Given a set of loops, assumed to be scf::ForOp, create a constraint set
-/// containing the inequalities `iv - lb >= 0` and `-iv + ub >= 0` for each
+/// containing the inequalities `iv - lb >= 0` and `-iv + ub - 1 >= 0` for each
 /// loop.
 static ConstraintsSet initLoopIvsAndBounds(ArrayRef<Operation *> loops) {
   ConstraintsSet constraints;


        


More information about the Mlir-commits mailing list