You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/07 21:43:08 UTC
[GitHub] [incubator-tvm] tqchen opened a new issue #4647: Track Refactor
Items and Update Guide
tqchen opened a new issue #4647: Track Refactor Items and Update Guide
URL: https://github.com/apache/incubator-tvm/issues/4647
We are in the process of refactoring recently. Some of them are cleanup of legacy code in the new version, some other prepares code changes for #4617
This thread tracks related infra changes and guides to sync the code with the mainline as suggested by @merrymercy . Please feel free to reply to add more suggestions
## Node Object Unification
- Rationale: remove a few redirected macros and alias, unify node and object
- PRs: https://github.com/apache/incubator-tvm/pull/4603
- NodeXYZ -> ObjectXYZ
- TVM_DEFINE_NODE_REF: define the class and TVM_DEFINE_OBJECT_REF_METHODS
## IRMutator Visitor Functor Unification
- Rationale: Unify mutator and functor
- PRs: https://github.com/apache/incubator-tvm/pull/4607 https://github.com/apache/incubator-tvm/pull/4606
- Add ```#include<tvm/ir_functor_ext.h>``` for places that need mutator
- IRMutator: sub-class StmtMutator or StmtExprMutator instead
- IRVisitor: sub-class StmtVisitor or StmtExprVisitor instead
## TVM_REGISTER_API
- Rationale: remove indirection
- PR: https://github.com/apache/incubator-tvm/pull/4621
- Rename to TVM_REGISTER_GLOBAL in ```runtime/registry.h```
## SeqStmt
- Rationale: avoid nested recursion in long blocks
- PR https://github.com/apache/incubator-tvm/pull/4627
- Use SeqStmt instead to constructs sequences
## set_body_typed
- Rationale: avoid duplication in terms of type signatures
- https://github.com/apache/incubator-tvm/pull/4623
- Remove type signature argument in set_body_typed
```c++
// before
TVM_REGISTER_GLOBAL("add")
.set_body_typed<int(int)>([](int x) { return x + 1; }
// after
TVM_REGISTER_GLOBAL("add")
.set_body_typed([](int x) { return x + 1; }
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-tvm] tqchen commented on issue #4647: Track Refactor
Items and Update Guide
Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #4647: Track Refactor Items and Update Guide
URL: https://github.com/apache/incubator-tvm/issues/4647#issuecomment-571788041
cc @merrymercy @Hzfengsy
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services