1. 24 Nov, 2019 1 commit
  2. 01 Nov, 2019 1 commit
    • [NODE][REFACTOR] Rename IRFunctor->NodeFunctor, use func pointer (#4247) · 9a3d2ec9
      * [NODE][REFACTOR] Rename IRFunctor->NodeFunctor, use function pointer for dispatching.
      
      Previously we used std::function for the functor dispatching.
      It introduces additional overhead and problems during dll destruction(of std::function).
      
      This PR changes the std::function to function pointers.
      This change a bit restrictions around the set_dispatch that we can get around,
      but will improve the general efficiency by reducing one level of indirection in the std::function.
      We also no longer need special marcos to register functions to the Functor.
      Tianqi Chen committed
  3. 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
  4. 11 Oct, 2019 1 commit
  5. 29 Sep, 2019 1 commit
  6. 25 Sep, 2019 2 commits
    • [ARITH] Refactor to use explicit div/mod functions instead of operators. (#4000) · f0079a57
      * [ARITH] Use explicit div/mod functions instead of operators.
      
      * fix pooling case
      Tianqi Chen committed
    • Changes to make tensorize work. These changes also fix the previously broken test. (#3981) · b410df8c
      * Changes to make tensorize work. These changes also fix the previously
      broken test.
      
      Summary:
      Tensorize was breaking  for a few reasons.
      1)
      Assert at: src/op/tensorize.cc:234 CHECK(is_one(e.region[j]->extent))
      In some cases this cannot be proven, e.g.:
      expected shape=[16, 4], given region=[range(min=((ax1.outer*16)/16), ext=(((((ax1.outer*16) + 15)/16) + 1) - ax1.outer)), range(min=((k.outer*4)/4), ext=(((((k.outer*4) + 3)/4) + 1) - k.outer)), range(min=0, ext=16), range(min=0, ext=4)]
      The unprovable one is: ext=(((((ax1.outer*16) + 15)/16) + 1) - ax1.outer)).
      This can be simplified but it is not because to simplify divide, it must
      prove ax1.outer > 0 and since it is var it cannot. The fix for this to
      just find all the vars in expr in relace them with some const value.
      
      2) Equivalence between tensorized expr and one being asked to tensorize. For example,
      the error would be.
      TVMError: Check failed: Equal(lhs, rhs):
      Failed to match the compute with TensorIntrin tensor_intrin's declaration
      provided= reduce(combiner=comm_reducer(result=[(x + y)], lhs=[x], rhs=[y], identity_element=[(int16)0]), source=[(int16(data(k))*int16(kernel(((((((((k.outer.outer*64) + (k.outer.inner*2)) + k)/2)*128) + i) - (k.outer.inner*128)) - (k.outer.outer*4096)), ((((k.outer.outer*64) + (k.outer.inner*2)) + k) % 2))))], axis=[iter_var(k, range(min=0, ext=2))], where=(bool)1, value_index=0),
      intrin=  reduce(combiner=comm_reducer(result=[(x + y)], lhs=[x], rhs=[y], identity_element=[(int16)0]), source=[(int16(data(k))*int16(kernel(i, k)))], axis=[iter_var(k, range(min=0, ext=2))], where=(bool)1, value_index=0)
      Difference is mainly in the source part:
      source=[(int16(data(k))*int16(kernel(((((((((k.outer.outer*64) + (k.outer.inner*2)) + k)/2)*128) + i) - (k.outer.inner*128)) - (k.outer.outer*4096)), ((((k.outer.outer*64) + (k.outer.inner*2)) + k) % 2))))]
      source=[(int16(data(k))*int16(kernel(i, k)))], axis=[iter_var(k, range(min=0, ext=2))]
      This was not being simpifiled due to compute_intrin_iter_space (map for
      iter var to range) not containing leaf iter vars.
      
      3) Here it fails with:
      Check failed: is_one(Simplify(value->shape[i])): Argument b_buffer shape mismatch[16, 4] vs [(((((ax1.outer*16) + 15)/16) + 1) - ax1.outer), (((((k.outer*4) + 3)/4) + 1) - k.outer), 16, 4]
      This is in buffer binding where it thinks expected and buffer bound
      shape is different. Although if we could simplify expr, this would not
      be the case.
      
      Test Plan:
      On skylake avx512 machine:
      python tests/python/contrib/test_gemm_acc16.py
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Implemented bounded analyzer which traverses tree and for reduce/for
      statements binds the bound of the analyzer. Later this is used to
      simplify expressions. Inspired from ir_mutator_with_analyzer
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Addressed comments.
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Added ASF header + define macro for the header file: TVM_ARITHMETIC_IR_VISITOR_WITH_ANALYZER_H_
      Some lint fixes as well.
      
      * Relax the assumption that dom_map must always contain all leaf itervars.
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Disable copy constructor and move to raw ptr.
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      Kimish Patel committed
  7. 01 Sep, 2019 1 commit
  8. 12 Aug, 2019 2 commits
  9. 14 Jul, 2019 1 commit
  10. 11 Jul, 2019 1 commit
  11. 01 Jul, 2019 1 commit
  12. 22 Jun, 2019 1 commit
  13. 22 May, 2019 1 commit
  14. 08 Apr, 2019 1 commit
    • [HEADER] Add Header to Comply with ASF Release Policy (#2982) · cffb4fba
      * [HEADER] ASF header dir=include
      
      * [HEADER] ASF Header dir=src
      
      * [HEADER] ASF Header -dir=python
      
      * [HEADER] ASF header dir=topi
      
      * [HEADER] ASF Header dir=nnvm
      
      * [HEADER] ASF Header -dir=tutorials
      
      * [HEADER] ASF Header dir=tests
      
      * [HEADER] ASF Header -dir=docker
      
      * fix whitespace
      
      * [HEADER] ASF Header -dir=jvm
      
      * [HEADER] ASF Header -dir=web
      
      * [HEADER] ASF Header --dir=apps
      
      * [HEADER] ASF Header --dir=vta
      
      * [HEADER] ASF Header -dir=go
      
      * temp
      
      * [HEADER] ASF Header --dir=rust
      
      * [HEADER] Add ASF Header --dir=cmake
      
      * [HEADER] ASF Header --dir=docs
      
      * [HEADER] Header for Jenkinsfile
      
      * [HEADER] ASF Header to toml and md
      
      * [HEADER] ASF Header to gradle
      
      * Finalize rat cleanup
      
      * Fix permission
      
      * Fix java test
      
      * temporary remove nnvm onnx test
      Tianqi Chen committed
  15. 12 Mar, 2019 1 commit
  16. 03 Mar, 2019 1 commit
  17. 01 Mar, 2019 1 commit
  18. 13 Feb, 2019 1 commit
    • [Hybrid script] Backend support (#2477) · c53dd102
      * a preliminary version is done?
      
      * we no longer need the redundant hybrid/api.py
      
      * support assert stmt
      
      * cast supported
      
      * intrin -> runtime; util is mainly in charge of compilation time
      
      * assert statement
      
      * fix python lint
      
      * fix cpp lint
      
      * on the way to module
      
      * rollback .cc
      
      * fix typo, no direct expose then
      
      * @vinx13 ceil is added i guess?
      
      * wip...
      
      * temp commit
      
      * fix import
      
      * i preliminary version is done?
      
      * on the way to build hybrid module
      
      * nearly fixed...
      
      * dumped python are equiv as original python
      
      * on the way to bootstrap
      
      * cpu bootstrap done
      
      * bootstrap!
      
      * fix lint
      
      * fix doc
      
      * resolve some review concerns
      
      * support load/save
      
      * fix lint
      
      * thanks to xqdan fixed my typo
      
      * fix build, make dump non-optional
      
      * add vthread
      
      * jesus why i added this
      Jian Weng committed
  19. 06 Feb, 2019 1 commit
  20. 03 Feb, 2019 1 commit
  21. 15 Jan, 2019 1 commit
    • [Hybrid Script] Supporting scheduling hybrid script (#2416) · ac54577f
      * on the way to enable hybrid schedule
      
      * I think I am done with imperfect loop split?
      
      * copyright watermark
      
      * loop annotation
      
      * fix lint
      
      * fix lint 1
      
      * shit!
      
      * loop reorder supported
      
      * support bind to add some tests
      
      * fused tested
      
      * imperfect loop testcase
      
      * fix lint
      
      * add bind testcase
      
      * fix doc
      
      * fix online edit typo
      
      * resolve @mercymercy review
      
      * fix indent
      
      * i should convince myself it is not flaky test first
      
      * fix test hybrid
      
      * how many flaky test are you expecting; i ball ball u to let me pass
      
      * rebase halide...
      Jian Weng committed
  22. 01 Dec, 2018 1 commit
  23. 19 Nov, 2018 1 commit
  24. 06 Oct, 2018 1 commit
  25. 04 Oct, 2018 1 commit
  26. 25 Sep, 2018 1 commit
  27. 20 Sep, 2018 1 commit
  28. 23 Aug, 2018 1 commit
  29. 17 Jun, 2018 1 commit
  30. 16 Apr, 2018 1 commit
  31. 28 Mar, 2018 1 commit
  32. 16 Mar, 2018 1 commit
  33. 06 Feb, 2018 1 commit
  34. 08 Jan, 2018 1 commit
  35. 27 Dec, 2017 1 commit
  36. 22 Dec, 2017 1 commit
  37. 17 Dec, 2017 1 commit
  38. 30 Nov, 2017 1 commit