[PY] GraphRuntime: Update the tutorials to the module-based interface (#6482)
authorTianqi Chen <tqchen@users.noreply.github.com>
Wed, 16 Sep 2020 15:18:06 +0000 (08:18 -0700)
committerGitHub <noreply@github.com>
Wed, 16 Sep 2020 15:18:06 +0000 (08:18 -0700)
commit6b5694f0f2941fb9e8fa510011e3caeb03056b4e
tree89a45b9e8a4a6ce571a7961a6907b3690dd8d8ac
parentf8a7078d7476fabf6cfac82b53a2d3ada2938565
[PY] GraphRuntime: Update the tutorials to the module-based interface (#6482)

* [PY] GraphRuntime: Update the tutorials to the module-based interface.

Also added document about the encouraged usage.
In particular, we encourage the following usage.

lib = relay.build(...)
gmod = graph_runtime.GraphModule(lib["default"](ctx))

I have changed most of the tutorials and apps.
Some follow up PRs are needed to update some of the tests code.

* Fix VTA tutorials
32 files changed:
apps/benchmark/arm_cpu_imagenet_bench.py
apps/benchmark/gpu_imagenet_bench.py
apps/benchmark/mobile_gpu_imagenet_bench.py
apps/ios_rpc/tests/ios_rpc_mobilenet.py
python/tvm/contrib/graph_runtime.py
python/tvm/relay/backend/graph_runtime_factory.py
python/tvm/relay/frontend/common.py
python/tvm/relay/param_dict.py
python/tvm/relay/quantize/_calibrate.py
tests/python/contrib/test_coreml_codegen.py
tests/python/contrib/test_ethosn/infrastructure.py
tests/python/contrib/test_ethosn/test_topologies.py
tests/python/frontend/caffe2/test_forward.py
tests/python/frontend/coreml/test_forward.py
tests/python/frontend/darknet/test_forward.py
tests/python/frontend/keras/test_forward.py
tests/python/frontend/mxnet/test_forward.py
tests/python/frontend/pytorch/qnn_test.py
tests/python/frontend/tflite/test_forward.py
tests/python/relay/benchmarking/benchmark_vm.py
tests/python/relay/test_cpp_build_module.py
tests/python/relay/test_simplify_fc_transpose.py
tests/python/unittest/test_target_codegen_blob.py
tests/python/unittest/test_tir_transform_hoist_if.py
tutorials/autotvm/tune_relay_arm.py
tutorials/autotvm/tune_relay_cuda.py
tutorials/autotvm/tune_relay_mobile_gpu.py
tutorials/autotvm/tune_relay_x86.py
tutorials/get_started/relay_quick_start.py
vta/tutorials/autotvm/tune_relay_vta.py
vta/tutorials/frontend/deploy_classification.py
vta/tutorials/frontend/legacy/deploy_detection.py