[all-commits] [llvm/llvm-project] d33bad: [mlir][vector] Add patterns to simplify chained re...

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Wed Nov 22 07:30:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d33bad66d86a6fdb443c59561f9524f451a82db0
      https://github.com/llvm/llvm-project/commit/d33bad66d86a6fdb443c59561f9524f451a82db0
  Author: Jakub Kuderski <jakub at nod-labs.com>
  Date:   2023-11-22 (Wed, 22 Nov 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
    M mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
    A mlir/test/Dialect/Vector/chained-vector-reduction-folding.mlir
    M mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp

  Log Message:
  -----------
  [mlir][vector] Add patterns to simplify chained reductions (#73048)

Chained reductions get created during vector unrolling. These patterns
simplify them into a series of adds followed by a final reductions.

This is preferred on GPU targets like SPIR-V/Vulkan where vector
reduction gets lowered into subgroup operations that are generally more
expensive than simple vector additions.

For now, only the `add` combining kind is handled.




More information about the All-commits mailing list