[NODE][REFACTOR] Refactor reflection system in node. (#4189)
authorTianqi Chen <tqchen@users.noreply.github.com>
Thu, 24 Oct 2019 20:40:04 +0000 (13:40 -0700)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2019 20:40:04 +0000 (13:40 -0700)
commit78ca6fc8b00eb26dbba335c1fad8f46ae62b4822
treefcc4a7aa01a0485b14379d9f3fb0e944a1b47207
parent324a9607eb563f81e55fdd0c9d078c2f74651817
[NODE][REFACTOR] Refactor reflection system in node. (#4189)

* [NODE][REFACTOR] Refactor reflection system in node.

- Removed the old Node, Node is now just an alias of runtime::Object
- Introduce ReflectionVTable, a new columnar dispatcher to support reflection
  - This allows us to remove vtable from most node objects
  - The VisitAttrs are registered via TVM_RESGITER_NODE_TYPE,
    they are no longer virtual.
- Consolidated serialization and reflection features into node.

* Explicit type qualification when calling destructor.

* Fix SPIRV, more comments
76 files changed:
include/tvm/api_registry.h
include/tvm/arithmetic.h
include/tvm/attrs.h
include/tvm/base.h
include/tvm/buffer.h
include/tvm/build_module.h
include/tvm/channel.h
include/tvm/data_layout.h
include/tvm/expr.h
include/tvm/ir.h
include/tvm/lowered_func.h
include/tvm/node/container.h
include/tvm/node/node.h
include/tvm/node/reflection.h [new file with mode: 0644]
include/tvm/node/serialization.h [new file with mode: 0644]
include/tvm/operation.h
include/tvm/packed_func_ext.h
include/tvm/relay/adt.h
include/tvm/relay/base.h
include/tvm/relay/expr.h
include/tvm/relay/interpreter.h
include/tvm/relay/module.h
include/tvm/relay/op.h
include/tvm/relay/transform.h
include/tvm/relay/type.h
include/tvm/runtime/device_api.h
include/tvm/runtime/memory.h
include/tvm/runtime/object.h
include/tvm/runtime/packed_func.h
include/tvm/runtime/registry.h
include/tvm/schedule.h
include/tvm/target_info.h
include/tvm/tensor.h
include/tvm/tensor_intrin.h
nnvm/src/compiler/compile_engine.h
nnvm/src/compiler/graph_hash.h
nnvm/src/compiler/graph_runtime.cc
nnvm/src/compiler/graph_runtime.h
src/README.md
src/api/api_base.cc
src/api/dsl_api.cc [deleted file]
src/arithmetic/bound_deducer.cc
src/arithmetic/canonical_simplify.cc
src/arithmetic/int_set.cc
src/arithmetic/int_set.h
src/codegen/spirv/intrin_rule_spirv.cc
src/lang/api_registry.cc
src/lang/ir.cc
src/lang/target_info.cc
src/node/reflection.cc [new file with mode: 0644]
src/node/serialization.cc [moved from src/lang/reflection.cc with 64% similarity]
src/relay/backend/compile_engine.h
src/relay/backend/interpreter.cc
src/relay/backend/param_dict.cc
src/relay/backend/param_dict.h
src/relay/ir/adt.cc
src/relay/ir/base.cc
src/relay/ir/op.cc
src/relay/ir/pretty_printer.cc
src/relay/ir/type_functor.cc
src/relay/pass/alter_op_layout.cc
src/relay/pass/device_annotation.cc
src/relay/pass/eta_expand.cc
src/relay/pass/fold_scale_axis.cc
src/relay/pass/forward_rewrite.cc
src/relay/pass/pass_manager.cc
src/relay/pass/quantize/annotate.cc
src/relay/pass/quantize/partition.cc
src/relay/pass/quantize/quantize.cc
src/relay/pass/quantize/quantize.h
src/relay/pass/quantize/realize.cc
src/relay/pass/type_solver.cc
src/relay/pass/util.cc
src/runtime/object.cc
tests/cpp/build_module_test.cc
tests/cpp/packed_func_test.cc