1. Dec 24, 2019
    • River Riddle's avatar
      Change the `notifyRootUpdated` API to be transaction based. · 5d5bd2e1
      River Riddle authored
      This means that in-place, or root, updates need to use explicit calls to `startRootUpdate`, `finalizeRootUpdate`, and `cancelRootUpdate`. The major benefit of this change is that it enables in-place updates in DialectConversion, which simplifies the FuncOp pattern for example. The major downside to this is that the cases that *may* modify an operation in-place will need an explicit cancel on the failure branches(assuming that they started an update before attempting the transformation).
      
      PiperOrigin-RevId: 286933674
      5d5bd2e1
    • Lei Zhang's avatar
      Update SPIR-V.md · a5d5d291
      Lei Zhang authored
      This CL updates SPIR-V.md to reflect recent developments
      in the SPIR-V dialect and its conversions.
      
      Along the way, also updates the doc for define_inst.sh.
      
      PiperOrigin-RevId: 286933546
      a5d5d291
    • River Riddle's avatar
      Resubmit: ReImplement the Value classes as value-typed objects wrapping an... · ab46543c
      River Riddle authored
      Resubmit: ReImplement the Value classes as value-typed objects wrapping an internal pointer storage.
      
      This will enable future commits to reimplement the internal implementation of OpResult without needing to change all of the existing users. This is part of a chain of commits optimizing the size of operation results.
      
      PiperOrigin-RevId: 286930047
      ab46543c
    • MLIR Team's avatar
      Automated rollback of commit f603a501 · 268365ab
      MLIR Team authored
      PiperOrigin-RevId: 286924059
      268365ab
    • River Riddle's avatar
      ReImplement the Value classes as value-typed objects wrapping an internal pointer storage. · f603a501
      River Riddle authored
      This will enable future commits to reimplement the internal implementation of OpResult without needing to change all of the existing users. This is part of a chain of commits optimizing the size of operation results.
      
      PiperOrigin-RevId: 286919966
      f603a501
    • Mehdi Amini's avatar
      Adjust License.txt file to use the LLVM license · 56222a06
      Mehdi Amini authored
      PiperOrigin-RevId: 286906740
      56222a06
  2. Dec 23, 2019
    • River Riddle's avatar
      NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to... · 35807bc4
      River Riddle authored
      NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to Value being value-typed.
      
      This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ
      
      This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics.
      
      PiperOrigin-RevId: 286844725
      35807bc4
    • Manuel Freiberger's avatar
      Add integer bit-shift operations to the standard dialect. · 22954a0e
      Manuel Freiberger authored
      Rename the 'shlis' operation in the standard dialect to 'shift_left'. Add tests
      for this operation (these have been missing so far) and add a lowering to the
      'shl' operation in the LLVM dialect.
      
      Add also 'shift_right_signed' (lowered to LLVM's 'ashr') and 'shift_right_unsigned'
      (lowered to 'lshr').
      
      The original plan was to name these operations 'shift.left', 'shift.right.signed'
      and 'shift.right.unsigned'. This works if the operations are prefixed with 'std.'
      in MLIR assembly. Unfortunately during import the short form is ambigous with
      operations from a hypothetical 'shift' dialect. The best solution seems to omit
      dots in standard operations for now.
      
      Closes tensorflow/mlir#226
      
      PiperOrigin-RevId: 286803388
      22954a0e
  3. Dec 22, 2019
    • Alex Zinenko's avatar
      Make Type and Attribute classes trivially copyable · dcc14f08
      Alex Zinenko authored
      This requires using explicitly default copy constructor and copy assignment
      operator instead of hand-rolled ones. These classes are indeed cheap to copy
      since they are wrappers around a pointer to the implementation. This change
      makes sure templated code can use standard type traits to understand that
      copying such objects is cheap and appeases analysis tools such as clang-tidy.
      
      PiperOrigin-RevId: 286725565
      dcc14f08
  4. Dec 21, 2019
  5. Dec 20, 2019
    • Christian Sigg's avatar
      Add gpu.shuffle op. · 42d46b4e
      Christian Sigg authored
      This will allow us to lower most of gpu.all_reduce (when all_reduce
      doesn't exist in the target dialect) within the GPU dialect, and only do
      target-specific lowering for the shuffle op.
      
      PiperOrigin-RevId: 286548256
      42d46b4e
    • Frank Laub's avatar
      Allow dialect to create friendly names for region arguments · 7811ad3c
      Frank Laub authored
      This is the block argument equivalent of the existing `getAsmResultNames` hook.
      
      Closes tensorflow/mlir#329
      
      COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/329 from plaidml:flaub-region-arg-names fc7876f2d1335024e441083cd25263fd6247eb7d
      PiperOrigin-RevId: 286523299
      7811ad3c
    • Jacques Pienaar's avatar
      Unique trait list during ODS Operator trait construction · b6d54a1b
      Jacques Pienaar authored
      Concatting lists in TableGen is easy, creating unique lists less so. There is no reason for duplicated op traits so we could throw an error instead but duplicates could occur due to concatting different list of traits in ODS (e.g., for convenience reasons), so just dedup them during Operator trait construction instead.
      
      PiperOrigin-RevId: 286488423
      b6d54a1b
    • Andy Davis's avatar
      [VectorOps] Update vector transfer_read/write ops to operatate on memrefs with vector element type. · 8020ad3e
      Andy Davis authored
      Update vector transfer_read/write ops to operatate on memrefs with vector element type.
      This handle cases where the memref vector element type represents the minimal memory transfer unit (or multiple of the minimal memory transfer unit).
      
      PiperOrigin-RevId: 286482115
      8020ad3e
    • Nicolas Vasilache's avatar
      Restructure and update Linalg ODS and documentation - NFC · 66852822
      Nicolas Vasilache authored
      This CL allows specifying an additional name for specifying the .td file that is used to generate the doc for a dialect. This is necessary for a dialect like Linalg which has different "types" of ops that are used in different contexts.
      
      This CL also restructures the Linalg documentation and renames LinalgLibraryOps -> LinalgStructuredOps but is otherwise NFC.
      
      PiperOrigin-RevId: 286450414
      66852822
    • Andy Davis's avatar
      [VectorOps] Add vector ReshapeOp to the VectorOps dialect. · 1d798b1d
      Andy Davis authored
      Adds vector ReshapeOp to the VectorOps dialect. An aggregate vector reshape operation, which aggregates multiple hardware vectors, can enable optimizations during decomposition (e.g. loading one input hardware vector and performing multiple rotate and scatter store operations to the vector output).
      
      PiperOrigin-RevId: 286440658
      1d798b1d
    • Alex Zinenko's avatar
      LLVMFuncOp: implement addEntryBlock · 1bcd8ef3
      Alex Zinenko authored
      This function has been declared as a part of the LLVMFuncOp interface but never
      implemented.
      
      Closes tensorflow/mlir#325.
      
      PiperOrigin-RevId: 286439619
      1bcd8ef3
    • Aart Bik's avatar
      [VectorOps] minor cleanup: vector dialect "subscripts" are i32 · 15f800f4
      Aart Bik authored
      Introduces some centralized methods to move towards
      consistent use of i32 as vector subscripts.
      
      Note: sizes/strides/offsets attributes are still i64
      PiperOrigin-RevId: 286434133
      15f800f4
    • Alex Zinenko's avatar
      Detemplatize ModuleTranslation::lookupValues · efadb6b8
      Alex Zinenko authored
      This function template has been introduced in the early days of MLIR to work
      around the absence of common type for ranges of values (operands, block
      argumeents, vectors, etc). Core IR now provides ValueRange for exactly this
      purpose. Use it instead of the template parameter.
      
      PiperOrigin-RevId: 286431338
      efadb6b8
  6. Dec 19, 2019
  7. Dec 18, 2019