[REFACTOR] Use more TypedPackedFuncs (#2981)
authorJames Gilles <jhgilles@mit.edu>
Wed, 10 Apr 2019 21:28:25 +0000 (17:28 -0400)
committerTianqi Chen <tqchen@users.noreply.github.com>
Wed, 10 Apr 2019 21:28:25 +0000 (14:28 -0700)
commit51785062553b19a219b2639cd230b7da7455cd0d
tree4a5f3e10013c1ac80fa390a111bc0cf315eee520
parent57f47a17f266e4123be49b84b5caf6a143d2544a
[REFACTOR] Use more TypedPackedFuncs (#2981)

* Add `set_body_simple` to Registry, refactor a lot of code to use it

* Add more types to Relay PackedFuncs

* Add Registry::set_body_method to easily make Node methods into
PackedFuncs

* Add set_body_method, set_body_node_method; start typing api_lang

* Add some docs, remove unused script

* Fix mysterious linter problem

* Touch up api_ir.cc

* Fix some issues with TOPI argument counts

* Revert changes to topi.cc to avoid problems with optional arguments

* A little more cleanup

* Type more of the api _ functions

* Whitespace

* Finalize names and docs for new registry helpers

* Update docs
68 files changed:
include/tvm/runtime/registry.h
nnvm/src/compiler/compile_engine.cc
nnvm/src/compiler/graph_hash.cc
src/api/api_arith.cc
src/api/api_base.cc
src/api/api_codegen.cc
src/api/api_ir.cc
src/api/api_lang.cc
src/api/api_pass.cc
src/api/api_schedule.cc
src/codegen/codegen_opencl.cc
src/codegen/codegen_opengl.cc
src/codegen/codegen_vhls.cc
src/codegen/llvm/codegen_amdgpu.cc
src/codegen/llvm/codegen_nvptx.cc
src/codegen/opt/build_cuda_on.cc
src/codegen/source_module.cc
src/codegen/spirv/build_vulkan.cc
src/codegen/stackvm/codegen_stackvm.cc
src/relay/backend/interpreter.cc
src/relay/ir/adt.cc
src/relay/ir/alpha_equal.cc
src/relay/ir/base.cc
src/relay/ir/expr.cc
src/relay/ir/expr_functor.cc
src/relay/ir/hash.cc
src/relay/ir/module.cc
src/relay/ir/type.cc
src/relay/op/debug.cc
src/relay/op/image/resize.cc
src/relay/op/nn/convolution.cc
src/relay/op/nn/nn.cc
src/relay/op/nn/pad.cc
src/relay/op/nn/pooling.cc
src/relay/op/nn/upsampling.cc
src/relay/op/tensor/reduce.cc
src/relay/op/tensor/transform.cc
src/relay/op/vision/multibox_op.cc
src/relay/op/vision/nms.cc
src/relay/op/vision/rcnn_op.cc
src/relay/op/vision/yolo.cc
src/relay/pass/canonicalize_ops.cc
src/relay/pass/combine_parallel_conv2d.cc
src/relay/pass/dead_code.cc
src/relay/pass/device_annotation.cc
src/relay/pass/fold_constant.cc
src/relay/pass/fuse_ops.cc
src/relay/pass/gradient.cc
src/relay/pass/mac_count.cc
src/relay/pass/pass_manager.cc
src/relay/pass/quantize.cc
src/relay/pass/simplify_inference.cc
src/relay/pass/to_a_normal_form.cc
src/relay/pass/to_graph_normal_form.cc
src/relay/pass/type_infer.cc
src/relay/pass/util.cc
src/relay/pass/well_formed.cc
src/runtime/cuda/cuda_module.cc
src/runtime/metal/metal_module.mm
src/runtime/opencl/aocl/aocl_module.cc
src/runtime/opencl/opencl_module.cc
src/runtime/opencl/sdaccel/sdaccel_module.cc
src/runtime/rocm/rocm_module.cc
src/runtime/rpc/rpc_event_impl.cc
src/runtime/rpc/rpc_socket_impl.cc
src/runtime/stackvm/stackvm_module.cc
src/runtime/vulkan/vulkan_module.cc
web/web_runtime.cc