[PATCH] D78562: [MLIR] Update documentation for loop.parallel.
Alexander Belyaev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 07:31:19 PDT 2020
pifon2a created this revision.
pifon2a added a reviewer: ftynse.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: nicolasvasilache.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78562
Files:
mlir/include/mlir/Dialect/LoopOps/LoopOps.td
Index: mlir/include/mlir/Dialect/LoopOps/LoopOps.td
===================================================================
--- mlir/include/mlir/Dialect/LoopOps/LoopOps.td
+++ mlir/include/mlir/Dialect/LoopOps/LoopOps.td
@@ -285,9 +285,10 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78562.258989.patch
Type: text/x-patch
Size: 733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200421/4e83b36b/attachment.bin>
More information about the llvm-commits
mailing list