Skip to content

Commit c81fcca

Browse files
tqchenHzfengsy
andauthored
[REFACTOR] Phase out te.Schedule c++ components (#17662)
* cleanup schedule c++ * remove vitis ai * remove VERILATOR * remove aocl and sdaccel * remove opengl * remove microdev and antlr * remove frontends * fix * Cleanup relay related legacy components * fix --------- Co-authored-by: Siyuan Feng <[email protected]>
1 parent a531d17 commit c81fcca

File tree

255 files changed

+481
-23511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+481
-23511
lines changed

CMakeLists.txt

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,17 @@ tvm_option(USE_TFLITE "Build with tflite support" OFF)
108108
tvm_option(USE_TENSORFLOW_PATH "TensorFlow root path when use TFLite" none)
109109
tvm_option(USE_COREML "Build with coreml support" OFF)
110110
tvm_option(USE_BNNS "Build with BNNS support" OFF)
111-
tvm_option(USE_TARGET_ONNX "Build with ONNX Codegen support" OFF)
112111
tvm_option(USE_ARM_COMPUTE_LIB "Build with Arm Compute Library" OFF)
113112
tvm_option(USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR "Build with Arm Compute Library graph executor" OFF)
114113
tvm_option(USE_TENSORRT_CODEGEN "Build with TensorRT Codegen support" OFF)
115114
tvm_option(USE_TENSORRT_RUNTIME "Build with TensorRT runtime" OFF)
116115
tvm_option(USE_NNAPI_CODEGEN "Build with NNAPI Codegen support" OFF)
117116
tvm_option(USE_NNAPI_RUNTIME "Build with NNAPI runtime" OFF)
118117
tvm_option(USE_RUST_EXT "Build with Rust based compiler extensions, STATIC, DYNAMIC, or OFF" OFF)
119-
tvm_option(USE_VITIS_AI "Build with VITIS-AI Codegen support" OFF)
120118
tvm_option(SUMMARIZE "Print CMake option summary after configuring" OFF)
121119
tvm_option(USE_CLML "Build with CLML Codegen support" OFF)
122120
tvm_option(USE_CLML_GRAPH_EXECUTOR "Build with CLML graph runtime" OFF)
123121
tvm_option(USE_UMA "Build with UMA support" OFF)
124-
tvm_option(USE_VERILATOR "Build with Verilator support" OFF)
125122
tvm_option(USE_MSC "Enable Multi-System Compiler" OFF)
126123
tvm_option(USE_MRVL "Build with MRVL TVM support" OFF)
127124
tvm_option(USE_NVSHMEM "Build with NVSHMEM support" OFF)
@@ -496,12 +493,9 @@ include(cmake/modules/contrib/LibTorch.cmake)
496493
include(cmake/modules/contrib/TFLite.cmake)
497494
include(cmake/modules/contrib/CoreML.cmake)
498495
include(cmake/modules/contrib/BNNS.cmake)
499-
include(cmake/modules/contrib/ONNX.cmake)
500496
include(cmake/modules/contrib/ArmComputeLib.cmake)
501497
include(cmake/modules/contrib/TensorRT.cmake)
502498
include(cmake/modules/contrib/NNAPI.cmake)
503-
include(cmake/modules/contrib/VitisAI.cmake)
504-
include(cmake/modules/contrib/Verilator.cmake)
505499
include(cmake/modules/contrib/UMA.cmake)
506500
include(cmake/modules/contrib/MSC.cmake)
507501
include(cmake/modules/contrib/vllm.cmake)
@@ -587,20 +581,6 @@ if(USE_IOS_RPC)
587581
add_subdirectory("apps/ios_rpc")
588582
endif()
589583

590-
if(USE_RELAY_DEBUG)
591-
message(STATUS "Building Relay in debug mode...")
592-
target_compile_definitions(tvm_objs PRIVATE "USE_RELAY_DEBUG")
593-
target_compile_definitions(tvm_objs PRIVATE "TVM_LOG_DEBUG")
594-
target_compile_definitions(tvm_runtime_objs PRIVATE "USE_RELAY_DEBUG")
595-
target_compile_definitions(tvm_runtime_objs PRIVATE "TVM_LOG_DEBUG")
596-
target_compile_definitions(tvm_libinfo_objs PRIVATE "USE_RELAY_DEBUG")
597-
target_compile_definitions(tvm_libinfo_objs PRIVATE "TVM_LOG_DEBUG")
598-
else()
599-
target_compile_definitions(tvm_objs PRIVATE "NDEBUG")
600-
target_compile_definitions(tvm_runtime_objs PRIVATE "NDEBUG")
601-
target_compile_definitions(tvm_libinfo_objs PRIVATE "NDEBUG")
602-
endif(USE_RELAY_DEBUG)
603-
604584
if(TVM_DEBUG_WITH_ABI_CHANGE)
605585
message(STATUS "Building with debug code that may cause ABI changes...")
606586
target_compile_definitions(tvm_objs PRIVATE "TVM_DEBUG_WITH_ABI_CHANGE")
@@ -703,12 +683,7 @@ if(GTEST_FOUND)
703683
endif()
704684
set_target_properties(cpptest PROPERTIES EXCLUDE_FROM_ALL 1)
705685
set_target_properties(cpptest PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
706-
if(USE_RELAY_DEBUG)
707-
target_compile_definitions(cpptest PRIVATE "USE_RELAY_DEBUG")
708-
target_compile_definitions(cpptest PRIVATE "TVM_LOG_DEBUG")
709-
else()
710-
target_compile_definitions(cpptest PRIVATE "NDEBUG")
711-
endif()
686+
target_compile_definitions(cpptest PRIVATE "NDEBUG")
712687
if(TVM_DEBUG_WITH_ABI_CHANGE)
713688
target_compile_definitions(cpptest PRIVATE "TVM_DEBUG_WITH_ABI_CHANGE")
714689
endif(TVM_DEBUG_WITH_ABI_CHANGE)

NEWS.md

Lines changed: 0 additions & 2772 deletions
This file was deleted.

cmake/config.cmake

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ set(USE_ROCM OFF)
7878
# - /path/to/rccl: use specific path to rccl
7979
set(USE_RCCL OFF)
8080

81-
# Whether enable SDAccel runtime
82-
set(USE_SDACCEL OFF)
83-
84-
# Whether enable Intel FPGA SDK for OpenCL (AOCL) runtime
85-
set(USE_AOCL OFF)
86-
8781
# Whether enable OpenCL runtime
8882
#
8983
# Possible values:
@@ -120,9 +114,6 @@ set(USE_KHRONOS_SPIRV OFF)
120114
# whether enable SPIRV_KHR_DOT_PRODUCT
121115
set(USE_SPIRV_KHR_INTEGER_DOT_PRODUCT OFF)
122116

123-
# Whether enable OpenGL runtime
124-
set(USE_OPENGL OFF)
125-
126117
# Whether enable RPC runtime
127118
set(USE_RPC ON)
128119

@@ -138,12 +129,6 @@ set(USE_IOS_RPC OFF)
138129
# Whether embed stackvm into the runtime
139130
set(USE_STACKVM_RUNTIME OFF)
140131

141-
# Whether enable tiny embedded graph executor.
142-
set(USE_GRAPH_EXECUTOR ON)
143-
144-
# Whether enable tiny graph executor with CUDA Graph
145-
set(USE_GRAPH_EXECUTOR_CUDA_GRAPH OFF)
146-
147132
# Whether enable pipeline executor.
148133
set(USE_PIPELINE_EXECUTOR OFF)
149134

@@ -285,12 +270,6 @@ set(USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR OFF)
285270
set(USE_TENSORRT_CODEGEN OFF)
286271
set(USE_TENSORRT_RUNTIME OFF)
287272

288-
# Whether use VITIS-AI codegen
289-
set(USE_VITIS_AI OFF)
290-
291-
# Build Verilator codegen and runtime
292-
set(USE_VERILATOR OFF)
293-
294273
# Whether to use the Multi-System Compiler
295274
set(USE_MSC OFF)
296275

@@ -299,16 +278,6 @@ set(USE_CLML OFF)
299278
# USE_CLML_GRAPH_EXECUTOR - CLML SDK PATH or ON or OFF
300279
set(USE_CLML_GRAPH_EXECUTOR OFF)
301280

302-
# Build ANTLR parser for Relay text format
303-
# Possible values:
304-
# - ON: enable ANTLR by searching default locations (cmake find_program for antlr4 and /usr/local for jar)
305-
# - OFF: disable ANTLR
306-
# - /path/to/antlr-*-complete.jar: path to specific ANTLR jar file
307-
set(USE_ANTLR OFF)
308-
309-
# Whether use Relay debug mode
310-
set(USE_RELAY_DEBUG OFF)
311-
312281
# Whether to enable debug code that may cause ABI changes
313282
set(TVM_DEBUG_WITH_ABI_CHANGE OFF)
314283

@@ -360,9 +329,6 @@ set(USE_MRVL OFF)
360329
# Whether to use QHL library
361330
set(USE_HEXAGON_QHL OFF)
362331

363-
# Whether to use ONNX codegen
364-
set(USE_TARGET_ONNX OFF)
365-
366332
# Whether enable BNNS runtime
367333
set(USE_BNNS OFF)
368334

cmake/modules/LibInfo.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ function(add_lib_info src_file)
102102
TVM_INFO_USE_OPENMP="${USE_OPENMP}"
103103
TVM_INFO_USE_PAPI="${USE_PAPI}"
104104
TVM_INFO_USE_RANDOM="${USE_RANDOM}"
105-
TVM_INFO_USE_RELAY_DEBUG="${USE_RELAY_DEBUG}"
106105
TVM_INFO_TVM_DEBUG_WITH_ABI_CHANGE="${TVM_DEBUG_WITH_ABI_CHANGE}"
107106
TVM_INFO_TVM_LOG_BEFORE_THROW="${TVM_LOG_BEFORE_THROW}"
108107
TVM_INFO_USE_ROCBLAS="${USE_ROCBLAS}"
@@ -115,21 +114,18 @@ function(add_lib_info src_file)
115114
TVM_INFO_USE_SORT="${USE_SORT}"
116115
TVM_INFO_USE_SPIRV_KHR_INTEGER_DOT_PRODUCT="${USE_SPIRV_KHR_INTEGER_DOT_PRODUCT}"
117116
TVM_INFO_USE_STACKVM_RUNTIME="${USE_STACKVM_RUNTIME}"
118-
TVM_INFO_USE_TARGET_ONNX="${USE_TARGET_ONNX}"
119117
TVM_INFO_USE_TENSORFLOW_PATH="${USE_TENSORFLOW_PATH}"
120118
TVM_INFO_USE_TENSORRT_CODEGEN="${USE_TENSORRT_CODEGEN}"
121119
TVM_INFO_USE_TENSORRT_RUNTIME="${USE_TENSORRT_RUNTIME}"
122120
TVM_INFO_USE_TFLITE="${USE_TFLITE}"
123121
TVM_INFO_USE_THREADS="${USE_THREADS}"
124122
TVM_INFO_USE_THRUST="${USE_THRUST}"
125123
TVM_INFO_USE_CURAND="${USE_CURAND}"
126-
TVM_INFO_USE_VITIS_AI="${USE_VITIS_AI}"
127124
TVM_INFO_USE_VULKAN="${USE_VULKAN}"
128125
TVM_INFO_USE_CLML="${USE_CLML}"
129126
TVM_INFO_USE_CLML_GRAPH_EXECUTOR="${USE_CLML_GRAPH_EXECUTOR}"
130127
TVM_INFO_USE_TVM_CLML_VERSION="${CLML_VERSION_MAJOR}"
131128
TVM_INFO_USE_UMA="${USE_UMA}"
132-
TVM_INFO_USE_VERILATOR="${USE_VERILATOR}"
133129
TVM_INFO_USE_MSC="${USE_MSC}"
134130
TVM_INFO_USE_CCACHE="${USE_CCACHE}"
135131
TVM_INFO_USE_NVSHMEM="${USE_NVSHMEM}"

cmake/modules/OpenCL.cmake

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,6 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
if(USE_SDACCEL)
19-
message(STATUS "Build with SDAccel support")
20-
tvm_file_glob(GLOB RUNTIME_SDACCEL_SRCS src/runtime/opencl/sdaccel/*.cc)
21-
list(APPEND RUNTIME_SRCS ${RUNTIME_SDACCEL_SRCS})
22-
if(NOT USE_OPENCL)
23-
message(STATUS "Enable OpenCL support required for SDAccel")
24-
set(USE_OPENCL ON)
25-
endif()
26-
else()
27-
list(APPEND COMPILER_SRCS src/target/opt/build_sdaccel_off.cc)
28-
endif(USE_SDACCEL)
29-
30-
if(USE_AOCL)
31-
message(STATUS "Build with Intel FPGA SDK for OpenCL support")
32-
tvm_file_glob(GLOB RUNTIME_AOCL_SRCS src/runtime/opencl/aocl/*.cc)
33-
list(APPEND RUNTIME_SRCS ${RUNTIME_AOCL_SRCS})
34-
if(NOT USE_OPENCL)
35-
message(STATUS "Enable OpenCL support required for Intel FPGA SDK for OpenCL")
36-
set(USE_OPENCL ON)
37-
endif()
38-
else()
39-
list(APPEND COMPILER_SRCS src/target/opt/build_aocl_off.cc)
40-
endif(USE_AOCL)
41-
4218
if(USE_OPENCL)
4319
tvm_file_glob(GLOB RUNTIME_OPENCL_SRCS src/runtime/opencl/*.cc)
4420
list(APPEND COMPILER_SRCS src/target/spirv/spirv_utils.cc)

cmake/modules/contrib/ArmComputeLib.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
# which is common with arm devices, we need to be able to cross-compile
2121
# a relay graph on x86 for AArch and then run the graph on AArch.
2222
if(USE_ARM_COMPUTE_LIB)
23-
tvm_file_glob(GLOB ACL_RELAY_CONTRIB_SRC src/relay/backend/contrib/arm_compute_lib/*.cc)
2423
tvm_file_glob(GLOB ACL_RUNTIME_MODULE src/runtime/contrib/arm_compute_lib/acl_runtime.cc)
25-
list(APPEND COMPILER_SRCS ${ACL_RELAY_CONTRIB_SRC})
2624

2725
if(NOT USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR)
2826
list(APPEND COMPILER_SRCS ${ACL_RUNTIME_MODULE})

cmake/modules/contrib/ONNX.cmake

Lines changed: 0 additions & 22 deletions
This file was deleted.

cmake/modules/contrib/Verilator.cmake

Lines changed: 0 additions & 23 deletions
This file was deleted.

cmake/modules/contrib/VitisAI.cmake

Lines changed: 0 additions & 47 deletions
This file was deleted.

conftest.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,7 @@
3030
# that should be allocated to test shards in a round-robin fashion. These are
3131
# taken from the 20 (arbitrary number) of tests as from
3232
# https://ci.tlcpack.ai/job/tvm/job/main/2907/testReport
33-
_slowest_tests = [
34-
"tests/python/topi/python/test_topi_conv2d_int8.py::test_conv2d_nchw[int8]",
35-
"tests/python/topi/python/test_topi_conv2d_int8.py::test_conv2d_nchw[uint8]",
36-
"tests/python/topi/python/test_topi_upsampling.py::test_upsampling3d",
37-
"tests/python/topi/python/test_topi_upsampling.py::test_upsampling3d",
38-
"tests/python/topi/python/test_topi_conv2d_int8.py::test_conv2d_nchw[int8]",
39-
"tests/python/topi/python/test_topi_conv2d_int8.py::test_conv2d_nchw[uint8]",
40-
"tests/python/topi/python/test_topi_conv2d_NCHWc.py::test_conv2d_NCHWc",
41-
"tests/python/topi/python/test_topi_conv2d_hwnc_tensorcore.py::test_conv2d_hwnc_tensorcore",
42-
"tests/python/contrib/test_tensorrt.py::test_binary[compile]",
43-
"tests/python/topi/python/test_topi_conv2d_NCHWc.py::test_conv2d_NCHWc",
44-
"tests/python/relay/test_py_converter.py::test_global_recursion",
45-
"tests/python/relay/test_op_level6.py::test_topk",
46-
"tests/python/topi/python/test_topi_conv2d_winograd.py::test_conv2d_nchw",
47-
"tests/python/relay/test_py_converter.py::test_global_recursion",
48-
]
33+
_slowest_tests = []
4934
HARDCODED_ALLOCATIONS = {}
5035
for idx, test in enumerate(_slowest_tests):
5136
HARDCODED_ALLOCATIONS[test] = idx

docker/Dockerfile.ci_arm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ RUN bash /install/ubuntu_install_tflite.sh
7575
COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
7676
RUN bash /install/ubuntu_install_onnx.sh
7777

78-
# NNEF
79-
COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh
80-
RUN bash /install/ubuntu_install_nnef.sh
81-
8278
# AutoTVM deps
8379
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
8480
RUN bash /install/ubuntu_install_redis.sh

docker/Dockerfile.ci_cpu

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ RUN bash /install/ubuntu_install_dnnl.sh
5353
COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
5454
RUN bash /install/ubuntu_install_papi.sh ""
5555

56-
# Install MxNet for access to Gluon Model Zoo.
57-
COPY install/ubuntu_install_mxnet.sh /install/ubuntu_install_mxnet.sh
58-
RUN bash /install/ubuntu_install_mxnet.sh
59-
6056
# Rust env (build early; takes a while)
6157
COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
6258
RUN bash /install/ubuntu_install_rust.sh
@@ -77,10 +73,6 @@ COPY install/ubuntu_install_golang.sh /install/ubuntu_install_golang.sh
7773
RUN bash /install/ubuntu_install_golang.sh
7874
ENV PATH $PATH:/usr/lib/go-1.18/bin
7975

80-
# ANTLR deps
81-
COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
82-
RUN bash /install/ubuntu_install_java.sh
83-
8476
# BYODT deps
8577
COPY install/ubuntu_install_universal.sh /install/ubuntu_install_universal.sh
8678
RUN bash /install/ubuntu_install_universal.sh
@@ -101,14 +93,6 @@ RUN bash /install/ubuntu_install_jax.sh "cpu"
10193
COPY install/ubuntu_download_arm_compute_lib_binaries.sh /install/ubuntu_download_arm_compute_lib_binaries.sh
10294
RUN bash /install/ubuntu_download_arm_compute_lib_binaries.sh
10395

104-
# Vitis-AI PyXIR CI deps
105-
COPY install/ubuntu_install_vitis_ai_packages_ci.sh /install/ubuntu_install_vitis_ai_packages_ci.sh
106-
RUN bash /install/ubuntu_install_vitis_ai_packages_ci.sh
107-
108-
# PaddlePaddle deps
109-
COPY install/ubuntu_install_paddle.sh /install/ubuntu_install_paddle.sh
110-
RUN bash /install/ubuntu_install_paddle.sh
111-
11296
# sccache
11397
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
11498
RUN bash /install/ubuntu_install_sccache.sh
@@ -122,10 +106,6 @@ RUN bash /install/ubuntu_install_libxsmm.sh
122106
COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
123107
RUN bash /install/ubuntu_install_onnx.sh
124108

125-
# NNEF
126-
COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh
127-
RUN bash /install/ubuntu_install_nnef.sh
128-
129109
# AArch64 Architecture Envelope Model (AEM)
130110
COPY install/ubuntu_install_aprofile_aem.sh /install
131111
RUN bash /install/ubuntu_install_aprofile_aem.sh

0 commit comments

Comments
 (0)