- 28 Mar, 2020 2 commits
-
-
* [NODE][IR] Introduce StructuralHash for the Unified IR. This PR introduces a new way to handle structural hash for the unified IR. - Each object can now register an optional SEqualHash function, which describes how to reduce its structural equality to sequence of hash values. - Optionally, the object can choose to allow labeling of vars(e.g. function parameters) by calling DefHash - We implemented a non-recursive structural hasher that maintains its own stack to traverse te IR. This PR also improves the hash value property from the previous relay's hash utility. In particular, the graph node mode hashs a DAG differently from a tree by attaching an unique occurence index to each graph node. In all of the test cases so far, structural_hash is consistent with structural_equal. - if structrual(x, y) then structural_hash(x) == structural_hash(y) - if structural_hash(x) == structural_hash(y) then highly likely structural_equal(x, y) - hash no collison is found in our testcases. Ideally we should work on automatically generating these functions in the future. * Fix cases for EnvFunc and Array dims * fix testcase * Update src/node/structural_hash.cc Co-Authored-By: 雾雨魔理沙 <lolisa@marisa.moe> Co-authored-by: 雾雨魔理沙 <lolisa@marisa.moe>
Tianqi Chen committed -
* [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
-
- 24 Mar, 2020 1 commit
-
-
* [REFACTOR][TIR] Introduce PrimFuncPass. - Introduce PrimFuncPass - Convert one pass to the unified Pass API. * Address comments * Fix comments
Tianqi Chen committed
-
- 23 Mar, 2020 2 commits
-
-
* relay Node::make to constructor * patternwildcard * Address comments
Zhi committed -
* isfinite doc update * isfinit expr * isfinit expr * isfinite schedule reg * isfinite python binding * isfinite python binding * relay register isfinite * isfinite type relation * intrin isfinite * topi isfinite * testcase topi isfinite * tf frontend isfinite * tf frontend isfinite testcase * test case relay isfinite * small fixes * test forward tf isfinite * test cases injective for cuda * remove float16 test case * add support for isinf * remove unwanted import * fix conflict
Mahesh Ambule committed
-
- 20 Mar, 2020 1 commit
-
-
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
-
- 14 Mar, 2020 1 commit
-
-
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
-
- 11 Mar, 2020 2 commits
-
-
* [intrin] exp2 * [intrin] exp10 * [intrin] log2/10 * [intrins] exp10 * [test] math intrin
Bing Xu committed -
* 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
-
- 10 Mar, 2020 1 commit
-
- 06 Mar, 2020 1 commit
-
-
* 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
-
- 21 Feb, 2020 1 commit
-
-
* 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
-
- 04 Feb, 2020 1 commit
-
-
* [LINT] Fix -Wextra * Fix virtual-dtor
Tianqi Chen committed
-
- 03 Feb, 2020 1 commit
-
-
This is motivated by the want to send an array of strings across the python/C++ boundary. Arrays only support ObjectRef types and so can't carry StringImmNodes. This creates a string reference type, StringImm, which can be used with tvm::Arrays. Change-Id: I598a44536c156b97dbfe3e9518e0a1f705da850c
mbarrett97 committed
-
- 21 Jan, 2020 1 commit
-
-
Bring up namespace te -- Tensor expression language DSL.
Tianqi Chen committed
-
- 19 Jan, 2020 1 commit
-
-
TIR is the new namespace for low-level IR for tensor-level optimizations and loop transformations. This PR establishes the namespace and files. - lowered_func.h,buffer.h,data_layout.h -> tir/buffer.h,tir/data_layout.h,tir/lowered_func.h - ir.h -> tir/expr.h, tir/stmt.h - ir_functor_ext.h -> tir/expr_functor.h, tir/stmt_functor.h
Tianqi Chen committed
-