1. 03 Jan, 2020 5 commits
    • [Quantization] Make calibration faster and more memory usage friendly (#4589) · 2440c9ce
      * Use memory efficient calibrate
      
      * Fixed indexing
      
      * add cpp kl stub
      
      * ported KL cpp from mxnet
      
      * Fixed std::distance arguments order
      
      * remove python implementation
      
      * fix lint and indent
      
      * fix indent
      
      * refactoring
      
      * fix lint
      
      * fix for i386
      masahi committed
    • [TOPI, Relay] Add half_pixel option to Resize op (#4610) · e8a2c9b3
      * add onnx resize converter
      
      * update frontends
      
      * updating topi
      
      * adding onnx resize tests
      
      * fixed NHWC test by casting size dtype to int32
      
      * fix tests
      
      * fix lint
      
      * update existing test cases
      
      * fix tensorflow frontend
      
      * fix lint
      
      * remove NHWC stuff
      
      * update topi resize test for half_pixel
      
      * update doc
      
      * fix doc
      
      * remove onnx resize bits
      masahi committed
    • [REFACTOR] Migrate Low-level IR Passes into the New Stmt/Expr Mutator (#4607) · 203ca7a0
      * CombineContextCall
      
      * Migrate BoundChecker
      
      * Migrate CoprocSync
      
      * Migrate detect_device
      
      * Migrate loop_partition
      
      * Migrate infer_fragement
      
      * Migrate inject_copy_intrin
      
      * Migrate inject double buffer
      
      * Migrate lower_intrin and simplify
      
      * Migrate storage flatten
      
      * Migrate inject prefetch
      
      * Migrate inject_virtual_thread
      
      * migrate inline
      
      * Migrate lift attr scope
      
      * Migrate custom datatypes
      
      * migrate lower_thread_all_reduce
      
      * Migrate lower_tvm_builtin
      
      * migrate lower_warp memory
      
      * Migrate make_api.cc
      
      * Migrate remap_thread_axis
      
      * Migrate remove_no_op
      
      * migrate rewrite_unsafe_select
      
      * Migrate skip_assert simple_passes
      
      * Migrate split_host_device
      
      * Migrate ssa
      
      * Migrate storage_access
      
      * Migrate storage_rewrite
      
      * Migrate tensor_core
      
      * Migrate unroll_loop
      
      * Migrate vectorize
      
      * Migrate verify compact_buffer gpu_code
      
      * Migrate verify_memory
      
      * Migrate storage_sync
      
      * Remove unused refs to mutator
      
      * Migrate hybrid_op
      
      * Migrate tensorize
      
      * Migrate schedule ops
      
      * Migrate schedule_dataflow_rewrite
      
      * Migrate auto_inline_elemwise
      
      * Remove unecessary ref to visitor
      
      * remove unecessary ref
      
      * Migrate bound_deducer
      
      * Migrate domain_touched
      
      * Migrate autotvm feature touch extractor
      
      * Add annotations
      Tianqi Chen committed
  2. 02 Jan, 2020 2 commits
    • [IR] Unify approach to Visitor/Mutator under Functor (#4606) · 983eba88
      IRMutator and IRVisitor were the main data structures for doing low level IR visiting.
      As the project evolves, we start to introduce more powerful variants such as StmtFunctor and ExprFunctor.
      This PR brings new classes that allows us to migrate the visitor mutator to be sub-class of these functors.
      
      List of changes:
      
      - Create separate class for ExprMutator and StmtMutator, following convention used in relay.
      - Introduce copy-on-write to StmtMutator that can later benefit the statement mutations
        if we use move semantics and keep a single copy of stmt.
      - Move two generic visit mutate util to use the new classes.
      
      We will send followup PRs to migrate the existing passes that use the legacy visitors
      to the new one.
      Tianqi Chen committed
  3. 01 Jan, 2020 2 commits
  4. 31 Dec, 2019 3 commits
  5. 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
  6. 29 Dec, 2019 2 commits
  7. 28 Dec, 2019 2 commits
  8. 27 Dec, 2019 4 commits
  9. 26 Dec, 2019 7 commits
  10. 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
  11. 24 Dec, 2019 3 commits
  12. 23 Dec, 2019 5 commits