[all-commits] [llvm/llvm-project] bcd642: [mlir][Linalg] Fix linalg on tensor fusion

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Mon Mar 22 06:30:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bcd6424f9b693af57b29a0f03c52d6991be35d41
      https://github.com/llvm/llvm-project/commit/bcd6424f9b693af57b29a0f03c52d6991be35d41
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
    M mlir/test/Dialect/Linalg/fusion-tensor.mlir

  Log Message:
  -----------
  [mlir][Linalg] Fix linalg on tensor fusion

- Drop unnecessary occurrences of rewriter.eraseOp: dead linalg ops on tensors should be cleaned up by DCE.
- reimplement the part of Linalg on fusion that constructs the body and block arguments: the previous implementation had too much magic. Instead this spells out all cases explicitly and asserts / introduces TODOs for incorrect cases.

As a consequence, we can use the default traversal order for this pattern.

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




More information about the All-commits mailing list