[mlir][Linalg] Add loop.parallel lowering for all Linalg Ops.
authorMaheshRavishankar <ravishankarm@google.com>
Mon, 13 Apr 2020 16:33:34 +0000 (09:33 -0700)
committerMaheshRavishankar <ravishankarm@google.com>
Mon, 13 Apr 2020 20:19:12 +0000 (13:19 -0700)
commit03391df90ed142aafc0669501071cd30218adc0e
tree31a5c9da57d4057433f5aae6dccbcd2972350259
parentdffbeffa39f5625fab98ca203b0922e0ba14d06b
[mlir][Linalg] Add loop.parallel lowering for all Linalg Ops.

The outer parallel loops of a linalg operation is lowered to
loop.parallel, with the other loops lowered to loop.for. This gets the
lowering to loop.parallel on par with the loop.for lowering. In future
the reduction loop could also be lowered to loop.parallel.
Also add a utility function that returns the loops that are
created.

Differential Revision: https://reviews.llvm.org/D77678
mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
mlir/test/Dialect/Linalg/loops.mlir
mlir/test/Dialect/Linalg/parallel_loops.mlir