[REFACTOR][IR] Streamline ir/op Registry (#5609)
authorTianqi Chen <tqchen@users.noreply.github.com>
Sun, 17 May 2020 22:43:11 +0000 (15:43 -0700)
committerGitHub <noreply@github.com>
Sun, 17 May 2020 22:43:11 +0000 (15:43 -0700)
commita8e44710c6472a2ee5cb66283c7f5e77f4e4ca0d
treec4cf13d405fd121b86b8a14edcec1d599b3bc475
parent63f84a11353791ac3f8916cdcf7c2c6e6d45c4fb
[REFACTOR][IR] Streamline ir/op Registry (#5609)

* [REFACTOR][IR] Streamline ir/op Registry

This PR refactors the attrregistry mechanism in the ir/op into
a separate common base. The common base will provide a foundation
for other attr related registries such as target and pass.

We also streamlines the terminology of the registry API.

- Use AttrMap for the column maps returned by the registry
- Use RegEntry to refer to the registry entry.

* Address review comments
24 files changed:
docs/dev/relay_add_pass.rst
include/tvm/ir/op.h
include/tvm/node/attr_registry_map.h [new file with mode: 0644]
src/ir/op.cc
src/node/attr_registry.h [new file with mode: 0644]
src/relay/analysis/mac_count.cc
src/relay/analysis/util.cc
src/relay/backend/compile_engine.cc
src/relay/ir/dataflow_matcher.cc
src/relay/transforms/alter_op_layout.cc
src/relay/transforms/annotate_target.cc
src/relay/transforms/canonicalize_cast.cc
src/relay/transforms/combine_parallel_op.cc
src/relay/transforms/convert_layout.cc
src/relay/transforms/eliminate_common_subexpr.cc
src/relay/transforms/fold_constant.cc
src/relay/transforms/fold_scale_axis.cc
src/relay/transforms/forward_rewrite.cc
src/relay/transforms/fuse_ops.cc
src/relay/transforms/gradient.cc
src/relay/transforms/infer_layout_util.h
src/relay/transforms/legalize.cc
src/relay/transforms/partial_eval.cc
tests/cpp/relay_build_module_test.cc