[all-commits] [llvm/llvm-project] 7a8013: [mlir][Vector] Provide progressive lowering of mas...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Wed Apr 29 18:30:31 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a80139059fa6d3285e5972e6959d71934ae5190
      https://github.com/llvm/llvm-project/commit/7a80139059fa6d3285e5972e6959d71934ae5190
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-04-29 (Wed, 29 Apr 2020)

  Changed paths:
    M mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
    M mlir/include/mlir/Dialect/StandardOps/EDSC/Builders.h
    M mlir/include/mlir/Dialect/StandardOps/EDSC/Intrinsics.h
    M mlir/include/mlir/Dialect/Vector/EDSC/Intrinsics.h
    M mlir/include/mlir/Dialect/Vector/VectorOps.td
    M mlir/include/mlir/Dialect/Vector/VectorTransforms.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/lib/Dialect/Affine/EDSC/Builders.cpp
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/lib/Dialect/LoopOps/EDSC/Builders.cpp
    M mlir/lib/Dialect/StandardOps/EDSC/Builders.cpp
    M mlir/lib/Dialect/Vector/VectorOps.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp

  Log Message:
  -----------
  [mlir][Vector] Provide progressive lowering of masked n-D vector transfers

This revision allows masked vector transfers with m-D buffers and n-D vectors to
progressively lower to m-D buffer and 1-D vector transfers.

For a vector.transfer_read, assuming a `memref<(leading_dims) x (major_dims) x (minor_dims) x type>` and a `vector<(minor_dims) x type>` are involved in the transfer, this generates pseudo-IR resembling:
```
     if (any_of(%ivs_major + %offsets, <, major_dims)) {
       %v = vector_transfer_read(
         {%offsets_leading, %ivs_major + %offsets_major, %offsets_minor},
          %ivs_minor):
         memref<(leading_dims) x (major_dims) x (minor_dims) x type>,
         vector<(minor_dims) x type>;
     } else {
       %v = splat(vector<(minor_dims) x type>, %fill)
     }
```

Differential Revision: https://reviews.llvm.org/D79062




More information about the All-commits mailing list