Skip to content
  1. May 05, 2020
  2. May 04, 2020
    • Stephen Neuendorffer's avatar
      Revert "[MLIR] Adjust libMLIR building to more closely follow libClang" · ab1ca6e6
      Stephen Neuendorffer authored
      This reverts commit 4f0f4367.
      
      This seems to show some compile dependence problems, and also breaks flang.
      ab1ca6e6
    • Valentin Churavy's avatar
      [MLIR] Adjust libMLIR building to more closely follow libClang · 4f0f4367
      Valentin Churavy authored
      - Exports MLIR targets to be used out-of-tree.
      - mimicks `add_clang_library` and `add_flang_library`.
      - Fixes libMLIR.so
      
      After https://reviews.llvm.org/D77515 libMLIR.so was no longer containing
      any object files. We originally had a cludge there that made it work with
      the static initalizers and when switchting away from that to the way the
      clang shlib does it, I noticed that MLIR doesn't create a `obj.{name}` target,
      and doesn't export it's targets to `lib/cmake/mlir`.
      
      This is due to MLIR using `add_llvm_library` under the hood, which adds
      the target to `llvmexports`.
      
      Differential Revision: https://reviews.llvm.org/D78773
      
      [MLIR] Fix libMLIR.so and LLVM_LINK_LLVM_DYLIB
      
      Primarily, this patch moves all mlir references to LLVM libraries into
      either LLVM_LINK_COMPONENTS or LINK_COMPONENTS.  This enables magic in
      the llvm cmake files to automatically replace reference to LLVM components
      with references to libLLVM.so when necessary.  Among other things, this
      completes fixing libMLIR.so, which has been broken for some configurations
      since D77515.
      
      Unlike previously, the pattern is now that mlir libraries should almost
      always use add_mlir_library.  Previously, some libraries still used
      add_llvm_library.  However, this confuses the export of targets for use
      out of tree because libraries specified with add_llvm_library are exported
      by LLVM.  Instead users which don't need/can't be linked into libMLIR.so
      can specify EXCLUDE_FROM_LIBMLIR
      
      A common error mode is linking with LLVM libraries outside of LINK_COMPONENTS.
      This almost always results in symbol confusion or multiply defined options
      in LLVM when the same object file is included as a static library and
      as part of libLLVM.so.  To catch these errors more directly, there's now
      mlir_check_all_link_libraries.
      
      To simplify usage of add_mlir_library, we assume that all mlir
      libraries depend on LLVMSupport, so it's not necessary to separately specify
      it.
      
      tested with:
      BUILD_SHARED_LIBS=on,
      BUILD_SHARED_LIBS=off + LLVM_BUILD_LLVM_DYLIB,
      BUILD_SHARED_LIBS=off + LLVM_BUILD_LLVM_DYLIB + LLVM_LINK_LLVM_DYLIB.
      
      By: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
      Differential Revision: https://reviews.llvm.org/D79067
      
      [MLIR] Move from using target_link_libraries to LINK_LIBS
      
      This allows us to correctly generate dependencies for derived targets,
      such as targets which are created for object libraries.
      
      By: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
      Differential Revision: https://reviews.llvm.org/D79243
      
      Three commits have been squashed to avoid intermediate build breakage.
      4f0f4367
    • Nicolas Vasilache's avatar
      [mlir][Linalg] Mostly NFC - Refactor Linalg patterns and transformations. · 307cfdf5
      Nicolas Vasilache authored
      Linalg transformations are currently exposed as DRRs.
      Unfortunately RewriterGen does not play well with the line of work on named linalg ops which require variadic operands and results.
      Additionally, DRR is arguably not the right abstraction to expose compositions of such patterns that don't rely on SSA use-def semantics.
      
      This revision abandons DRRs and exposes manually written C++ patterns.
      
      Refactorings and cleanups are performed to uniformize APIs.
      This refactoring will allow replacing the currently manually specified Linalg named ops.
      
      A collateral victim of this refactoring is the `tileAndFuse` DRR, and the one associated test, which will be revived at a later time.
      
      Lastly, the following 2 tests do not add value and are altered:
      - a dot_perm tile + interchange test does not test anything new and is removed
      - a dot tile + lower to loops does not need 2-D tiling and is trimmed.
      307cfdf5
    • Frederik Gossen's avatar
      [MLIR] Add complex numbers to standard dialect · 031265ad
      Frederik Gossen authored
      Add `CreateComplexOp`, `ReOp`, and `ImOp` to the standard dialect.
      This is the first step to support complex numbers.
      
      Differential Revision: https://reviews.llvm.org/D79159
      031265ad
    • Marcel Koester's avatar
      [mlir] Removed tight coupling of BufferPlacement pass to Alloc and Dealloc. · 67b466de
      Marcel Koester authored
      The current BufferPlacement implementation tries to find Alloc and Dealloc
      operations in order to move them. However, this is a tight coupling to
      standard-dialect ops which has been removed in this CL.
      
      Differential Revision: https://reviews.llvm.org/D78993
      67b466de
    • Wen-Heng (Jack) Chung's avatar
      [mlir][rocdl] add rocdl.barier op. · bc23c1d8
      Wen-Heng (Jack) Chung authored
      - Add rocdl.barrier op.
      - Lower gpu.barier to rocdl.barrier in -convert-gpu-to-rocdl.
      
      Differential Revision: https://reviews.llvm.org/D79126
      bc23c1d8
    • Wen-Heng (Jack) Chung's avatar
      [mlir][vector] add tests for type_cast taking non-zero addrspace · a581c6f8
      Wen-Heng (Jack) Chung authored
      Add tests for vector.type_cast that takes memrefs on non-zero
      addrspaces.
      
      Differential Revision: https://reviews.llvm.org/D79099
      a581c6f8
  3. May 02, 2020
  4. May 01, 2020
  5. Apr 30, 2020
Loading