[REFACTOR][TIR][API-Change] Migrate BuildConfig to PassContext. (#5668)
authorTianqi Chen <tqchen@users.noreply.github.com>
Tue, 26 May 2020 03:50:00 +0000 (20:50 -0700)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 03:50:00 +0000 (20:50 -0700)
commitb2640260cd06e9e48c4713407e60218f66e337c4
treed741dec6ceb95619c09cc8caeaa033a52dbd1aa5
parent9d1d8a90ff7c25355d8098342c55f7e7c198282c
[REFACTOR][TIR][API-Change] Migrate BuildConfig to PassContext. (#5668)

* [REFACTOR][TIR] Migrate BuildConfig to PassContext.

This PR migrates the TIR configurations from BuildConfig to the
PassContext used by the unified IR.
Moving forward, PassContext will be the unified way to configure passes in the TVM stack.

Changes

- Refactored TVM_PASS_REGISTER_CONFIG_OPTION to take in the reference type.
- Removed BuildConfig.
- Migrated the passes to use PassContext.

* Update include/tvm/ir/attrs.h

Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>
Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>
58 files changed:
apps/lldb/tvm.py
include/tvm/driver/driver_api.h
include/tvm/ir/attrs.h
include/tvm/ir/transform.h
include/tvm/target/target.h
include/tvm/tir/transform.h
python/tvm/autotvm/measure/measure_methods.py
python/tvm/autotvm/task/relay_integration.py
python/tvm/driver/build_module.py
python/tvm/ir/container.py
python/tvm/ir/transform.py
python/tvm/target/__init__.py
python/tvm/target/build_config.py [deleted file]
python/tvm/tir/transform/transform.py
src/driver/driver_api.cc
src/relay/backend/build_module.cc
src/relay/backend/compile_engine.cc
src/relay/backend/interpreter.cc
src/relay/backend/vm/compiler.cc
src/relay/transforms/fold_constant.cc
src/relay/transforms/partial_eval.cc
src/target/codegen.cc
src/target/target.cc
src/tir/transforms/inject_double_buffer.cc
src/tir/transforms/loop_partition.cc
src/tir/transforms/unroll_loop.cc
tests/cpp/build_module_test.cc
tests/micro/test_runtime_micro_on_arm.py
tests/python/relay/test_pass_fold_constant.py
tests/python/relay/test_pass_manager.py
tests/python/unittest/test_runtime_micro.py
tests/python/unittest/test_target_codegen_c_host.py
tests/python/unittest/test_target_codegen_cuda.py
tests/python/unittest/test_target_codegen_llvm.py
tests/python/unittest/test_te_schedule_bound_inference.py
tests/python/unittest/test_tir_analysis_verify_gpu_code.py
tests/python/unittest/test_tir_transform_inject_double_buffer.py
tests/python/unittest/test_tir_transform_instrument_bound_checkers.py
tests/python/unittest/test_tir_transform_loop_partition.py
tests/python/unittest/test_tir_transform_storage_flatten.py
tests/python/unittest/test_tir_transform_unroll_loop.py
topi/python/topi/arm_cpu/bitserial_conv2d.py
topi/python/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py
topi/python/topi/arm_cpu/tensor_intrin.py
topi/recipe/conv/depthwise_conv2d_test.py
topi/recipe/conv/test_conv2d_hwcn_map.py
topi/recipe/gemm/cuda_gemm_square.py
topi/recipe/reduce/test_reduce_map.py
topi/recipe/rnn/lstm.py
topi/recipe/rnn/matexp.py
tutorials/dev/low_level_custom_pass.py
tutorials/language/tensorize.py
tutorials/optimize/opt_conv_tensorcore.py
tutorials/optimize/opt_matmul_auto_tensorcore.py
vta/python/vta/build_module.py
vta/scripts/tune_resnet.py
vta/tutorials/autotvm/tune_relay_vta.py
vta/tutorials/frontend/deploy_classification.py