1. 30 Dec, 2019 3 commits
    • [REFACTOR][RUNTIME] Update NDArray use the Unified Object System (#4581) · 55bd786f
      * [REFACTOR][RUNTIME] Move NDArray to Object System.
      
      Previously NDArray has its own object reference counting mechanism.
      This PR migrates NDArray to the unified object protocol.
      
      The calling convention of NDArray remained intact.
      That means NDArray still has its own type_code and
      its handle is still DLTensor compatible.
      
      In order to do so, this PR added a few minimum runtime type
      detection in TVMArgValue and RetValue only when the corresponding
      type is a base type(ObjectRef) that could also refer to NDArray.
      
      This means that even if we return a base reference object ObjectRef
      which refers to the NDArray. The type_code will still be translated
      correctly as kNDArrayContainer.
      If we assign a non-base type(say Expr) that we know is not compatible
      with NDArray during compile time, no runtime type detection will be performed.
      
      This PR also adopts the object protocol for NDArray sub-classing and
      removed the legacy NDArray subclass protocol.
      Examples in apps/extension are now updated to reflect that.
      
      Making NDArray as an Object brings all the benefits of the object system.
      For example, we can now use the Array container to store NDArrays.
      
      * Address review comments
      Tianqi Chen committed
    • fix codegenc (#4597) · 4072396e
      Zhi committed
  2. 29 Dec, 2019 2 commits
  3. 28 Dec, 2019 2 commits
  4. 27 Dec, 2019 4 commits
  5. 26 Dec, 2019 7 commits
  6. 25 Dec, 2019 2 commits
    • Some Windows and MSVC fixes (#4569) · 949c4d27
      * fix python exception creation in Windows
      
      * better string conversion for msvc
      
      * fix cpp style issue
      kice committed
    • [RUNTIME] Remove Extension VTable in favor of Unified Object system. (#4578) · e91cc5ab
      Before the unified object protocol, we support pass
      additional extension objects around by declaring a type as an extension type.
      The old extension mechanism requires the types to register their
      constructor and deleter to a VTable and does not enjoy the benefit of the
      self-contained deletion property of the new Object system.
      
      This PR upgrades the extension example to make use of the new object system
      and removed the old Extension VTable.
      
      Note that the register_extension funtion in the python side continues to work
      when the passed argument does not require explicit container copy/deletion,
      which covers the current usecases of the extension mechanism.
      Tianqi Chen committed
  7. 24 Dec, 2019 3 commits
  8. 23 Dec, 2019 6 commits
  9. 22 Dec, 2019 6 commits
  10. 21 Dec, 2019 1 commit
  11. 20 Dec, 2019 4 commits