[mlir][linalg] Fix vectorization of linalg depthwise conv for int types
authorRob Suderman <suderman@google.com>
Tue, 8 Nov 2022 00:18:39 +0000 (16:18 -0800)
committerRob Suderman <suderman@google.com>
Wed, 9 Nov 2022 00:21:05 +0000 (16:21 -0800)
commit9c923f4e58357af870925781f0b33d1ee958b9d8
treebcc44a00b8e91d2e7ec479531a45921e476f6824
parent129177eaf0ecb202a6f44ab8d23ad51fe00d15f6
[mlir][linalg] Fix vectorization of linalg depthwise conv for int types

Vectorization of Linalg's depthwise convolution only supports floating
point types. Previous version assumed floating point operations would
work. This version checks whether the computation is integer or floating
point and adjust the inner loop computation.

Reviewed By: hanchung

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