[PATCH] D74708: [MLIR][Ploops] Add custom builders from ParallelOp and ReduceOp.

Alexander Belyaev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 23:10:42 PST 2020


pifon2a marked an inline comment as done.
pifon2a added inline comments.


================
Comment at: mlir/include/mlir/Dialect/LoopOps/LoopOps.td:240
+    OpBuilder<"Builder *builder, OperationState &result, "
+              "Value initValue">
+  ];
----------------
herhut wrote:
> Why is this called `initValue`? It is the value to be reduced.
Then the documentation is quite confusing:

```mlir
      %zero = constant 0.0 : f32
      loop.reduce(%zero) {
        ^bb0(%lhs : f32, %rhs: f32):
          %res = addf %lhs, %rhs : f32
          loop.reduce.return %res : f32
      } : f32
 ```

Looking at `%zero` I would assume that it is the initial value of the accumulator. I'll fix it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74708/new/

https://reviews.llvm.org/D74708





More information about the llvm-commits mailing list