[all-commits] [llvm/llvm-project] e33f30: [mlir] Add support for moving reductions to outer ...

harsh-nod via All-commits all-commits at lists.llvm.org
Fri Aug 13 13:16:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e33f301ec220bf5349692126b4cf5597e08185dd
      https://github.com/llvm/llvm-project/commit/e33f301ec220bf5349692126b4cf5597e08185dd
  Author: harsh-nod <harsh at nod-labs.com>
  Date:   2021-08-13 (Fri, 13 Aug 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/VectorOps.h
    M mlir/lib/Dialect/Vector/VectorTransforms.cpp
    A mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir
    M mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp

  Log Message:
  -----------
  [mlir] Add support for moving reductions to outer most dimensions in vector.multi_reduction

The approach for handling reductions in the outer most
dimension follows that for inner most dimensions, outlined
below

First, transpose to move reduction dims, if needed
Convert reduction from n-d to 2-d canonical form
Then, for outer reductions, we emit the appropriate op
(add/mul/min/max/or/and/xor) and combine the results.

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




More information about the All-commits mailing list