llvm-project/mlir
Sean Silva 569e4f9bc9 `shape` dialect: add some ops
- add `to_extent_tensor`
 - rename `create_shape` to `from_extent_tensor` for symmetry
- add `split_at` and `concat` ops for basic shape manipulations

This set of ops is inspired by the requirements of lowering a dynamic-shape-aware batch matmul op. For such an op, the "matrix" dimensions aren't subject to broadcasting but the others are, and so we need to slice, broadcast, and reconstruct the final output shape. Furthermore, the actual broadcasting op used downstream uses a tensor of extents as its preferred shape interface for the actual op that does the broadcasting.

However, this functionality is quite general. It's obvious that `to_extent_tensor` is needed long-term to support many common patterns that involve computations on shapes. We can evolve the shape manipulation ops introduced here. The specific choices made here took into consideration the potentially unranked nature of the !shape.shape type, which means that a simple listing of dimensions to extract isn't possible in general.

Differential Revision: https://reviews.llvm.org/D76817
2020-03-27 16:38:42 -07:00
..
cmake/modules [mlir] Revamp operation documentation generation 2020-03-24 12:05:18 -07:00
docs Allow IndexType inside tensors. 2020-03-26 10:52:48 -07:00
examples [mlir][NFC] Cleanup AffineOps directory structure 2020-03-20 14:23:43 -07:00
include `shape` dialect: add some ops 2020-03-27 16:38:42 -07:00
lib `shape` dialect: add some ops 2020-03-27 16:38:42 -07:00
test [mlir] Extended Dominance analysis with a function to find the nearest common dominator of two given blocks. 2020-03-27 14:55:40 +01:00
tools [mlir] Extended Dominance analysis with a function to find the nearest common dominator of two given blocks. 2020-03-27 14:55:40 +01:00
unittests [mlir][NFC] Rename QuantOps to Quant 2020-03-17 15:16:47 -07:00
utils [mlir][spirv] Support implied extensions and capabilities 2020-01-17 08:01:57 -05:00
.clang-format [mlir] add .clang-format 2019-03-29 12:41:43 -07:00
.clang-tidy Fix MLIR clang-tidy: when tweaking it does not inherit from the parent 2020-03-07 17:44:21 +00:00
CMakeLists.txt [mlir] Fix cross compiling MLIR 2020-03-14 19:18:40 +00:00
LICENSE.TXT Add the Apache2 with LLVM exceptions license to MLIR 2019-12-24 00:58:06 -08:00
README.md mlir README.md: Fix the syntax 2019-12-24 13:31:07 +01:00

README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.