Skip to content
  1. Mar 24, 2021
  2. Mar 23, 2021
  3. Mar 22, 2021
    • Chris Lattner's avatar
      [PatternMatching] Add convenience insert method to OwningRewritePatternList. NFC. · 68747266
      Chris Lattner authored
      This allows adding a C function pointer as a matchAndRewrite style pattern, which
      is a very common case.  This adopts it in ExpandTanh to show how it reduces a level
      of nesting.
      
      We could allow C++ lambdas here, but that doesn't work as well with type inference
      in the common case.  Instead of:
      
        patterns.insert(convertTanhOp);
      
      you need to specify:
      
        patterns.insert<math::TanhOp>(convertTanhOp);
      
      which is boilerplate'y.  Capturing state like this is very uncommon, so we choose
      to require clients to define their own structs and use the non-convenience method
      when they need to do so.
      
      Differential Revision: https://reviews.llvm.org/D99039
      68747266
    • Rob Suderman's avatar
      [mlir][tosa] Fix tosa.mul to use tosa.apply_scale · d7c44a5c
      Rob Suderman authored
      Multiply-shift requires wider compute types or CPU specific code to avoid
      premature truncation, apply_shift fixes this issue
      
      Also, Tosa's mul op supports different input / output types. Added path that
      sign-extends input values to int-32 values before multiplying.
      
      Differential Revision: https://reviews.llvm.org/D99011
      d7c44a5c
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Fix linalg on tensor fusion · bcd6424f
      Nicolas Vasilache authored
      - 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
      bcd6424f
    • Adrian Kuegel's avatar
      [mlir] Add an option to still use bottom-up traversal · c691b968
      Adrian Kuegel authored
      GreedyPatternRewriteDriver was changed from bottom-up traversal to top-down traversal. Not all passes work yet with that change for traversal order. To give some time for fixing, add an option to allow to switch back to bottom-up traversal. Use this option in FusionOfTensorOpsPass which fails otherwise.
      
      Differential Revision: https://reviews.llvm.org/D99059
      c691b968
  4. Mar 21, 2021
Loading