[Mlir-commits] [mlir] 84e4c09 - [MLIR] Update documentation for loop.parallel.
Alexander Belyaev
llvmlistbot at llvm.org
Tue Apr 21 23:49:14 PDT 2020
Author: Alexander Belyaev
Date: 2020-04-22T08:48:49+02:00
New Revision: 84e4c09995a779d5057e2ce831ced9307a8164af
URL: https://github.com/llvm/llvm-project/commit/84e4c09995a779d5057e2ce831ced9307a8164af
DIFF: https://github.com/llvm/llvm-project/commit/84e4c09995a779d5057e2ce831ced9307a8164af.diff
LOG: [MLIR] Update documentation for loop.parallel.
Differential Revision: https://reviews.llvm.org/D78562
Added:
Modified:
mlir/include/mlir/Dialect/LoopOps/LoopOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/LoopOps/LoopOps.td b/mlir/include/mlir/Dialect/LoopOps/LoopOps.td
index 4548f5aae2e8..856725747369 100644
--- a/mlir/include/mlir/Dialect/LoopOps/LoopOps.td
+++ b/mlir/include/mlir/Dialect/LoopOps/LoopOps.td
@@ -294,9 +294,10 @@ def ParallelOp : Loop_Op<"parallel",
Example:
```mlir
- loop.parallel (%iv) = (%lb) to (%ub) step (%step) -> f32 {
- %zero = constant 0.0 : f32
- loop.reduce(%zero) : f32 {
+ %init = constant 0.0 : f32
+ loop.parallel (%iv) = (%lb) to (%ub) step (%step) init (%init) -> f32 {
+ %elem_to_reduce = load %buffer[%iv] : memref<100xf32>
+ loop.reduce(%elem_to_reduce) : f32 {
^bb0(%lhs : f32, %rhs: f32):
%res = addf %lhs, %rhs : f32
loop.reduce.return %res : f32
More information about the Mlir-commits
mailing list