[mlir][linalg] Fix bug in elementwise vectorization
authorThomas Raoux <thomasraoux@google.com>
Fri, 11 Dec 2020 15:03:30 +0000 (07:03 -0800)
committerThomas Raoux <thomasraoux@google.com>
Mon, 14 Dec 2020 18:44:36 +0000 (10:44 -0800)
commit8955e9f6b75d436f92235531f003540401cd4b30
tree4b1e071f0970b0df296c538c6cf1a2e613a4b013
parent653b97690f0d5c26a93002fb94ddd86397ed6c1c
[mlir][linalg] Fix bug in elementwise vectorization

Fix a bug causing to pick the wrong vector size to broadcast to when the source
vectors have different ranks.

Differential Revision: https://reviews.llvm.org/D93118
mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
mlir/test/Dialect/Linalg/vectorization.mlir