[all-commits] [llvm/llvm-project] 94cf80: [MLIR][Linalg] Pattern to fold AddOp to accumulati...

Rolf Morel via All-commits all-commits at lists.llvm.org
Thu Oct 3 03:23:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94cf80d6fd612b36d5a21bf655643e46af2b8802
      https://github.com/llvm/llvm-project/commit/94cf80d6fd612b36d5a21bf655643e46af2b8802
  Author: Rolf Morel <rolf.morel at intel.com>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/FoldAddIntoDest.cpp
    A mlir/test/Dialect/Linalg/fold-add-into-dest.mlir

  Log Message:
  -----------
  [MLIR][Linalg] Pattern to fold AddOp to accumulation via contraction op's dest (#110514)

Replaces a linalg.add with one operand the single user of a contraction,
which has a zero-filled, "identity-mapped" destination and is dominated
by the `other` operand, by the contraction with `other` as its dest.

Benefits include elision of an elementwise op, namely the linalg.add,
and removing a tensor.empty as a destination which is likely to require
an allocation upon bufferization.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list