Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mlir][vector] Add deinterleave operation to vector dialect #92409

Merged
merged 3 commits into from
May 23, 2024

Commits on May 22, 2024

  1. [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>
    ```
    mub-at-arm committed May 22, 2024
    Configuration menu
    Copy the full SHA
    0987e00 View commit details
    Browse the repository at this point in the history
  2. [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>
    %1 = vector.deinterleave %b
               : vector<8xi8> -> vector<4xi8>
    %2 = vector.deinterleave %c
               : vector<2x8xf32> -> vector<2x4xf32>
    %3 = vector.deinterleave %d
               : vector<2x4x[6]xf64> -> vector<2x4x[3]xf64>
    ```
    mub-at-arm committed May 22, 2024
    Configuration menu
    Copy the full SHA
    11dc393 View commit details
    Browse the repository at this point in the history
  3. [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>
    %1 = vector.deinterleave %b
               : vector<8xi8> -> vector<4xi8>
    %2 = vector.deinterleave %c
               : vector<2x8xf32> -> vector<2x4xf32>
    %3 = vector.deinterleave %d
               : vector<2x4x[6]xf64> -> vector<2x4x[3]xf64>
    ```
    mub-at-arm committed May 22, 2024
    Configuration menu
    Copy the full SHA
    3d79b27 View commit details
    Browse the repository at this point in the history