Skip to content
  1. Apr 12, 2021
  2. Apr 09, 2021
  3. Apr 08, 2021
    • Hanhan Wang's avatar
      [mlir][StandardToSPIRV] Handle i1 case for lowering memref.load/store op · c3614358
      Hanhan Wang authored
      This patch unconditionally converts i1 types to i8 types on memrefs. If the
      extensions or capabilities are not met, they will be converted to i32. Hence the
      logic in IntLoadPattern and IntStorePattern are also updated.
      
      Also added the implementation of SPIRVTypeConverter::getOptions().
      
      Reviewed By: antiagainst
      
      Differential Revision: https://reviews.llvm.org/D99724
      c3614358
    • Lei Zhang's avatar
      [mlir][spirv] Add control for non-32-bit scalar type emulation · 5299843c
      Lei Zhang authored
      Non-32-bit scalar types require special hardware support that may not
      exist on all GPUs. This is reflected in SPIR-V as that non-32-bit scalar
      types require special capabilities or extensions.
      
      Previously when there is a non-32-bit type and no native support, we
      unconditionally emulate it with 32-bit ones. This isn't good given that
      it can have implications over ABI and data layout consistency.
      
      This commit introduces an option to control whether to use 32-bit
      types to emulate.
      
      Differential Revision: https://reviews.llvm.org/D100059
      5299843c
    • Lei Zhang's avatar
      [mlir][spirv] Timely fail type conversion · 004f29c0
      Lei Zhang authored
      Per the TypeConverter API contract, returning `llvm:None` means
      other conversion rules should be tried. But we only have one
      rule per input type. So there is no need to try others and we can
      just directly fail, which should return `nullptr`. This avoids
      unnecessary checks.
      
      Differential Revision: https://reviews.llvm.org/D100058
      004f29c0
    • Tobias Gysi's avatar
      [mlir] add support for index type in vectors. · b614ada0
      Tobias Gysi authored
      The patch enables the use of index type in vectors. It is a prerequisite to support vectorization for indexed Linalg operations. This refactoring became possible due to the newly introduced data layout infrastructure. The data layout of a module defines the bitwidth of the index type needed to verify bitcasts and similar vector operations.
      
      Reviewed By: nicolasvasilache
      
      Differential Revision: https://reviews.llvm.org/D99948
      b614ada0
  4. Apr 07, 2021
  5. Apr 06, 2021
  6. Apr 05, 2021
  7. Apr 02, 2021
    • Lei Zhang's avatar
      [mlir][spirv] Add utilities for push constant value · 6dd07fa5
      Lei Zhang authored
      This commit add utility functions for creating push constant
      storage variable and loading values from it.
      
      Along the way, performs some clean up:
      
      * Deleted `setABIAttrs`, which is just a 4-liner function
        with one user.
      * Moved `SPIRVConverstionTarget` into `mlir` namespace,
        to be consistent with `SPIRVTypeConverter` and
        `LLVMConversionTarget`.
      
      Reviewed By: mravishankar
      
      Differential Revision: https://reviews.llvm.org/D99725
      6dd07fa5
    • Aart Bik's avatar
      [mlir][sparse] support for very narrow index and pointer types · a0c5b7e3
      Aart Bik authored
      Rationale:
      Small indices and values, when allowed by the required range of the
      input tensors, can reduce the memory footprint of sparse tensors
      even more. Note, however, that we must be careful zero extending
      the values (since sparse tensors never use negatives for indexing),
      but LLVM treats the index type as signed in most memory operations
      (like the scatter and gather). This CL dots all the i's in this regard.
      
      Reviewed By: bixia
      
      Differential Revision: https://reviews.llvm.org/D99777
      a0c5b7e3
  8. Apr 01, 2021
  9. Mar 31, 2021
  10. Mar 30, 2021
    • Inho Seo's avatar
      Added static verification for Linalg Ops. · f5846334
      Inho Seo authored
      This verification is to check if the indices for static shaped operands
      on linalgOps access out of bound memory or not. For dynamic shaped
      operands, we would be able to check it on runtime stage.
      
      Found several invalid Linalg ops testcases, and fixed them.
      
      Reviewed By: hanchung
      
      Differential Revision: https://reviews.llvm.org/D98390
      f5846334
  11. Mar 29, 2021
  12. Mar 27, 2021
  13. Mar 25, 2021
    • Alexander Belyaev's avatar
      [mlir][linalg] Add output tensor args folding for linalg.tiled_loop. · 7f2236cf
      Alexander Belyaev authored
      Folds away TiledLoopOp output tensors when the following conditions are met:
      * result of `linalg.tiled_loop` has no uses
      * output tensor is the argument of `linalg.yield`
      
      Example:
      
      ```
      %0 = linalg.tiled_loop ...  outs (%out, %out_buf:tensor<...>, memref<...>) {
        ...
        linalg.yield %out : tensor ...
      }
      ```
      
      Becomes
      
      ```
      linalg.tiled_loop ...  outs (%out_buf:memref<...>) {
        ...
        linalg.yield
      }
      ```
      
      Differential Revision: https://reviews.llvm.org/D99333
      7f2236cf
    • Mehdi Amini's avatar
      Define a `NoTerminator` traits that allows operations with a single block... · 973ddb7d
      Mehdi Amini authored
      Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator
      
      In particular for Graph Regions, the terminator needs is just a
      historical artifact of the generalization of MLIR from CFG region.
      Operations like Module don't need a terminator, and before Module
      migrated to be an operation with region there wasn't any needed.
      
      To validate the feature, the ModuleOp is migrated to use this trait and
      the ModuleTerminator operation is deleted.
      
      This patch is likely to break clients, if you're in this case:
      
      - you may iterate on a ModuleOp with `getBody()->without_terminator()`,
        the solution is simple: just remove the ->without_terminator!
      - you created a builder with `Builder::atBlockTerminator(module_body)`,
        just use `Builder::atBlockEnd(module_body)` instead.
      - you were handling ModuleTerminator: it isn't needed anymore.
      - for generic code, a `Block::mayNotHaveTerminator()` may be used.
      
      Differential Revision: https://reviews.llvm.org/D98468
      973ddb7d
  14. Mar 24, 2021
Loading