[mlir][vector] Add patterns for vector distribution
authorThomas Raoux <thomasraoux@google.com>
Mon, 6 Jun 2022 20:56:50 +0000 (20:56 +0000)
committerThomas Raoux <thomasraoux@google.com>
Fri, 10 Jun 2022 17:46:51 +0000 (17:46 +0000)
commited0288f7c4a5b3bf486803a11a71cbff35aa0111
treecb5b3df8202d889a624938e4b3cb71558fceca94
parentb5019ffc8efd472d18eb9ed55a004af8d713583d
[mlir][vector] Add patterns for vector distribution

Add pattern to hoist scalar code outside of warp distribute region as
those cannot be distributed and we would want to execute them on all
the lanes.
Add patterns to distribute transfer_write ops. Those operations can be
distributed in different ways and it is control by user.

Differential Revision: https://reviews.llvm.org/D127152
mlir/include/mlir/Dialect/Vector/Transforms/VectorDistribution.h
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
mlir/test/Dialect/Vector/vector-warp-distribute.mlir
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp