1. 22 Apr, 2020 1 commit
  2. 21 Apr, 2020 3 commits
  3. 20 Apr, 2020 1 commit
    • [TIR][REFACTOR] RewriteForTensorCore -> te/schedule (#5379) · 4c0a53dc
      * [TIR][REFACTIR] RewriteForTensorCore -> te/schedule
      
      RewriteForTensor depends on the schedule information, which makes it differ
      from a typical pass(which should get all the information from the input TIR).
      
      As a result, we refactor it as a SchedulePostProc step for now.
      We should revisit it later as we introduce more support for tensor core patterns in the TIR.
      
      * Fix VTA to fit the new IR Pattern
      Tianqi Chen committed
  4. 19 Apr, 2020 2 commits
    • [TIR][REFACTOR] Remove te::Tensor dependencies from TIR passes. (#5372) · c3511c5e
      * [TIR][REFACTOR] Remove te::Tensor dependencies from TIR passes.
      
      te::Tensor is an useful object for tensor expression, but brings
      un-necessary reverse dependency in TIR nodes such as Provide and Realize.
      
      This PR is a first step to remove this dependency. We will use Buffer in all the places
      where the te::Tensor was used. The rough correspondence are:
      
      - Provide -> BufferStore
      - Realize -> BufferRealize
      - HalideCall -> BufferLoad.
      
      After this change, we can not use IRModule of PrimFuncs cleanly to represent TIR
      at any point of the optimizations. Buffer will serve as the abstraction for the TIR data
      models to represent the intermediate storages and their constraints.
      
      We still keep Realize/HalideCall and Provide as TIR nodes for now to make the change minimum.
      Right after ScheduleOps, we call SchedulePostProcToPrimFunc to canonicalize the temporary IR
      generated by TE(which contains these nodes) to the TIR.
      
      The TIR optimizations are now mostly migrated to to the pass manager.
      Followup PRs are needed to migrate the remaining few passes.
      
      * Fix dev tutorial
      Tianqi Chen committed
    • [TIR] Fix lower_warp_memory when there are >1 warp buffers (#5368) · a2d6fe65
      * fix recursion in lower_warp_memory
      
      * post-order mutation
      Tang, Shizhi committed
  5. 18 Apr, 2020 1 commit
  6. 17 Apr, 2020 1 commit
  7. 15 Apr, 2020 2 commits
  8. 14 Apr, 2020 1 commit
    • [TIR] Refactor MakePackedAPI to target dependent stage. (#5326) · f08d5d78
      Previously MakePackedAPI was in the target independent stage,
      but never the less requires the device_type information that will be
      binded at a later target dependent stage.
      
      The previous implementation was due to the limitation of LoweredFunc
      which can not carry buffer_map info(so they have to be lowered right away).
      This is no longer the case after the unified IR refactor.
      
      This PR migrates MakePackedAPI to a target dependent stage
      and removes the un-necessary BindDevice pass.
      Tianqi Chen committed
  9. 13 Apr, 2020 1 commit
    • [RUNTIME][IR] Allow non-nullable ObjectRef, introduce Optional<T>. (#5314) · fc75de9d
      * [RUNTIME] Allow non-nullable ObjectRef, introduce Optional<T>.
      
      We use ObjectRef and their sub-classes extensively throughout our codebase.
      Each of ObjectRef's sub-classes are nullable, which means they can hold nullptr
      as their values.
      
      While in some places we need nullptr as an alternative value. The implicit support
      for nullptr in all ObjectRef creates additional burdens for the developer
      to explicitly check defined in many places of the codebase.
      
      Moreover, it is unclear from the API's intentional point of view whether
      we want a nullable object or not-null version(many cases we want the later).
      
      Borrowing existing wisdoms from languages like Rust. We propose to
      introduce non-nullable ObjectRef, and Optional<T> container that
      represents a nullable variant.
      
      To keep backward compatiblity, we will start by allowing most ObjectRef to be nullable.
      However, we should start to use Optional<T> as the type in places where
      we know nullable is a requirement. Gradually, we will move most of the ObjectRef
      to be non-nullable and use Optional<T> in the nullable cases.
      
      Such explicitness in typing can help reduce the potential problems
      in our codebase overall.
      
      Changes in this PR:
      - Introduce _type_is_nullable attribute to ObjectRef
      - Introduce Optional<T>
      - Change String to be non-nullable.
      - Change the API of function->GetAttr to return Optional<T>
      
      * Address review comments
      
      * Upgrade all compiler flags to c++14
      
      * Update as per review comment
      Tianqi Chen committed
  10. 12 Apr, 2020 2 commits
  11. 10 Apr, 2020 1 commit
  12. 06 Apr, 2020 1 commit
  13. 05 Apr, 2020 1 commit
  14. 03 Apr, 2020 1 commit
  15. 02 Apr, 2020 4 commits
  16. 01 Apr, 2020 1 commit
  17. 30 Mar, 2020 1 commit
  18. 28 Mar, 2020 1 commit
    • [NODE][IR] Introduce StructuralEqual Infra for the unified IR. (#5154) · 997a14ed
      * [NODE][IR] Introduce StructuralEqual Infra for the Unified IR.
      
      This PR introduces a new way to handle structural equality
      for both TIR and relay nodes in an extensive way.
      
      - Each object can now register an optional SEqualReduce function, which
        describes how to reduce its structural equality to another instance
        into equality of the children.
      - Optionally, the object can choose to allow remapping of vars(e.g. function parameters)
        by calling DefEqual
      - We implemented a non-recursive structural equality checker that
        recursively traverses the objects and does the structural equality checking.
      
      This PR also fixes a few potential problems in previous relay's AlphaEqual.
      
      - In particular, the new structural equality relation will be communicative.
      - It is can be dangerous to use same_as relation to quickly check equality,
        demonstrated by the following case. (%x, %y) are shared vars between two functions.
      
      - function0: fn (%x, %y) { %x + %y }
      - function1: fn (%y, %x) { %x + %y }
      
      The new structural equal is intented to supersede AlphaEqual and AttrsEqual.
      
      Follow-up PRs should be performed to redirect the existing usages, and removes
      the corresponding implementation.
      
      * Update the rule to distinguish between graph node and non-graph nodes.
      
      * Refactor the test cases to use structural equal.
      
      * address comments
      
      * Mark more relay::Expr as graph node, fix a testcase issue(was bug that was not caught by previous alpha equal)
      
      * Remove unrelated comment
      
      * Fix file comment
      
      * Address review comment
      
      * Relax condition to fit flaky case
      Tianqi Chen committed
  19. 24 Mar, 2020 1 commit
  20. 23 Mar, 2020 3 commits
  21. 20 Mar, 2020 1 commit
    • [TIR][TARGET] Refactor Target codegen to use IRModule and PrimFunc. (#5107) · 841725cc
      As part of the unified IR refactor.
      This PR refactors the target codegen to use IRModule containing tir::PrimFuncs.
      
      In order to break the refactor into several steps without breaking the codebase,
      we built an conversion pass to convert Array<LoweredFunc> into IRModule.
      
      The follow-up refactors will gradually move the passes covered by IRModule up
      until we cover all the passes. Then we can remove the additional redundant
      concepts such as LoweredFunc.
      Tianqi Chen committed
  22. 14 Mar, 2020 1 commit
    • [TIR] Introduce tir::PrimFunc (#5070) · e0316415
      This PR introduces tir::PrimFunc which will be used as the TIR function
      container in the unified IR.
      
      Also streamlined the function attributes a bit further.
      - All common attributes are under tvm::attr
      - TIR specific attributes are under tvm::tir::attr and comes with a tir prefix
      - Use stl_style for attributes for now
      Tianqi Chen committed
  23. 12 Mar, 2020 1 commit
  24. 11 Mar, 2020 1 commit
    • [topi][relay] new PR to re-add tan to TVM (#5025) · 45ee7b5f
      * Add relay operation relay.op.tan.
      
      * Update tan implementation in TVM.
      
      * Update tests.
      
      * Add shape function for tan.
      
      * Add missing main test to python/frontend/tensorflow/test_forward.
      
      * Revert, back to sin/cos.
      
      * Revert "Revert, back to sin/cos."
      
      This reverts commit 4da5b503b921585ba9d80944b29136142b575c40.
      
      * Fix implementation of tan in cuda. Do not support tan for float16.
      
      Simplify topi/tests/python/test_topi_math. Add testing for tan with float32 and float64.
      
      Finally implement tan as sin/cos in llvm.
      notoraptor committed
  25. 10 Mar, 2020 1 commit
  26. 06 Mar, 2020 1 commit
    • [topi][relay] add operation tan to TVM (#4938) · d992468d
      * Add relay operation relay.op.tan.
      
      * Update tan implementation in TVM.
      
      * Update tests.
      
      * Add shape function for tan.
      
      * Add missing main test to python/frontend/tensorflow/test_forward.
      
      * Revert, back to sin/cos.
      
      * Revert "Revert, back to sin/cos."
      
      This reverts commit 4da5b503b921585ba9d80944b29136142b575c40.
      
      * Fix implementation of tan in cuda. Do not support tan for float16.
      
      Simplify topi/tests/python/test_topi_math. Add testing for tan with float32 and float64.
      
      Try again to implement tan as sin/cos in llvm.
      Yao Wang committed
  27. 21 Feb, 2020 1 commit
    • [CODEGEN] Support cuda tensorcore subbyte int data type in auto tensorcore (#4546) · f23ac969
      * support cuda tensorcore subbyte int data type in auto tensorcore
      
      * add lisence
      
      * pass cpplint
      
      * fix code review comments
      
      * merge the int4/int1 codegen tutorial into the existing auto tensorcore tutorial
      
      * using master's new API
      
      * disable tuning when cuda is not enabled
      
      * address cr comment
      
      * do not run the tuning
      
      * fix test failure
      
      * fix cpplint error
      
      * fix bool type reduction bug
      
      * 1. fix a index bug 2. fix returned bytes value of int1/int4/uint4
      
      * fix typo
      Orion34C committed
  28. 20 Feb, 2020 1 commit
  29. 19 Feb, 2020 1 commit
  30. 18 Feb, 2020 1 commit