[all-commits] [llvm/llvm-project] cdf7b6: [mlir][Linalg] Fix incorrect logic in deciding whe...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Fri Jul 2 11:17:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cdf7b661c24d037461492544996925dd5257911b
      https://github.com/llvm/llvm-project/commit/cdf7b661c24d037461492544996925dd5257911b
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2021-07-02 (Fri, 02 Jul 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Passes.td
    M mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
    A mlir/test/Dialect/Linalg/reshape_linearization_fusion_with_unit_dims.mlir

  Log Message:
  -----------
  [mlir][Linalg] Fix incorrect logic in deciding when to fuse reshapes by linearization.

Fusion by linearization should not happen when
- The reshape is expanding and it is a consumer
- The reshape is collapsing and is a producer.

The bug introduced in this logic by some recent refactoring resulted
in a crash.
To enforce this (negetive) use case, add a test that reproduces the
error and verifies the fix.

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




More information about the All-commits mailing list