[mlir][Vector] Add support for masked vector.contract
authorDiego Caballero <diegocaballero@google.com>
Wed, 15 Feb 2023 05:46:15 +0000 (05:46 +0000)
committerDiego Caballero <diegocaballero@google.com>
Wed, 15 Feb 2023 06:10:22 +0000 (06:10 +0000)
commit9452356ddcf44720387eda9b6316b7cadff1f60d
tree371bc368c72711aaab7096ff042103c410247dab
parente9b82a5c4fb6fa1c0af1b8e2536252b0730f41ef
[mlir][Vector] Add support for masked vector.contract

This patch adds support for masking vector.contract ops with the
vector.mask approach. This also includes the lowering of vector.contract
through the vector.outerproduct path to LLVM. For now, this only adds
support for one of the many potential flavors of
vector.contract/vector.outerproduct but unsupported cases will fail
gratefully.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D143965
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
mlir/test/Dialect/Vector/vector-contract-transforms.mlir