[mlir][spirv][vector] Enable vector3 when converting to dot product
authorLei Zhang <antiagainst@google.com>
Tue, 18 Apr 2023 20:57:35 +0000 (13:57 -0700)
committerLei Zhang <antiagainst@google.com>
Tue, 18 Apr 2023 20:57:44 +0000 (13:57 -0700)
commitd343a395431f70f63d66ef31cb69c8c4babdb21f
tree00d306b6c239d15144855ea61997dd6e51211a40
parentb51a03e1bbe7ea8868ffb24472fc532d0c00943c
[mlir][spirv][vector] Enable vector3 when converting to dot product

It's common to see such cases for contraction from convolution with
input channel as 3. Although we aren't utilizing all 4 lanes for
dot product, it should still be better than performing the multiply
and reduction separately.

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D148642
mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
mlir/test/Conversion/VectorToSPIRV/vector-reduction-to-spirv-dot-prod.mlir