[REFACTOR][CODEGEN] codegen->target, build_module->driver (#4742)
authorTianqi Chen <tqchen@users.noreply.github.com>
Sun, 19 Jan 2020 17:53:22 +0000 (09:53 -0800)
committerGitHub <noreply@github.com>
Sun, 19 Jan 2020 17:53:22 +0000 (09:53 -0800)
commit33b0831c45c01990e5472cfdace0ef478cabe671
tree01da890e968d4988738ec4addf5b2c01cb6c3098
parent992b5b54ec1425438f2e4a483b2b44be438817b8
[REFACTOR][CODEGEN] codegen->target, build_module->driver (#4742)

This PR moves the codegen related code into the target folder,
as they are target specific functionalities.

We also adopt the term "compiler driver" in common compiler infra
such as rust, GHC and clang.
As a result, build_module is moved into the driver folder.
119 files changed:
CMakeLists.txt
cmake/modules/CUDA.cmake
cmake/modules/LLVM.cmake
cmake/modules/Metal.cmake
cmake/modules/OpenCL.cmake
cmake/modules/OpenGL.cmake
cmake/modules/ROCM.cmake
cmake/modules/Vulkan.cmake
include/tvm/build_module.h [deleted file]
include/tvm/driver/driver.h [new file with mode: 0644]
include/tvm/relay/interpreter.h
include/tvm/relay/op_attr_types.h
include/tvm/target/codegen.h [moved from include/tvm/codegen.h with 90% similarity]
include/tvm/target/generic_func.h [new file with mode: 0644]
include/tvm/target/target.h
src/README.md
src/api/api_codegen.cc
src/api/api_lang.cc
src/contrib/hybrid/codegen_hybrid.h
src/driver/driver.cc [moved from src/codegen/build_module.cc with 56% similarity]
src/relay/backend/build_module.cc
src/relay/backend/compile_engine.cc
src/relay/backend/interpreter.cc
src/relay/backend/utils.h
src/relay/backend/vm/compiler.cc
src/relay/op/nn/upsampling.cc
src/target/build_common.h [moved from src/codegen/build_common.h with 85% similarity]
src/target/codegen.cc [moved from src/codegen/codegen.cc with 99% similarity]
src/target/datatype/registry.cc [moved from src/codegen/datatype/registry.cc with 100% similarity]
src/target/datatype/registry.h [moved from src/codegen/datatype/registry.h with 97% similarity]
src/target/generic_func.cc [new file with mode: 0644]
src/target/intrin_rule.cc [moved from src/codegen/intrin_rule.cc with 100% similarity]
src/target/intrin_rule.h [moved from src/codegen/intrin_rule.h with 94% similarity]
src/target/llvm/codegen_amdgpu.cc [moved from src/codegen/llvm/codegen_amdgpu.cc with 99% similarity]
src/target/llvm/codegen_arm.cc [moved from src/codegen/llvm/codegen_arm.cc with 100% similarity]
src/target/llvm/codegen_blob.cc [moved from src/codegen/llvm/codegen_blob.cc with 100% similarity]
src/target/llvm/codegen_blob.h [moved from src/codegen/llvm/codegen_blob.h with 92% similarity]
src/target/llvm/codegen_cpu.cc [moved from src/codegen/llvm/codegen_cpu.cc with 100% similarity]
src/target/llvm/codegen_cpu.h [moved from src/codegen/llvm/codegen_cpu.h with 98% similarity]
src/target/llvm/codegen_llvm.cc [moved from src/codegen/llvm/codegen_llvm.cc with 100% similarity]
src/target/llvm/codegen_llvm.h [moved from src/codegen/llvm/codegen_llvm.h with 98% similarity]
src/target/llvm/codegen_nvptx.cc [moved from src/codegen/llvm/codegen_nvptx.cc with 100% similarity]
src/target/llvm/codegen_x86_64.cc [moved from src/codegen/llvm/codegen_x86_64.cc with 100% similarity]
src/target/llvm/intrin_rule_llvm.cc [moved from src/codegen/llvm/intrin_rule_llvm.cc with 100% similarity]
src/target/llvm/intrin_rule_llvm.h [moved from src/codegen/llvm/intrin_rule_llvm.h with 93% similarity]
src/target/llvm/intrin_rule_nvptx.cc [moved from src/codegen/llvm/intrin_rule_nvptx.cc with 100% similarity]
src/target/llvm/intrin_rule_rocm.cc [moved from src/codegen/llvm/intrin_rule_rocm.cc with 100% similarity]
src/target/llvm/llvm_common.cc [moved from src/codegen/llvm/llvm_common.cc with 100% similarity]
src/target/llvm/llvm_common.h [moved from src/codegen/llvm/llvm_common.h with 96% similarity]
src/target/llvm/llvm_module.cc [moved from src/codegen/llvm/llvm_module.cc with 99% similarity]
src/target/opt/README [moved from src/codegen/opt/README with 100% similarity]
src/target/opt/build_aocl_off.cc [moved from src/codegen/opt/build_aocl_off.cc with 96% similarity]
src/target/opt/build_cuda_off.cc [moved from src/codegen/opt/build_cuda_off.cc with 100% similarity]
src/target/opt/build_cuda_on.cc [moved from src/codegen/opt/build_cuda_on.cc with 99% similarity]
src/target/opt/build_metal_off.cc [moved from src/codegen/opt/build_metal_off.cc with 96% similarity]
src/target/opt/build_opencl_off.cc [moved from src/codegen/opt/build_opencl_off.cc with 96% similarity]
src/target/opt/build_opengl_off.cc [moved from src/codegen/opt/build_opengl_off.cc with 96% similarity]
src/target/opt/build_rocm_off.cc [moved from src/codegen/opt/build_rocm_off.cc with 97% similarity]
src/target/opt/build_sdaccel_off.cc [moved from src/codegen/opt/build_sdaccel_off.cc with 96% similarity]
src/target/source/codegen_aocl.cc [moved from src/codegen/codegen_aocl.cc with 94% similarity]
src/target/source/codegen_c.cc [moved from src/codegen/codegen_c.cc with 99% similarity]
src/target/source/codegen_c.h [moved from src/codegen/codegen_c.h with 98% similarity]
src/target/source/codegen_c_host.cc [moved from src/codegen/codegen_c_host.cc with 99% similarity]
src/target/source/codegen_c_host.h [moved from src/codegen/codegen_c_host.h with 93% similarity]
src/target/source/codegen_cuda.cc [moved from src/codegen/codegen_cuda.cc with 100% similarity]
src/target/source/codegen_cuda.h [moved from src/codegen/codegen_cuda.h with 95% similarity]
src/target/source/codegen_metal.cc [moved from src/codegen/codegen_metal.cc with 98% similarity]
src/target/source/codegen_metal.h [moved from src/codegen/codegen_metal.h with 92% similarity]
src/target/source/codegen_opencl.cc [moved from src/codegen/codegen_opencl.cc with 98% similarity]
src/target/source/codegen_opencl.h [moved from src/codegen/codegen_opencl.h with 93% similarity]
src/target/source/codegen_opengl.cc [moved from src/codegen/codegen_opengl.cc with 99% similarity]
src/target/source/codegen_opengl.h [moved from src/codegen/codegen_opengl.h with 91% similarity]
src/target/source/codegen_source_base.cc [moved from src/codegen/codegen_source_base.cc with 100% similarity]
src/target/source/codegen_source_base.h [moved from src/codegen/codegen_source_base.h with 95% similarity]
src/target/source/codegen_vhls.cc [moved from src/codegen/codegen_vhls.cc with 97% similarity]
src/target/source/codegen_vhls.h [moved from src/codegen/codegen_vhls.h with 87% similarity]
src/target/source/intrin_rule_aocl.cc [moved from src/codegen/intrin_rule_aocl.cc with 98% similarity]
src/target/source/intrin_rule_cuda.cc [moved from src/codegen/intrin_rule_cuda.cc with 99% similarity]
src/target/source/intrin_rule_metal.cc [moved from src/codegen/intrin_rule_metal.cc with 98% similarity]
src/target/source/intrin_rule_opencl.cc [moved from src/codegen/intrin_rule_opencl.cc with 98% similarity]
src/target/source/intrin_rule_opengl.cc [moved from src/codegen/intrin_rule_opengl.cc with 98% similarity]
src/target/source/intrin_rule_vhls.cc [moved from src/codegen/intrin_rule_vhls.cc with 98% similarity]
src/target/source/literal/cuda_half_t.h [moved from src/codegen/literal/cuda_half_t.h with 98% similarity]
src/target/source/source_module.cc [moved from src/codegen/source_module.cc with 98% similarity]
src/target/spirv/build_vulkan.cc [moved from src/codegen/spirv/build_vulkan.cc with 100% similarity]
src/target/spirv/codegen_spirv.cc [moved from src/codegen/spirv/codegen_spirv.cc with 100% similarity]
src/target/spirv/codegen_spirv.h [moved from src/codegen/spirv/codegen_spirv.h with 97% similarity]
src/target/spirv/intrin_rule_spirv.cc [moved from src/codegen/spirv/intrin_rule_spirv.cc with 100% similarity]
src/target/spirv/ir_builder.cc [moved from src/codegen/spirv/ir_builder.cc with 100% similarity]
src/target/spirv/ir_builder.h [moved from src/codegen/spirv/ir_builder.h with 99% similarity]
src/target/stackvm/codegen_stackvm.cc [moved from src/codegen/stackvm/codegen_stackvm.cc with 100% similarity]
src/target/stackvm/codegen_stackvm.h [moved from src/codegen/stackvm/codegen_stackvm.h with 96% similarity]
src/target/target.cc
src/tir/pass/lower_custom_datatypes.cc
src/tir/pass/tensor_core.cc
tests/cpp/build_module_test.cc
tests/cpp/relay_build_module_test.cc
tests/cpp/relay_transform_sequential.cc
tests/cpp/utvm_runtime_standalone_test.cc
topi/include/topi/cuda/dense.h
topi/include/topi/cuda/injective.h
topi/include/topi/cuda/normalization.h
topi/include/topi/cuda/pooling.h
topi/include/topi/cuda/reduction.h
topi/include/topi/cuda/softmax.h
topi/include/topi/generic/default.h
topi/include/topi/generic/extern.h
topi/include/topi/generic/injective.h
topi/include/topi/rocm/dense.h
topi/include/topi/rocm/injective.h
topi/include/topi/rocm/normalization.h
topi/include/topi/rocm/pooling.h
topi/include/topi/rocm/reduction.h
topi/include/topi/rocm/softmax.h
topi/include/topi/x86/bnn.h
topi/include/topi/x86/default.h
topi/include/topi/x86/injective.h
topi/src/topi.cc
vta/include/vta/driver.h