[mlir] Progressively lower vector to SCF
authorMatthias Springer <springerm@google.com>
Tue, 20 Apr 2021 08:17:56 +0000 (17:17 +0900)
committerMatthias Springer <springerm@google.com>
Tue, 20 Apr 2021 09:49:36 +0000 (18:49 +0900)
commit7cc8106f679adf28ef06a39486290e5e636e1437
tree39ab11e420573cebfc2623071ecd8cce658482d0
parent34810e1b9c4554976d9d8249b18f48ff083b55fa
[mlir] Progressively lower vector to SCF

Add a new ProgressiveVectorToSCF pass that lowers vector transfer ops to SCF by gradually unpacking one dimension at time. Unpacking stops at 1D, but can be configured to stop earlier, should the HW support (N>1)-d vectors.

The current implementation cannot handle permutation maps, masks, tensor types and unrolling yet. These will be added in subsequent commits. Once features are on par with VectorToSCF, this implementation will replace VectorToSCF.

Differential Revision: https://reviews.llvm.org/D100622
mlir/include/mlir/Conversion/VectorToSCF/ProgressiveVectorToSCF.h [new file with mode: 0644]
mlir/lib/Conversion/VectorToSCF/CMakeLists.txt
mlir/lib/Conversion/VectorToSCF/ProgressiveVectorToSCF.cpp [new file with mode: 0644]
mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir
mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir [new file with mode: 0644]
mlir/test/lib/Transforms/TestVectorTransforms.cpp