[mlir][Linalg] Improve conv vectorization for the stride==1 case.
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Wed, 20 Oct 2021 19:51:21 +0000 (19:51 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Thu, 21 Oct 2021 15:18:28 +0000 (15:18 +0000)
commit203accf0bdde1d276646c79dfa605ee3426f1ca8
tree7b0b03da4a92d292b9a55d3a20da79e8aefedf5d
parenta602c2b51dccc756c12e7585c34710aeaef54e0b
[mlir][Linalg] Improve conv vectorization for the stride==1 case.

In the stride == 1 case, conv1d reads contiguous data along the input dimension. This can be advantageaously used to bulk memory transfers and compute while avoiding unrolling. Experimentally, this can yield speedups of up to 50%.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D112139
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
mlir/test/Dialect/Linalg/vectorize-convolution.mlir