[all-commits] [llvm/llvm-project] 944a2f: [mlir][Linalg] Add callbacks to fusion of elementw...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Mon Apr 5 16:09:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 944a2fe7633fcdd600de2772364e406514d794da
      https://github.com/llvm/llvm-project/commit/944a2fe7633fcdd600de2772364e406514d794da
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2021-04-05 (Mon, 05 Apr 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
    A mlir/test/Dialect/Linalg/fusion-elementwise-options.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLinalgElementwiseFusion.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][Linalg] Add callbacks to fusion of elementwise operations to control fusion.

Right now Elementwise operations fusion in Linalg fuses everything it
can. This can run up against resource limits of the target hardware
without some checks. This patch adds a callback function that clients
can use to implement a cost function. When two elementwise operations
are deemed structurally fusable, the callback can be used to control
if the fusion applies.

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




More information about the All-commits mailing list