[mlir][vector] Improve vector distribute integration test and fix block distribution
authorThomas Raoux <thomasraoux@google.com>
Thu, 29 Oct 2020 21:28:01 +0000 (14:28 -0700)
committerThomas Raoux <thomasraoux@google.com>
Thu, 29 Oct 2020 21:54:53 +0000 (14:54 -0700)
commit5d45f758f0fba3174126bda24b315006b8b48f1f
treedaa7be10f4610a8be2a0ffde63d800f3f758130e
parent74b078294ff974599416f4e961861dd0e8396748
[mlir][vector] Improve vector distribute integration test and fix block distribution

Fix semantic in the distribute integration test based on offline feedback. This
exposed a bug in block distribution, we need to make sure the id is multiplied
by the stride of the vector. Fix the transformation and unit test.

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