[TIR] Refactor MakePackedAPI to target dependent stage. (#5326)
authorTianqi Chen <tqchen@users.noreply.github.com>
Tue, 14 Apr 2020 14:48:14 +0000 (07:48 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2020 14:48:14 +0000 (07:48 -0700)
commitf08d5d78ee000b2c113ac451f8d73817960eafd5
tree386ce35bb7a533bdacd26709f7ab755d1d652f51
parent4720cf8569e5acd6d5f13f95d78c2f4518c67d55
[TIR] Refactor MakePackedAPI to target dependent stage. (#5326)

Previously MakePackedAPI was in the target independent stage,
but never the less requires the device_type information that will be
binded at a later target dependent stage.

The previous implementation was due to the limitation of LoweredFunc
which can not carry buffer_map info(so they have to be lowered right away).
This is no longer the case after the unified IR refactor.

This PR migrates MakePackedAPI to a target dependent stage
and removes the un-necessary BindDevice pass.
21 files changed:
include/tvm/ir/transform.h
include/tvm/runtime/device_api.h
include/tvm/tir/transform.h
python/tvm/driver/build_module.py
python/tvm/ir/transform.py
python/tvm/testing.py
python/tvm/tir/transform/transform.py
src/driver/driver_api.cc
src/ir/transform.cc
src/target/stackvm/codegen_stackvm.cc
src/tir/analysis/verify_memory.cc
src/tir/transforms/bind_device_type.cc [deleted file]
src/tir/transforms/make_packed_api.cc
tests/python/unittest/test_runtime_extension.py
tests/python/unittest/test_target_codegen_llvm.py
tests/python/unittest/test_tir_analysis_verify_memory.py
tests/python/unittest/test_tir_pass_inject_double_buffer.py
tests/python/unittest/test_tir_pass_storage_flatten.py
tests/python/unittest/test_tir_transform_combine_context_call.py
tests/python/unittest/test_tir_transform_make_packed_api.py
tests/python/unittest/test_tir_transform_prim_func_pass.py