Support for 0-D case in Linalg ops
authorNicolas Vasilache <ntv@google.com>
Fri, 21 Jun 2019 12:34:58 +0000 (05:34 -0700)
committerjpienaar <jpienaar@google.com>
Sat, 22 Jun 2019 16:15:36 +0000 (09:15 -0700)
commit235e2fe030e00b24955f4df7ef642e9e0528e388
tree0b5e19d399dfd2279ce5e9184cc916b40eaec8b6
parent3e99d99553607d7dbd1eb147d6588b23a9b090da
Support for 0-D case in Linalg ops

This CL adds support for O-D ops in Linalg ops by:
1. making the CopyOp maps optional instead of default valued
2. allowing certain map operations to accept and return empty maps
3. making linalg::LowerToLoops aware of these changes
4. providing a proper 0-D impl for CopyOp and FillOp
5. adding the relevant tests

PiperOrigin-RevId: 254381908
mlir/include/mlir/IR/AffineMap.h
mlir/include/mlir/Linalg/IR/LinalgLibraryOps.td
mlir/lib/IR/AffineMap.cpp
mlir/lib/Linalg/IR/LinalgOps.cpp
mlir/lib/Linalg/Transforms/LowerToLoops.cpp
mlir/test/Linalg/loops.mlir