Skip to content
  1. Dec 02, 2020
  2. Dec 01, 2020
    • Sean Silva's avatar
      [mlir] Small cleanups to func-bufferize/finalizing-bufferize · 774f1d3f
      Sean Silva authored
      - Address TODO in scf-bufferize: the argument materialization issue is
        now fixed and the code is now in Transforms/Bufferize.cpp
      - Tighten up finalizing-bufferize to avoid creating invalid IR when
        operand types potentially change
      - Tidy up the testing of func-bufferize, and move appropriate tests
        to a new finalizing-bufferize.mlir
      - The new stricter checking in finalizing-bufferize revealed that we
        needed a DimOp conversion pattern (found when integrating into npcomp).
        Previously, the converion infrastructure was blindly changing the
        operand type during finalization, which happened to work due to
        DimOp's tensor/memref polymorphism, but is generally not encouraged
        (the new pattern is the way to tell the conversion infrastructure that
        it is legal to change that type).
      774f1d3f
  3. Nov 29, 2020
    • Jacques Pienaar's avatar
      [mlir] Add a shape function library op · e534cee2
      Jacques Pienaar authored
      Op with mapping from ops to corresponding shape functions for those op
      in the library and mechanism to associate shape functions to functions.
      The mapping of operand to shape function is kept separate from the shape
      functions themselves as the operation is associated to the shape
      function and not vice versa, and one could have a common library of
      shape functions that can be used in different contexts.
      
      Use fully qualified names and require a name for shape fn lib ops for
      now and an explicit print/parse (based around the generated one & GPU
      module op ones).
      
      This commit reverts d9da4c3e. Fixes
      missing headers (don't know how that was working locally).
      
      Differential Revision: https://reviews.llvm.org/D91672
      e534cee2
    • Mehdi Amini's avatar
      Revert "[mlir] Add a shape function library op" · d9da4c3e
      Mehdi Amini authored
      This reverts commit 6dd9596b.
      
      Build is broken.
      d9da4c3e
    • Jacques Pienaar's avatar
      [mlir] Add a shape function library op · 6dd9596b
      Jacques Pienaar authored
      Op with mapping from ops to corresponding shape functions for those op
      in the library and mechanism to associate shape functions to functions.
      The mapping of operand to shape function is kept separate from the shape
      functions themselves as the operation is associated to the shape
      function and not vice versa, and one could have a common library of
      shape functions that can be used in different contexts.
      
      Use fully qualified names and require a name for shape fn lib ops for
      now and an explicit print/parse (based around the generated one & GPU
      module op ones).
      
      Differential Revision: https://reviews.llvm.org/D91672
      6dd9596b
  4. Nov 27, 2020
  5. Nov 26, 2020
  6. Nov 25, 2020
  7. Nov 24, 2020
    • Aart Bik's avatar
      [mlir][sparse] generalize invariant expression handling in sparse compiler · b228e2bd
      Aart Bik authored
      Generalizes invariant handling to anything defined outside the Linalg op
      (parameters and SSA computations). Fixes bug that was using parameter number
      as tensor number.
      
      Reviewed By: penpornk
      
      Differential Revision: https://reviews.llvm.org/D91985
      b228e2bd
    • Alex Zinenko's avatar
      [mlir] Add conversion from SCF parallel loops to OpenMP · 119545f4
      Alex Zinenko authored
      Introduce a conversion pass from SCF parallel loops to OpenMP dialect
      constructs - parallel region and workshare loop. Loops with reductions are not
      supported because the OpenMP dialect cannot model them yet.
      
      The conversion currently targets only one level of parallelism, i.e. only
      one top-level `omp.parallel` operation is produced even if there are nested
      `scf.parallel` operations that could be mapped to `omp.wsloop`. Nested
      parallelism support is left for future work.
      
      Reviewed By: kiranchandramohan
      
      Differential Revision: https://reviews.llvm.org/D91982
      119545f4
    • Nicolas Vasilache's avatar
      [mlir] NFC - Refactor and expose a helper printOffsetSizesAndStrides helper function. · c2470810
      Nicolas Vasilache authored
      Print part of an op of the form:
      ```
        <optional-offset-prefix>`[` offset-list `]`
        <optional-size-prefix>`[` size-list `]`
        <optional-stride-prefix>[` stride-list `]`
      ```
      
      Also address some leftover nits.
      
      Differential revision: https://reviews.llvm.org/D92031
      c2470810
    • Nicolas Vasilache's avatar
      [mlir] NFC - Refactor and expose a parsing helper for OffsetSizeAndStrideInterface · b6c71c13
      Nicolas Vasilache authored
      Parse trailing part of an op of the form:
      ```
        <optional-offset-prefix>`[` offset-list `]`
        <optional-size-prefix>`[` size-list `]`
        <optional-stride-prefix>[` stride-list `]`
      ```
      Each entry in the offset, size and stride list either resolves to an integer
      constant or an operand of index type.
      Constants are added to the `result` as named integer array attributes with
      name `OffsetSizeAndStrideOpInterface::getStaticOffsetsAttrName()` (resp.
      `getStaticSizesAttrName()`, `getStaticStridesAttrName()`).
      
      Append the number of offset, size and stride operands to `segmentSizes`
      before adding it to `result` as the named attribute:
      `OpTrait::AttrSizedOperandSegments<void>::getOperandSegmentSizeAttr()`.
      Offset, size and stride operands resolution occurs after `preResolutionFn`
      to give a chance to leading operands to resolve first, after parsing the
      types.
      ```
      ParseResult parseOffsetsSizesAndStrides(
          OpAsmParser &parser, OperationState &result, ArrayRef<int> segmentSizes,
          llvm::function_ref<ParseResult(OpAsmParser &, OperationState &)>
              preResolutionFn = nullptr,
          llvm::function_ref<ParseResult(OpAsmParser &)> parseOptionalOffsetPrefix =
              nullptr,
          llvm::function_ref<ParseResult(OpAsmParser &)> parseOptionalSizePrefix =
              nullptr,
          llvm::function_ref<ParseResult(OpAsmParser &)> parseOptionalStridePrefix =
              nullptr);
      ```
      
      Differential revision: https://reviews.llvm.org/D92030
      b6c71c13
    • Tei Jeong's avatar
      Fix CalibratedQuantizedType's print function to match parser · 76006326
      Tei Jeong authored
      Reviewed By: liufengdb
      
      Differential Revision: https://reviews.llvm.org/D92034
      76006326
    • Stella Laurenzo's avatar
      [mlir] Add Tosa dialect const folder for tosa.const. · db9713cd
      Stella Laurenzo authored
      * Was missed in the initial submission and is required for a ConstantLike op.
      * Also adds a materializeConstant hook to preserve it.
      * Tightens up the argument constraint on tosa.const to match what is actually legal.
      
      Differential Revision: https://reviews.llvm.org/D92040
      db9713cd
    • Nicolas Vasilache's avatar
      [mlir] NFC - Expose an OffsetSizeAndStrideOpInterface · a8de412f
      Nicolas Vasilache authored
      This revision will make it easier to create new ops base on the strided memref abstraction outside of the std dialect.
      
      OffsetSizeAndStrideOpInterface is an interface for ops that allow specifying mixed dynamic and static offsets, sizes and strides variadic operands.
          Ops that implement this interface need to expose the following methods:
            1. `getArrayAttrRanks` to specify the length of static integer
                attributes.
            2. `offsets`, `sizes` and `strides` variadic operands.
            3. `static_offsets`, resp. `static_sizes` and `static_strides` integer
                array attributes.
      
          The invariants of this interface are:
            1. `static_offsets`, `static_sizes` and `static_strides` have length
                exactly `getArrayAttrRanks()`[0] (resp. [1], [2]).
            2. `offsets`, `sizes` and `strides` have each length at most
               `getArrayAttrRanks()`[0] (resp. [1], [2]).
            3. if an entry of `static_offsets` (resp. `static_sizes`,
               `static_strides`) is equal to a special sentinel value, namely
               `ShapedType::kDynamicStrideOrOffset` (resp. `ShapedType::kDynamicSize`,
               `ShapedType::kDynamicStrideOrOffset`), then the corresponding entry is
               a dynamic offset (resp. size, stride).
            4. a variadic `offset` (resp. `sizes`, `strides`) operand  must be present
               for each dynamic offset (resp. size, stride).
      
          This interface is useful to factor out common behavior and provide support
          for carrying or injecting static behavior through the use of the static
          attributes.
      
      Differential Revision: https://reviews.llvm.org/D92011
      a8de412f
    • Alexander Belyaev's avatar
  8. Nov 23, 2020
  9. Nov 21, 2020
  10. Nov 20, 2020
  11. Nov 19, 2020
    • River Riddle's avatar
      [mlir][BuiltinDialect] Resolve comments from D91571 · 65fcddff
      River Riddle authored
      * Move ops to a BuiltinOps.h
      * Add file comments
      65fcddff
    • ergawy's avatar
      [MLIR][SPIRV] ModuleCombiner: deduplicate global vars, spec consts, and funcs. · 341f3c11
      ergawy authored
      This commit extends the functionality of the SPIR-V module combiner
      library by adding new deduplication capabilities. In particular,
      implementation of deduplication of global variables and specialization
      constants, and functions is introduced.
      
      For global variables, 2 variables are considered duplicate if they either
      have the same descriptor set + binding or the same built_in attribute.
      
      For specialization constants, 2 spec constants are considered duplicate if
      they have the same spec_id attribute.
      
      2 functions are deduplicated if they are identical. 2 functions are
      identical if they have the same prototype, attributes, and body.
      
      Reviewed By: antiagainst
      
      Differential Revision: https://reviews.llvm.org/D90951
      341f3c11
Loading