Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][VectorOps] Add deinterleave operation to vector dialect
The deinterleave operation constructs two vectors from a single input vector. Each new vector is the collection of even and odd elements from the input, respectively. This is essentially the inverse of an interleave operation. Each output's size is half of the input vector's trailing dimension for the n-D case and only dimension for 1-D cases. It is not possible to conduct the operation on 0-D inputs or vectors where the size of the (trailing) dimension is 1. The operation supports scalable vectors. Example: ```mlir %0 = vector.deinterleave %a : vector<[4]xi32> ; yields vector<[2]xi32>, vector<[2]xi32> %1 = vector.deinterleave %b : vector<8xi8> ; yields vector<4xi8>, vector<4xi8> %2 = vector.deinterleave %c : vector<2x8xf32> ; yields vector<2x4xf32>, vector<2x4xf32> %3 = vector.deinterleave %d : vector<2x4x[6]xf64> ; yields vector<2x4x[3]xf64>, vector<2x4x[3]xf64> ```
- Loading branch information