Skip to content
  1. Nov 04, 2020
    • mikeurbach's avatar
      [MLIR] Move eraseArguments and eraseResults to FunctionLike · 2e36e0da
      mikeurbach authored
      Previously, they were only defined for `FuncOp`.
      
      To support this, `FunctionLike` needs a way to get an updated type
      from the concrete operation. This adds a new hook for that purpose,
      called `getTypeWithoutArgsAndResults`.
      
      For now, `FunctionLike` continues to assume the type is
      `FunctionType`, and concrete operations that use another type can hide
      the `getType`, `setType`, and `getTypeWithoutArgsAndResults` methods.
      
      Reviewed By: rriddle
      
      Differential Revision: https://reviews.llvm.org/D90363
      2e36e0da
  2. Nov 03, 2020
  3. Oct 30, 2020
    • Sean Silva's avatar
      [mlir] Move some linalg patterns around. · 30e130c3
      Sean Silva authored
      The bufferization patterns are moved to the .cpp file, which is
      preferred in the codebase when it makes sense.
      
      The LinalgToStandard patterns are kept a header because they are
      expected to be used individually. However, they are moved to
      LinalgToStandard.h which is the file corresponding to where they are
      defined.
      
      This also removes TensorCastOpConverter, which is handled by
      populateStdBufferizePatterns now. Eventually, the constant op lowering
      will be handled as well, but it there are currently holdups on moving
      it (see https://reviews.llvm.org/D89916).
      
      Differential Revision: https://reviews.llvm.org/D90254
      30e130c3
    • Mehdi Amini's avatar
      Fix "incorrect" assertions in Linalg/EDSC/Builders.cpp (NFC) · c23cb8b0
      Mehdi Amini authored
      It is semantically equivalent, but the intent was really lost there.
      This fixes a warning/error from MSVC as well, see PR48013
      c23cb8b0
  4. Oct 29, 2020
  5. Oct 28, 2020
  6. Oct 27, 2020
    • River Riddle's avatar
      [mlir][Pattern] Add a new FrozenRewritePatternList class · 3fffffa8
      River Riddle authored
      This class represents a rewrite pattern list that has been frozen, and thus immutable. This replaces the uses of OwningRewritePatternList in pattern driver related API, such as dialect conversion. When PDL becomes more prevalent, this API will allow for optimizing a set of patterns once without the need to do this per run of a pass.
      
      Differential Revision: https://reviews.llvm.org/D89104
      3fffffa8
    • River Riddle's avatar
      [mlir][NFC] Move around the code related to PatternRewriting to improve layering · b6eb26fd
      River Riddle authored
      There are several pieces of pattern rewriting infra in IR/ that really shouldn't be there. This revision moves those pieces to a better location such that they are easier to evolve in the future(e.g. with PDL). More concretely this revision does the following:
      
      * Create a Transforms/GreedyPatternRewriteDriver.h and move the apply*andFold methods there.
      The definitions for these methods are already in Transforms/ so it doesn't make sense for the declarations to be in IR.
      
      * Create a new lib/Rewrite library and move PatternApplicator there.
      This new library will be focused on applying rewrites, and will also include compiling rewrites with PDL.
      
      Differential Revision: https://reviews.llvm.org/D89103
      b6eb26fd
    • MaheshRavishankar's avatar
      [mlir][Linalg] Miscalleneous enhancements to cover more fusion cases. · 78f37b74
      MaheshRavishankar authored
      Adds support for
      - Dropping unit dimension loops for indexed_generic ops.
      - Folding consecutive folding (or expanding) reshapes when the result
        (or src) is a scalar.
      - Fixes to indexed_generic -> generic fusion when zero-dim tensors are
        involved.
      
      Differential Revision: https://reviews.llvm.org/D90118
      78f37b74
  7. Oct 26, 2020
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Add basic support for TileAndFuse on Linalg on tensors. · 37e0fdd0
      Nicolas Vasilache authored
      This revision allows the fusion of the producer of input tensors in the consumer under a tiling transformation (which produces subtensors).
      Many pieces are still missing (e.g. support init_tensors, better refactor LinalgStructuredOp interface support, try to merge implementations and reuse code) but this still allows getting started.
      
      The greedy pass itself is just for testing purposes and will be extracted in a separate test pass.
      
      Differential revision: https://reviews.llvm.org/D89491
      37e0fdd0
  8. Oct 20, 2020
  9. Oct 14, 2020
  10. Oct 13, 2020
  11. Oct 12, 2020
  12. Oct 10, 2020
  13. Oct 09, 2020
  14. Oct 08, 2020
  15. Oct 07, 2020
  16. Oct 06, 2020
  17. Oct 05, 2020
  18. Oct 02, 2020
    • Nicolas Vasilache's avatar
      [mlir] Add a subtensor operation · e3de249a
      Nicolas Vasilache authored
      This revision introduces a `subtensor` op, which is the counterpart of `subview` for a tensor operand. This also refactors the relevant pieces to allow reusing the `subview` implementation where appropriate.
      
      This operation will be used to implement tiling for Linalg on tensors.
      e3de249a
  19. Oct 01, 2020
  20. Sep 30, 2020
    • MaheshRavishankar's avatar
      [mlir][Linalg] Add pattern to tile and fuse Linalg operations on buffers. · c694588f
      MaheshRavishankar authored
      The pattern is structured similar to other patterns like
      LinalgTilingPattern. The fusion patterns takes options that allows you
      to fuse with producers of multiple operands at once.
      - The pattern fuses only at the level that is known to be legal, i.e
        if a reduction loop in the consumer is tiled, then fusion should
        happen "before" this loop. Some refactoring of the fusion code is
        needed to fuse only where it is legal.
      - Since the fusion on buffers uses the LinalgDependenceGraph that is
        not mutable in place the fusion pattern keeps the original
        operations in the IR, but are tagged with a marker that can be later
        used to find the original operations.
      
      This change also fixes an issue with tiling and
      distribution/interchange where if the tile size of a loop were 0 it
      wasnt account for in these.
      
      Differential Revision: https://reviews.llvm.org/D88435
      c694588f
    • Mahesh Ravishankar's avatar
      [mlir][Linalg] Generalize the logic to compute reassociation maps · 892fdc92
      Mahesh Ravishankar authored
      while folding tensor_reshape op.
      
      While folding reshapes that introduce unit extent dims, the logic to
      compute the reassociation maps can be generalized to handle some
      corner cases, for example, when the folded shape still has unit-extent
      dims but corresponds to folded unit extent dims of the expanded shape.
      
      Differential Revision: https://reviews.llvm.org/D88521
      892fdc92
Loading