Skip to content
  1. Jul 20, 2020
  2. Jul 15, 2020
  3. Jul 10, 2020
  4. Jul 09, 2020
  5. Jul 07, 2020
  6. Jul 04, 2020
  7. Jul 01, 2020
  8. Jun 30, 2020
  9. Jun 29, 2020
    • Adam D Straw's avatar
      [mlir] add unsigned comparison builders to Affine EDSC · 25055a4f
      Adam D Straw authored
      Current Affine comparison builders, which use operator overload, default to signed comparison.  This creates the possibility of misuse of these builders and potential correctness issues when dealing with unsigned integers.  This change makes the distinction between signed and unsigned comparison builders and forces the caller to make a choice between the two.
      
      Differential Revision: https://reviews.llvm.org/D82323
      25055a4f
  10. Jun 25, 2020
  11. Jun 19, 2020
    • River Riddle's avatar
      [mlir][DialectConversion] Refactor how block argument types get converted · 8d67d187
      River Riddle authored
      This revision removes the TypeConverter parameter passed to the apply* methods, and instead moves the responsibility of region type conversion to patterns. The types of a region can be converted using the 'convertRegionTypes' method, which acts similarly to the existing 'applySignatureConversion'. This method ensures that all blocks within, and including those moved into, a region will have the block argument types converted using the provided converter.
      
      This has the benefit of making more of the legalization logic controlled by patterns, instead of being handled explicitly by the driver. It also opens up the possibility to support multiple type conversions at some point in the future.
      
      This revision also adds a new utility class `FailureOr<T>` that provides a LogicalResult friendly facility for returning a failure or a valid result value.
      
      Differential Revision: https://reviews.llvm.org/D81681
      8d67d187
  12. Jun 18, 2020
  13. Jun 17, 2020
  14. Jun 16, 2020
    • Alex Zinenko's avatar
      [mlir] refactor Linalg LoopNestBuilder to use common infra · b4bc72af
      Alex Zinenko authored
      Recent work has introduced support for constructing loops via `::build` with
      callbacks that construct loop bodies using only the core OpBuilder. This is now
      supported on all loop types that Linalg lowers to. Refactor LoopNestBuilder in
      Linalg to rely on this functionality instead of using a custom EDSC-based
      approach to creating loop nests.
      
      The specialization targeting parallel loops is also simplified by factoring out
      the recursive call into a separate static function and considering only two
      alternatives: top-level loop is parallel or sequential.
      
      This removes the last remaining in-tree use of edsc::LoopBuilder, which is now
      deprecated and will be removed soon.
      
      Differential Revision: https://reviews.llvm.org/D81873
      b4bc72af
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Retire C++ MatmulOp in favor of a linalg-ods-gen'd op. · eae76fae
      Nicolas Vasilache authored
      Summary:
      This revision replaces MatmulOp, now that DRR rules have been dropped.
      This revision also fixes minor parsing bugs and a plugs a few holes to get e2e paths working (e.g. library call emission).
      
      During the replacement the i32 version had to be dropped because only the EDSC operators +, *, etc support type inference.
      
      Deciding on a type-polymorphic behavior, and implementing it, is left for future work.
      
      Reviewers: aartbik
      
      Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes
      
      Tags: #mlir
      
      Differential Revision: https://reviews.llvm.org/D81935
      eae76fae
    • Kirill Bobyrev's avatar
      Revert "[mlir][Linalg] Retire C++ MatmulOp in favor of a linalg-ods-gen'd op." · 9b72b47e
      Kirill Bobyrev authored
      This reverts commit 8c6c49f2.
      
      As discussed offline, this patch breaks internal builds and tests so I'm
      reverting it for now.
      9b72b47e
    • River Riddle's avatar
      [mlir][DialectConversion] Cache type conversions and add a few useful helpers · 0e360744
      River Riddle authored
      It is quite common for the same type to be converted many types throughout the conversion process, and there isn't any good reason why we aren't caching that result. Especially given that we currently use identity conversion to signify legality. This revision also adds a few additional helpers to TypeConverter.
      
      Differential Revision: https://reviews.llvm.org/D81679
      0e360744
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Retire C++ MatmulOp in favor of a linalg-ods-gen'd op. · 8c6c49f2
      Nicolas Vasilache authored
      This revision replaces MatmulOp, now that DRR rules have been dropped.
      This revision also fixes minor parsing bugs and a plugs a few holes to get e2e paths working (e.g. library call emission).
      
      During the replacement the i32 version had to be dropped because only the EDSC operators +, *, etc support type inference.
      
      Deciding on a type-polymorphic behavior, and implementing it, is left for future work.
      
      Differential Revision: https://reviews.llvm.org/D79762
      8c6c49f2
  15. Jun 11, 2020
    • Alexander Belyaev's avatar
      [mlir] Fix some of the warnings in MLIR code. · e9ac7927
      Alexander Belyaev authored
      Summary:
      * extra ';' in the following files:
          mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
          mlir/lib/Dialect/Shape/IR/Shape.cpp
      
      * base class ‘mlir::ConvertVectorToSCFBase<ConvertVectorToSCFPass>’
        should be explicitly initialized in the copy constructor [-Wextra] in
          mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
      
      * warning: ‘bool Expression::operator==(const Expression&) const’
        defined but not used [-Wunused-function] in
          mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
      
      Differential Revision: https://reviews.llvm.org/D81673
      e9ac7927
  16. Jun 08, 2020
  17. Jun 05, 2020
    • Nicolas Vasilache's avatar
    • Nicolas Vasilache's avatar
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Add a hoistRedundantVectorTransfers helper function · 6953cf65
      Nicolas Vasilache authored
      This revision adds a helper function to hoist vector.transfer_read /
      vector.transfer_write pairs out of immediately enclosing scf::ForOp
      iteratively, if the following conditions are true:
         1. The 2 ops access the same memref with the same indices.
         2. All operands are invariant under the enclosing scf::ForOp.
         3. No uses of the memref either dominate the transfer_read or are
         dominated by the transfer_write (i.e. no aliasing between the write and
         the read across the loop)
      
      To improve hoisting opportunities, call the `moveLoopInvariantCode` helper
      function on the candidate loop above which to hoist. Hoisting the transfers
      results in scf::ForOp yielding the value that originally transited through
      memory.
      
      This revision additionally exposes `moveLoopInvariantCode` as a helper in
      LoopUtils.h and updates SliceAnalysis to support return scf::For values and
      allow hoisting across multiple scf::ForOps.
      
      Differential Revision: https://reviews.llvm.org/D81199
      6953cf65
    • Uday Bondhugula's avatar
      [MLIR] Update linalg.conv lowering to use affine load in the absence of padding · 0f6999af
      Uday Bondhugula authored
      Update linalg to affine lowering for convop to use affine load for input
      whenever there is no padding. It had always been using std.loads because
      max in index functions (needed for non-zero padding if not materializing
      zeros) couldn't be represented in the non-zero padding cases.
      
      In the future, the non-zero padding case could also be made to use
      affine - either by materializing or using affine.execute_region. The
      latter approach will not impact the scf/std output obtained after
      lowering out affine.
      
      Differential Revision: https://reviews.llvm.org/D81191
      0f6999af
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Add a hoistViewAllocOps helper function · 3463d983
      Nicolas Vasilache authored
      This revision adds a helper function to hoist alloc/dealloc pairs and
      alloca op out of immediately enclosing scf::ForOp if both conditions are true:
         1. all operands are defined outside the loop.
         2. all uses are ViewLikeOp or DeallocOp.
      
      This is now considered Linalg-specific and will be generalized on a per-need basis.
      
      Differential Revision: https://reviews.llvm.org/D81152
      3463d983
  18. Jun 03, 2020
  19. May 30, 2020
  20. May 29, 2020
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Make contraction vectorization use vector transfers · 9534192c
      Nicolas Vasilache authored
      This revision replaces the load + vector.type_cast by appropriate vector transfer
      operations. These play more nicely with other vector abstractions and canonicalization
      patterns and lower to load/store with or without masks when appropriate.
      
      Differential Revision: https://reviews.llvm.org/D80809
      9534192c
    • Nicolas Vasilache's avatar
      [mlir][Linalg][Vector] Add forwarding patterns between linalg.copy and vector.transfer · 1ee11432
      Nicolas Vasilache authored
      This revision adds custom rewrites for patterns that arise during linalg structured
      ops vectorization. These patterns allow the composition of linalg promotion,
      vectorization and removal of redundant copies.
      
      The patterns are voluntarily limited and restrictive atm.
      More robust behavior will be implemented once more powerful side effect modeling and analyses are available on view/subview.
      
      On the transfer_read side, the following pattern is rewritten:
      ```
         %alloc = ...
         [optional] %view = std.view %alloc ...
         %subView = subview %allocOrView ...
         [optional] linalg.fill(%allocOrView, %cst) ...
         ...
         linalg.copy(%in, %subView) ...
         vector.transfer_read %allocOrView[...], %cst ...
      ```
      into
      ```
         [unchanged] %alloc = ...
         [unchanged] [optional] %view = std.view %alloc ...
         [unchanged] [unchanged] %subView = subview %allocOrView ...
         ...
         vector.transfer_read %in[...], %cst ...
      ```
      
      On the transfer_write side, the following pattern is rewriten:
      ```
         %alloc = ...
         [optional] %view = std.view %alloc ...
         %subView = subview %allocOrView...
         ...
         vector.transfer_write %..., %allocOrView[...]
         linalg.copy(%subView, %out)
      ```
      
      Differential Revision: https://reviews.llvm.org/D80728
      1ee11432
    • Ehsan Toosi's avatar
      [MLIR][BufferPlacement] Support functions that return Memref typed results · 7a3a2535
      Ehsan Toosi authored
      Buffer placement can now operates on functions that return buffers. These
      buffers escape from the deallocation phase of buffer placement.
      
      Differential Revision: https://reviews.llvm.org/D80696
      7a3a2535
  21. May 28, 2020
    • MaheshRavishankar's avatar
      [mlir][Linalg] Add pass to remove unit-extent dims from tensor · 2b0c8546
      MaheshRavishankar authored
      operands of Generic ops.
      
      Unit-extent dimensions are typically used for achieving broadcasting
      behavior. The pattern added (along with canonicalization patterns
      added previously) removes the use of unit-extent dimensions, and
      instead uses a more canonical representation of the computation.  This
      new pattern is not added as a canonicalization for now since it
      entails adding additional reshape operations. A pass is added to
      exercise these patterns, along with an API entry to populate a
      patterns list with these patterns.
      
      Differential Revision: https://reviews.llvm.org/D79766
      2b0c8546
  22. May 27, 2020
  23. May 20, 2020
Loading