[all-commits] [llvm/llvm-project] 5ca208: [mlir][Linalg] Improve the logic to perform tile a...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Thu Nov 12 00:25:57 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ca20851e44c906a446e1860f01ee5b0f6f795a6
      https://github.com/llvm/llvm-project/commit/5ca20851e44c906a446e1860f01ee5b0f6f795a6
  Author: MaheshRavishankar <ravishankarm at google.com>
  Date:   2020-11-12 (Thu, 12 Nov 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/test/Dialect/Linalg/fusion-pattern.mlir
    M mlir/test/lib/Transforms/TestLinalgFusionTransforms.cpp

  Log Message:
  -----------
  [mlir][Linalg] Improve the logic to perform tile and fuse with better dependence tracking.

This change does two main things
1) An operation might have multiple dependences to the same
   producer. Not tracking them correctly can result in incorrect code
   generation with fusion. To rectify this the dependence tracking
   needs to also have the operand number in the consumer.
2) Improve the logic used to find the fused loops making it easier to
   follow. The only constraint for fusion is that linalg ops (on
   buffers) have update semantics for the result. Fusion should be
   such that only one iteration of the fused loop (which is also a
   tiled loop) must touch only one (disjoint) tile of the output. This
   could be relaxed by allowing for recomputation that is the default
   when oeprands are tensors, or can be made legal with promotion of
   the fused view (in future).

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




More information about the All-commits mailing list