[mlir][linalg] Promote operands for convolution vectorization
authorLei Zhang <antiagainst@google.com>
Mon, 17 Apr 2023 23:29:28 +0000 (16:29 -0700)
committerLei Zhang <antiagainst@google.com>
Mon, 17 Apr 2023 23:37:06 +0000 (16:37 -0700)
commit7517e246aca2c410dba01ff1419596d7eef4a7e6
treef6169e61016ded0ab70340305f8888bb6568fafa
parent6c4219f816d4a1d9b88b7453f714a3cc95cb4471
[mlir][linalg] Promote operands for convolution vectorization

We are already doing this for depthwise convolution and pooling.
This helps to preserve the promotion semantics from Linalg op
definitions to lower layers.

Along the way, fixed the type mismatch issue in the existing
`promote` implementation.

Reviewed By: kuhar

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