1. 23 Mar, 2020 1 commit
  2. 12 Mar, 2020 2 commits
    • [REFACTOR] Streamline Function Attr interface. (#5045) · ec86d7f1
      * [REFACTOR] Streamline Function Attr interface.
      
      There has been quite a few recent changes that depends heavily on
      the function attr interface. This PR streamlines that interface by introducing
      two APIs that covers most of the usages.
      
      - GetAttr which gets a typed object for a given key
        - HasNonzeroAttr is a quick helper that calls GetAttr to quickly check an attribute
      - WithAttr that creates a new function object with the given attr
        - The API comes with copy on write optimization to avoid multiple copies
        - We deliberately pick the prefix With(instead of Set) to indicate this
          function does not mutate the original input.
      
      On the python side:
      - We allow read access via func.attrs (which is a DictAttr)
      - func.with_attrs to create a new instance with updated attrs.
      
      We also get rid of the small wrapper functions and make sure the API centered around
      the GetAttr and HasNonzeroAttr interface.
      
      This PR also changes the function construction to follow the new convention.
      
      * Address review comments
      
      * Address review comments
      
      * Fix doxygen path
      Tianqi Chen committed
    • [refactor][relay pass] Separate analysis and transform passes (#5035) · 14ba49c6
      * [refactor][relay pass] Separate analysis and transform passes into different subfolders
      
      * remove pass folder
      Zhi committed
  3. 04 Feb, 2020 1 commit
  4. 20 Jan, 2020 1 commit
  5. 18 Jan, 2020 1 commit
  6. 17 Jan, 2020 1 commit
    • [REFACTOR] Polish runtime (#4729) · b171cf1d
      - Remove operator bool from base object ref macro
        - Raitionale: operator bool can be dangerous for sub-classes
          that also overloads other operators(e.g. ==).
        - If bool is still needed, use explicit operator bool.
      - Use absolute include when necessary
      - Move type related util to data_type
      - Isolate stackvm code from compiler
      Tianqi Chen committed
  7. 14 Jan, 2020 1 commit
  8. 11 Jan, 2020 2 commits
  9. 04 Jan, 2020 1 commit
    • [REFACTOR] TVM_REGISTER_API -> TVM_REGISTER_GLOBAL (#4621) · 81523604
      TVM_REGSISTER_API is an alias of TVM_REGISTER_GLOBAL.
      In the spirit of simplify redirections, this PR removes
      the original TVM_REGISTER_API macro and directly use TVM_REGISTER_GLOBAL.
      
      This type of refactor will also simplify the IDE navigation tools
      such as FFI navigator to provide better code reading experiences.
      
      Move EnvFunc's definition to node.
      Tianqi Chen committed
  10. 31 Dec, 2019 2 commits
  11. 22 Dec, 2019 1 commit
    • [REFACTOR][DTYPE] Isolate dtype to runtime (#4560) · 7fa8aab5
      dtype.h -> runtime/data_type.h
      
      Changes:
      - Rename all old reference of tvm::Type to DataType
      - ExprNode.type -> ExprNode.dtype
      - Expr.type() -> Expr.dtype()
      - Change Expr related functions to expr_operator.
        - DataType::min() -> min_value(DataType)
        - DataType::max() -> max_value(DataType)
      - Move type constructor Int, UInt, Float, Handle, Bool into DataType.
        - Int(bits) -> DataType::Int(bits)
        - UInt(bits) -> DataType::UInt(bits)
      Tianqi Chen committed
  12. 21 Oct, 2019 1 commit
    • [REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol. (#4161) · 7895adb2
      * [REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol.
      
      This PR removes the original node system, and make node as a subclass of Object.
      This is a major refactor towards a better unified runtime object system.
      
      List of changes in the refactor:
      
      - We now hide data_ field, use Downcast explicitly to get a sub-class object.
      - Removed the node system FFI in python.
      - Removed the node C API, instead use PackedFunc for list and get attrs.
      - Change relay::Op::set_attr_type_key(attr_key_name) to relay::Op::set_attr_type<AttrType>().
        - This change was necessary because of the new Object registration mechanism.
        - Subsequent changes to the op registrations
        - The change revealed a few previous problems that is now fixed.
      - Patched up a few missing node type registration.
        - Now we will raise an error if we register object that is not registered.
      - The original node.h and container.h are kept in the same location.
      - Calling convention: kObjectHandle now equals the old kNodeHandle, kNodeHandle is removed.
      - IRFunctor now dispatches on ObjectRef.
      - Update to the new type checking API: is_type, derived_from are replaced by IsInstance.
      - Removed .hash member function, instead use C++ convention hasher functors.
      
      * Address review comments
      Tianqi Chen committed
  13. 05 Sep, 2019 1 commit
  14. 11 Aug, 2019 1 commit
  15. 05 Aug, 2019 1 commit
  16. 02 Aug, 2019 1 commit
  17. 01 Aug, 2019 1 commit
    • [Relay] Strict mode in pattern matching (#3620) · 331585f4
      * add fatal
      
      lint
      
      lint
      
      lint
      
      do
      
      make completeness check an error
      
      lint
      
      remove fatal
      
      * fix test
      
      * reset parser file
      
      * remove unneeded import
      
      * Update python/tvm/relay/adt.py
      
      Co-Authored-By: Steven S. Lyubomirsky <slyubomirsky@gmail.com>
      
      * Update include/tvm/relay/adt.h
      
      Co-Authored-By: Steven S. Lyubomirsky <slyubomirsky@gmail.com>
      
      * Eliminate trailing whitespace (my fault)
      雾雨魔理沙 committed
  18. 06 Jul, 2019 1 commit
  19. 04 Jul, 2019 1 commit
  20. 03 Jul, 2019 1 commit
    • [Relay] Continuation Passing Style (#3456) · d1eb1229
      * save
      
      add
      
      me find type checker problem
      
      save
      
      save
      
      lint
      
      do
      
      lint
      
      reset ti
      
      add some doc
      
      add failed test case
      
      add recursion for cps
      
      add recursion for cps
      
      fix pytest
      
      lint
      
      save
      
      fix test error
      
      lint
      
      save
      
      fix error
      
      * fix rebase
      
      * fix
      
      * fix test
      
      * lint
      
      * lint
      
      * restore rewriteannotationops
      
      * do
      雾雨魔理沙 committed
  21. 02 Jul, 2019 1 commit
  22. 01 Jul, 2019 1 commit
  23. 28 Jun, 2019 1 commit
  24. 20 Jun, 2019 1 commit
  25. 15 Jun, 2019 1 commit
    • save (#3033) · df88c411
      save
      
      save
      
      save
      
      upstream
      
      lint
      
      remove bad changes
      
      fix build
      
      save
      
      save
      
      please the ci god
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: Wei Chen <ipondering.weic@gmail.com>
      
      save
      
      fix test
      
      ci is ANGRY
      
      fix rebase problem
      
      fix rebase
      
      add test
      
      save
      
      save
      
      comment
      雾雨魔理沙 committed
  26. 03 Jun, 2019 1 commit
  27. 24 May, 2019 2 commits
  28. 09 May, 2019 1 commit
    • [Relay][Runtime] Implementation of Relay VM (#2889) · 4332b0aa
      * Implement the virtual machine
      
      Co-Authored-By: wweic <ipondering.weic@gmail.com>
      
      * Fix rebase build issues
      
      * Reorganize vm.py and fix allocator bug
      
      * Remove compiler
      
      * Remove tests
      
      * Remove backend/vm/vm.cc too
      
      * Fix docs
      
      * Fix doc
      
      * Fix doc
      
      * Add vm docs
      
      * Remove change to dead_code.cc
      
      * Remove Relay logging
      
      * Remove reduce
      
      * Update include/tvm/runtime/vm.h
      
      Co-Authored-By: jroesch <roeschinc@gmail.com>
      
      * Reformat
      
      * Update include/tvm/runtime/vm.h
      
      Co-Authored-By: jroesch <roeschinc@gmail.com>
      
      * Address feedback
      
      * Update include/tvm/runtime/vm.h
      
      Co-Authored-By: jroesch <roeschinc@gmail.com>
      
      * Apply suggestions from code review
      
      Co-Authored-By: jroesch <roeschinc@gmail.com>
      
      * Fix a couple outstanding comments
      
      * Last couple comments
      
      * Update include/tvm/runtime/vm.h
      
      Co-Authored-By: jroesch <roeschinc@gmail.com>
      
      * Address code review feedback
      
      * Fix final comment
      
      * Address comments
      
      * Error reporting and example
      
      * add Const
      
      * Explicitly delete copy assignment operator
      
      * Fix rebase
      
      * Pass 3rd arg to fusion
      Jared Roesch committed
  29. 09 Apr, 2019 1 commit
    • add document (#2714) · bb87f044
      lint
      
      lint
      
      save
      
      save
      
      add more case
      
      save
      
      error
      
      lint
      
      lint
      
      commit
      
      do
      
      lint
      
      save
      
      fix lint
      
      wrap it back as func
      
      lint
      
      save
      
      remove dead comment
      
      fix style
      
      fix lint
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      address review feedback
      
      pe now handle freevar. as a result preserving function is now trivial.
      
      test
      
      add basic test, implement pretty printing for generic function
      
      test
      
      lint
      
      fix segfault
      
      save
      
      save
      
      do
      
      test
      
      fix another error
      
      address comment
      
      commit
      
      save
      
      address review feedback
      
      add test for invalidate, fix error in lookup
      
      rename cont to boduy
      
      fix error and add regression test
      
      fix error, add test case
      
      Update src/relay/pass/partial_eval.cc
      
      Co-Authored-By: MarisaKirisame <lolisa@marisa.moe>
      
      fix lint
      
      remove extra line
      
      save
      
      save
      雾雨魔理沙 committed