[all-commits] [llvm/llvm-project] 05c65d: [mlir][Vector] Add a VectorUnrollInterface and exp...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Mon Jul 6 05:10:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 05c65dc0fee4dbb6afdcf76bc1990c46fac06efe
      https://github.com/llvm/llvm-project/commit/05c65dc0fee4dbb6afdcf76bc1990c46fac06efe
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-07-06 (Mon, 06 Jul 2020)

  Changed paths:
    M mlir/docs/OpDefinitions.md
    M mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
    M mlir/include/mlir/Dialect/Vector/VectorOps.h
    M mlir/include/mlir/Dialect/Vector/VectorOps.td
    M mlir/include/mlir/Dialect/Vector/VectorTransformPatterns.td
    M mlir/include/mlir/Dialect/Vector/VectorTransforms.h
    M mlir/include/mlir/Interfaces/CMakeLists.txt
    A mlir/include/mlir/Interfaces/VectorUnrollInterface.h
    A mlir/include/mlir/Interfaces/VectorUnrollInterface.td
    M mlir/lib/Dialect/StandardOps/CMakeLists.txt
    M mlir/lib/Dialect/Vector/CMakeLists.txt
    M mlir/lib/Dialect/Vector/VectorOps.cpp
    M mlir/lib/Dialect/Vector/VectorTransforms.cpp
    M mlir/lib/Interfaces/CMakeLists.txt
    A mlir/lib/Interfaces/VectorUnrollInterface.cpp
    M mlir/test/Dialect/Vector/vector-transforms.mlir
    M mlir/test/lib/Transforms/TestVectorTransforms.cpp

  Log Message:
  -----------
  [mlir][Vector] Add a VectorUnrollInterface and expose UnrollVectorPattern.

The UnrollVectorPattern is can be used in a programmable fashion by:
```
OwningRewritePatternList patterns;
    patterns.insert<UnrollVectorPattern<AddFOp>>(ArrayRef<int64_t>{2, 2}, ctx);
    patterns.insert<UnrollVectorPattern<vector::ContractionOp>>(
        ArrayRef<int64_t>{2, 2, 2}, ctx);
    ...
    applyPatternsAndFoldGreedily(getFunction(), patterns);
```

Differential revision: https://reviews.llvm.org/D83064




More information about the All-commits mailing list