[mlir][vector] Add unit test for vector distribute by block
authorThomas Raoux <thomasraoux@google.com>
Thu, 8 Oct 2020 21:41:57 +0000 (14:41 -0700)
committerThomas Raoux <thomasraoux@google.com>
Thu, 8 Oct 2020 21:44:03 +0000 (14:44 -0700)
commitcf402a1987591923492fe697b2e84b1affbae6dd
tree119e42b43817512eba35983da869485e000a4170
parentafff74e5c26fd8b57968ae111a2a4fc8fc8deda8
[mlir][vector] Add unit test for vector distribute by block

When distributing a vector larger than the given multiplicity, we can
distribute it by block where each id gets a chunk of consecutive element
along the dimension distributed. This adds a test for this case and adds extra
checks to make sure we don't distribute for cases not multiple of multiplicity.

Differential Revision: https://reviews.llvm.org/D89061
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Dialect/Vector/vector-distribution.mlir
mlir/test/lib/Transforms/TestVectorTransforms.cpp