llvm-project/mlir
aartbik ee01c7a740 [mlir] [VectorOps] Add choice between dot and axpy lowering of vector.contract
Default vector.contract lowering essentially yields a series of sdot/ddot
operations. However, for some layouts a series of saxpy/daxpy operations,
chained through fma are more efficient. This CL introduces a choice between
the two lowering paths. A default heuristic is to follow.

Some preliminary avx2 performance numbers for matrix-times-vector.
Here, dot performs best for 64x64 A x b and saxpy for 64x64 A^T x b.

```
------------------------------------------------------------
            A x b                          A^T x b
------------------------------------------------------------
GFLOPS    sdot (reassoc)    saxpy    sdot (reassoc)    saxpy
------------------------------------------------------------
1x1        0.6               0.9       0.6             0.9
2x2        2.5               3.2       2.4             3.5
4x4        6.4               8.4       4.9             11.8
8x8       11.7               6.1       5.0             29.6
16x16     20.7              10.8       7.3             43.3
32x32     29.3               7.9       6.4             51.8
64x64     38.9                                         79.3
128x128   32.4                                         40.7
------------------------------------------------------------
```

Reviewed By: nicolasvasilache, ftynse

Differential Revision: https://reviews.llvm.org/D83012
2020-07-02 13:21:17 -07:00
..
cmake/modules Install the MLIRTableGen static library. 2020-06-11 18:23:24 -07:00
docs [mlir] Remove the default template parameters from AttrBase and TypeBase. 2020-06-30 21:55:32 -07:00
examples [MLIR] Add variadic isa<> for Type, Value, and Attribute 2020-06-29 15:04:48 -07:00
include [mlir] [VectorOps] Add choice between dot and axpy lowering of vector.contract 2020-07-02 13:21:17 -07:00
integration_test [mlir] [VectorOps] Extend vector reduction integration test with reassoc=true cases. 2020-06-29 13:28:20 -07:00
lib [mlir] [VectorOps] Add choice between dot and axpy lowering of vector.contract 2020-07-02 13:21:17 -07:00
test [mlir] [VectorOps] Add choice between dot and axpy lowering of vector.contract 2020-07-02 13:21:17 -07:00
tools [mlir][OpFormatGen] Add support for resolving variadic types from non-variadic 2020-07-01 22:27:08 -07:00
unittests [MLIR] Exact integer emptiness checks for FlatAffineConstraints 2020-07-02 19:53:27 +05:30
utils [MLIR][SPIRV] Extend automation script to generate coverage report. 2020-06-23 11:42:59 -04: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] [integration_test] Make integration tests default OFF 2020-06-15 14:33:18 -07: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.