1. 16 Jan, 2020 1 commit
    • Amy Zhuang's avatar
      [MLIR] Use call back for MatMul. (#3838) · c737a573
      Amy Zhuang authored
      * [MLIR] Use call back for MatMul.
      
      * Use callback for Gemm.
      
      * Use mkldnn callback for Softmax.
      
      * Address PR feedback.
      
      * Fix merge errors.
      
      * Change to tail allocation struct.
      
      * Use mkldnn callback for AvgPool.
      
      * Add callbacks for AvgPoolBackprop, MaxPool, and MaxPoolBackprop.
      
      * Fix merge errors.
      
      * Use UnrankedMemRefType for callbacks.
      
      * Address PR feedback.
      
      * Cleanup.
      
      * Address PR feedback.
      
      * Fix a bug.
      
      * Use global variable to hold attributes.
      
      * Convert layout if needed for pooling.
      
      * Address PR feedback.
      
      * Add header.
      
      * Address PR feedback.
      
      * Update Copyright to 2017-2020.
      
      * Address PR feedback.
      Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
      c737a573
  2. 14 Jan, 2020 1 commit
    • Nagy Mostafa's avatar
      [MLIR] In-place memory optimization for elt-wise and concat ops. (#3832) · 6de4893b
      Nagy Mostafa authored
      * AliasMap WIP
      
      * Added liveness info
      
      * WIP
      
      * WIP: Tests
      
      * WIP: LIT tests
      
      * Added knobs for mem optimization pass. More LIT tests
      
      * Revert affine_lowerer change
      
      * More elaborate comment
      
      * Minor fixes
      
      * style-apply
      
      * Rename liveness
      
      * Switch to Analysis framework
      
      * Fix optimization conditions
      
      * Remove LIT test
      
      * style
      
      * Switch to equivalence relationship impl of non-alias relationship
      
      * refined comment
      
      * Switch non-alias to equivalence relationship
      
      * Fix bad merge
      
      * Adding tests. WIP
      
      * Added buffer size tracking and unit-tests
      
      * Added LIT and unit-tests
      
      * Turn optimization ON
      
      * style
      
      * fix unit-tests
      
      * Fix useCount
      
      * Fix copyright and typo
      
      * Refine few comments, remove new lines
      
      * style fix
      Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
      Co-authored-by: 's avatarSang Ik Lee <sang.ik.lee@intel.com>
      6de4893b
  3. 03 Jan, 2020 1 commit
    • Pruthvi's avatar
      [MLIR] Affine lowering support for Comparison Ops (#3872) · 9a01762a
      Pruthvi authored
      * Affine lowering support for
          1) GreaterEq
          2) LessEq
          3) Equal
          4) NotEqual
      
      * - cast result op from i1 to i8 for comparision operators
      
      * Addressed PR comments
      
      * Style fix
      
      * - style check
      - use select instead of zero_extendi durinng CompOp lowering
      
      * - fix style
      - use createOneConstant and createZeroConstant helpers in select intrinsic
      
      * Use NG_U8_TYPE_ID for BooleanType in ngraph dialect
      
      * Diable CE and Softmax unit test in MLIR
      
      * - LIT parser test for comparision ops
      
      * - Affine dailect LIT tests for Comparision Ops
      
      * Address PR feedback
      
      * fix typo
      
      * - use `cast` to deduce element Type
      - add more strict type checking to LIT Test
      
      * fix CHECK label's for comparision ops
      
      * Use UInt8 in verification logic for CMP op's
      
      * - use UInt8 for the resultOp verification Logic in CMP op
      - fix unit test failures
      9a01762a
  4. 01 Jan, 2020 1 commit
  5. 17 Dec, 2019 1 commit
    • Diego Caballero's avatar
      [MLIR] Improve lit test config files and tools (#4010) · 6e38579b
      Diego Caballero authored
      This PR fixes some of the inconveniences that we had with lit in nGraph
      and aligns configuration files with MLIR/LLVM.
      In particular:
        - `make install` is not needed to run lit test with the latest
          compiled version of testing tools (ngraph-opt).
        - LD_LIBRARY_PATH doesn't need to be modified.
      6e38579b
  6. 06 Dec, 2019 2 commits
  7. 27 Nov, 2019 2 commits
    • Nagy Mostafa's avatar
      [MLIR] Enable ViewOp in Affine Lowerer (#3911) · 96062512
      Nagy Mostafa authored
      * Map each ng tensor to a linear buffer and a view
      
      * fix comment
      
      * Create views only when a value is assigned a buffer id
      
      * style
      
      * Fix lit test
      96062512
    • Nagy Mostafa's avatar
      [MLIR] Fused Ops dialect declaration (#3860) · e5436889
      Nagy Mostafa authored
      * WIP
      
      * WIP
      
      * WIP
      
      * All ops
      
      * Fix layernorm backprop op name
      
      * WIP: Adding tests
      
      * WIP: Adding LIT parsing/printing tests
      
      * WIP
      
      * Added LSTM cells. Fixed some ops
      
      * All builder tests
      
      * PR fixes
      
      * Fix spacing. Add missing setter to SpaceToDepth
      
      * Update spaceToDepth lit test
      
      * PR fixes
      
      * Build fix
      
      * Another fix
      
      * Fixed optional args
      e5436889
  8. 18 Nov, 2019 1 commit
  9. 04 Nov, 2019 1 commit
    • Nagy Mostafa's avatar
      [MLIR] New Core Ops (V0) and Ops Versioning in NG dialect (#3764) · 8ef5b0ca
      Nagy Mostafa authored
      * Init commit to implement interface
      
      *  Add two op interfaces for v0 and v1. Add a unit-test
      
      * Add missing files
      
      * Move test to separate file
      
      * Add Fused Op interface
      
      * Missing files
      
      * style
      
      * fused ops
      
      * Remove V1 ops for now
      
      * Added enum attributes. WIP
      
      * Completed non-experiemntal non-fused-ops
      
      * Add ops_attributes
      
      * Minor fixes
      
      * Minor fixes
      
      * Added enum setting/reading test
      
      * style-apply
      
      * Added attributes tests
      
      * Fix dialect init
      
      * style
      
      * fix typo
      
      * Fix merge errors
      
      * Include file with MLIR on
      8ef5b0ca
  10. 10 Oct, 2019 1 commit
  11. 30 Sep, 2019 1 commit
    • Diego Caballero's avatar
      [MLIR] Improve gather op lowering (#3667) · 3aa4db1d
      Diego Caballero authored
      * [MLIR] Add support for parsing nGraph tensor type
      
      Initial commit that enables nGraph parsing. It's needed for testing.
      
      * [MLIR] Enable nGraph dialect in ngraph-opt
      
      This PR registers nGraph dialect in ngraph-opt and prepares
      nGraph lowering pass for LIT testing, fixing all the related issues.
      Among other things, lowering pass has to be turned into a function pass,
      dead argument in constructor was removed and `convert-ngraph-to-affine`
      flag was added.
      
      * Fix issue with function name and multiple functions
      
      * Extend module_function.mlir lit test
      
      * [MLIR] Add support for parsing nGraph element types
      
      It introduces initial support for parsing nGraph signed/unsigned
      integer and floating point data types.
      
      * [MLIR] Improve gather op lowering
      
      This PR interchanges indices and param loops in gather lowering so
      that a better memory access patter is generated. Fusion of gather
      with other ops is also observed with this change.
      3aa4db1d
  12. 28 Sep, 2019 1 commit
    • Diego Caballero's avatar
      [MLIR] Enable nGraph dialect in ngraph-opt (#3657) · 9db8f874
      Diego Caballero authored
      * [MLIR] Add support for parsing nGraph tensor type
      
      Initial commit that enables nGraph parsing. It's needed for testing.
      
      * [MLIR] Enable nGraph dialect in ngraph-opt
      
      This PR registers nGraph dialect in ngraph-opt and prepares
      nGraph lowering pass for LIT testing, fixing all the related issues.
      Among other things, lowering pass has to be turned into a function pass,
      dead argument in constructor was removed and `convert-ngraph-to-affine`
      flag was added.
      
      * Fix issue with function name and multiple functions
      
      * Extend module_function.mlir lit test
      
      * Improve module_function.mlir test
      
      Remove ngraph to affine dialect conversion since we just need to verify
      that we can parse and print modules and functions.
      Add verification for parsing the printed code.
      
      * [MLIR] Add support for parsing nGraph element types (#3665)
      
      * [MLIR] Add support for parsing nGraph element types
      
      It introduces initial support for parsing nGraph signed/unsigned
      integer and floating point data types.
      
      * Improve LIT tests
      
      Test parsing and printing of types separately from lowering to affine
      since these tests will evolve differently, particularly for tensor
      types.
      
      * Missed file
      
      I left this file behind in the previous commit
      9db8f874
  13. 27 Sep, 2019 2 commits
  14. 10 Sep, 2019 1 commit
    • Diego Caballero's avatar
      [MLIR] Introduce ngraph-opt tool (#3560) · f159e196
      Diego Caballero authored
      * [MLIR] Enable LIT testing in CMAKE
      
      This PR enables LIT testing in nGraph for MLIR Compiler, introduced in
      PR3523. We can now do `make check-mlir-lit` to run LIT tests.
      
      * Address feedback
      
      * Revisit PR after cmake clean-up
      
      * [MLIR] Introduce ngraph-opt tool
      
      To be used, among other things, for LIT testing.
      `elementwise_binary_ops.mlir` shows a simple LIT test
      using ngraph-opt.
      
      Dummy affine_lowering/lit_test.mlir test that served as initial testing
      of LIT tool configuration is now removed.
      
      * Address feedback
      f159e196
  15. 06 Sep, 2019 1 commit
    • Diego Caballero's avatar
      [MLIR] Enable LIT testing in CMAKE (#3524) · b5553d1a
      Diego Caballero authored
      * [MLIR] Enable LIT testing in CMAKE
      
      This PR enables LIT testing in nGraph for MLIR Compiler, introduced in
      PR3523. We can now do `make check-mlir-lit` to run LIT tests.
      
      * Address feedback
      
      * Revisit PR after cmake clean-up
      b5553d1a
  16. 28 Aug, 2019 1 commit
    • Diego Caballero's avatar
      [MLIR] Add config files for LIT testing (#3523) · d8fbe52b
      Diego Caballero authored
      * [MLIR] Add config files for LIT
      
      LIT is the LLVM testing tool that is used in LLVM and MLIR. It's
      necessary to enable all the MLIR testing in nGraph. This will provide
      a complementary finer grain level of testing than the one currently done
      with gtest. LIT will allow testing each MLIR-based nGraph transformation
      without having to run the whole nGraph pipeline. For example, we will be
      able to write an nGraph dialect input, invoke an single MLIR transformation
      on it and check that the output is the expected.
      
      This PR adds the basic configuration files to enable LIT tool
      in nGraph for MLIR Compiler. `affine_lowering/lit_test.mlir` is a
      dummy test to exercise the new testing feature. Lit testing will be
      enabled in CMAKE in a subsequent PR.
      
      * Address feedback
      d8fbe52b