[Mlir-commits] [mlir] edfcfa6 - [MLIR][NFC] Improve doc comment and delete stale comment
Uday Bondhugula
llvmlistbot at llvm.org
Fri Jul 16 02:31:08 PDT 2021
Author: Uday Bondhugula
Date: 2021-07-16T15:00:15+05:30
New Revision: edfcfa6f7bf058052a377a974a8c76df3fb6bca0
URL: https://github.com/llvm/llvm-project/commit/edfcfa6f7bf058052a377a974a8c76df3fb6bca0
DIFF: https://github.com/llvm/llvm-project/commit/edfcfa6f7bf058052a377a974a8c76df3fb6bca0.diff
LOG: [MLIR][NFC] Improve doc comment and delete stale comment
Remove duplicate and stale doc comment on affineParallelize. NFC.
Added:
Modified:
mlir/include/mlir/Dialect/Affine/Utils.h
mlir/lib/Dialect/Affine/Utils/Utils.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Affine/Utils.h b/mlir/include/mlir/Dialect/Affine/Utils.h
index ee849c961815b..a7aa88d303fe0 100644
--- a/mlir/include/mlir/Dialect/Affine/Utils.h
+++ b/mlir/include/mlir/Dialect/Affine/Utils.h
@@ -30,11 +30,12 @@ class Operation;
using ReductionLoopMap = DenseMap<Operation *, SmallVector<LoopReduction, 2>>;
-/// Replaces parallel affine.for op with 1-d affine.parallel op.
-/// mlir::isLoopParallel detects the parallel affine.for ops.
-/// Parallelizes the specified reductions. Parallelization will fail in presence
-/// of loop iteration arguments that are not listed in `parallelReductions`.
-/// There is no cost model currently used to drive this parallelization.
+/// Replaces a parallel affine.for op with a 1-d affine.parallel op. `forOp`'s
+/// body is taken by the affine.parallel op and the former is erased.
+/// (mlir::isLoopParallel can be used to detect a parallel affine.for op.) The
+/// reductions specified in `parallelReductions` are also parallelized.
+/// Parallelization will fail in the presence of loop iteration arguments that
+/// are not listed in `parallelReductions`.
LogicalResult
affineParallelize(AffineForOp forOp,
ArrayRef<LoopReduction> parallelReductions = {});
diff --git a/mlir/lib/Dialect/Affine/Utils/Utils.cpp b/mlir/lib/Dialect/Affine/Utils/Utils.cpp
index 26c3cf1220270..cbbc0c670e028 100644
--- a/mlir/lib/Dialect/Affine/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Affine/Utils/Utils.cpp
@@ -129,10 +129,6 @@ static AffineIfOp hoistAffineIfOp(AffineIfOp ifOp, Operation *hoistOverOp) {
return hoistedIfOp;
}
-/// Replace affine.for with a 1-d affine.parallel and clone the former's body
-/// into the latter while remapping values. Parallelizes the specified
-/// reductions. Parallelization will fail in presence of loop iteration
-/// arguments that are not listed in `parallelReductions`.
LogicalResult
mlir::affineParallelize(AffineForOp forOp,
ArrayRef<LoopReduction> parallelReductions) {
More information about the Mlir-commits
mailing list