[RELAY][VM] Enable heterogeneous execution for Relay VM (#6337)
authorZhi <5145158+zhiics@users.noreply.github.com>
Thu, 3 Sep 2020 16:47:03 +0000 (09:47 -0700)
committerGitHub <noreply@github.com>
Thu, 3 Sep 2020 16:47:03 +0000 (09:47 -0700)
commit1224d56ca95825b4244d337df4cd04546108c9cd
treeec10752c50c3050b719a642dbb9428f65010938b
parent12d66d4b3f3e96df95d086863434d37034031673
[RELAY][VM] Enable heterogeneous execution for Relay VM (#6337)

* vm heterogeneous execution

* context analysis on module

* fix profiler

* fix memory plan

* add more unification

* add serialization

* add gpu tests for test_adt

* cache visited functions

* path compression

* C++ context analysis

* remove python context analysis

* add tests

* clean

* lint

* fix

* enable gpu test for dynamic namespace

* remove GetParamsContext

* fix comments and add doc for context analysis

* cache context

* cache allocator

* rebase and fix comments
33 files changed:
include/tvm/relay/analysis.h
include/tvm/runtime/vm/bytecode.h
include/tvm/runtime/vm/executable.h
include/tvm/runtime/vm/vm.h
python/tvm/ir/module.py
python/tvm/relay/analysis/analysis.py
python/tvm/relay/backend/vm.py
python/tvm/relay/op/_tensor.py
python/tvm/relay/transform/memory_alloc.py
python/tvm/relay/transform/memory_plan.py
python/tvm/runtime/vm.py
src/ir/module.cc
src/relay/analysis/context_analysis.cc [new file with mode: 0644]
src/relay/backend/vm/compiler.cc
src/relay/backend/vm/compiler.h
src/relay/op/device_copy.cc
src/relay/transforms/fold_constant.cc
src/runtime/vm/bytecode.cc
src/runtime/vm/executable.cc
src/runtime/vm/profiler/vm.cc
src/runtime/vm/serialize_util.h
src/runtime/vm/vm.cc
tests/python/relay/benchmarking/benchmark_vm.py
tests/python/relay/dyn/test_dynamic_op_level10.py
tests/python/relay/dyn/test_dynamic_op_level2.py
tests/python/relay/dyn/test_dynamic_op_level3.py
tests/python/relay/dyn/test_dynamic_op_level5.py
tests/python/relay/test_adt.py
tests/python/relay/test_any.py
tests/python/relay/test_pass_annotation.py
tests/python/relay/test_pass_context_analysis.py [new file with mode: 0644]
tests/python/relay/test_vm_serialization.py
tests/python/unittest/test_runtime_vm_profiler.py