-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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> -> vector<[2]xi32>x2 %1 = vector.deinterleave %b : vector<8xi8> -> vector<4xi8>x2 %2 = vector.deinterleave %c : vector<2x8xf32> -> vector<2x4xf32>x2 %3 = vector.deinterleave %d : vector<2x4x[6]xf64> -> vector<2x4x[3]xf64>x2 ```
- Loading branch information
1 parent
874d6ea
commit a6a9725
Showing
3 changed files
with
51 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters