[all-commits] [llvm/llvm-project] 2f11ce: [mlir][VectorOps] Extend vector.constant_mask to s...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Wed Sep 20 06:54:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f11ce5579b6f7db960a5b7a1e6c7b2b75dc94c8
      https://github.com/llvm/llvm-project/commit/2f11ce5579b6f7db960a5b7a1e6c7b2b75dc94c8
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorMask.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/Vector/invalid.mlir
    M mlir/test/Dialect/Vector/ops.mlir

  Log Message:
  -----------
  [mlir][VectorOps] Extend vector.constant_mask to support 'all true' scalable dims (#66638)

This extends `vector.constant_mask` so that mask dim sizes that
correspond to a scalable dimension are treated as if they're implicitly
multiplied by vscale. Currently this is limited to mask dim sizes of 0
or the size of the dim/vscale. This allows constant masks to represent
all true and all false scalable masks (and some variations):

```
// All true scalable mask
%mask = vector.constant_mask [8] : vector<[8]xi1>

// All false scalable mask
%mask = vector.constant_mask [0] : vector<[8]xi1>

// First two scalable rows
%mask = vector.constant_mask [2,4] : vector<4x[4]xi1>
```




More information about the All-commits mailing list