From 0fd41c13d65148ebafad10162e477f148bc25742 Mon Sep 17 00:00:00 2001 From: Valery Chernov Date: Tue, 11 Jan 2022 22:34:37 +0300 Subject: [PATCH] clean build scripts #1 --- cmake/CMakeLists.txt | 2 +- cmake/onnxruntime.cmake | 2 +- cmake/onnxruntime_providers.cmake | 30 +++++++++++++++--------------- cmake/onnxruntime_python.cmake | 4 ++-- cmake/onnxruntime_unittests.cmake | 6 +++--- tools/ci_build/build.py | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 2e7c0fdbdb820..f01115b267f07 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1103,7 +1103,7 @@ endif() if (onnxruntime_USE_TVM) list(APPEND ORT_PROVIDER_FLAGS -DUSE_TVM=1) list(APPEND ORT_PROVIDER_CMAKE_FLAGS -Donnxruntime_USE_TVM=1) - list(APPEND ONNXRUNTIME_PROVIDER_NAMES stvm) + list(APPEND ONNXRUNTIME_PROVIDER_NAMES tvm) endif() if (onnxruntime_USE_WINML) list(APPEND ORT_PROVIDER_FLAGS -DUSE_WINML=1) diff --git a/cmake/onnxruntime.cmake b/cmake/onnxruntime.cmake index 5f2312216493e..435e95dcaca85 100644 --- a/cmake/onnxruntime.cmake +++ b/cmake/onnxruntime.cmake @@ -166,7 +166,7 @@ set(onnxruntime_INTERNAL_LIBRARIES ${PROVIDERS_DML} ${PROVIDERS_NNAPI} ${PROVIDERS_NUPHAR} - ${PROVIDERS_STVM} + ${PROVIDERS_TVM} ${PROVIDERS_RKNPU} ${PROVIDERS_ROCM} ${PROVIDERS_VITISAI} diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake index 6087964acaf4a..3e5cc31f78faa 100644 --- a/cmake/onnxruntime_providers.cmake +++ b/cmake/onnxruntime_providers.cmake @@ -1281,38 +1281,38 @@ if (onnxruntime_USE_TVM) endif() add_definitions(-DUSE_TVM=1) - file (GLOB_RECURSE onnxruntime_providers_stvm_cc_srcs CONFIGURE_DEPENDS + file (GLOB_RECURSE onnxruntime_providers_tvm_cc_srcs CONFIGURE_DEPENDS "${ONNXRUNTIME_ROOT}/core/providers/tvm/*.h" "${ONNXRUNTIME_ROOT}/core/providers/tvm/*.cc" ) - source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_stvm_cc_srcs}) - onnxruntime_add_static_library(onnxruntime_providers_stvm ${onnxruntime_providers_stvm_cc_srcs}) + source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_tvm_cc_srcs}) + onnxruntime_add_static_library(onnxruntime_providers_tvm ${onnxruntime_providers_tvm_cc_srcs}) if ( CMAKE_COMPILER_IS_GNUCC ) - target_compile_options(onnxruntime_providers_stvm PRIVATE -Wno-unused-parameter -Wno-missing-field-initializers) + target_compile_options(onnxruntime_providers_tvm PRIVATE -Wno-unused-parameter -Wno-missing-field-initializers) endif() - target_include_directories(onnxruntime_providers_stvm PRIVATE - ${onnxruntime_STVM_HOME}/include - ${onnxruntime_STVM_HOME}/3rdparty/dlpack/include - ${onnxruntime_STVM_HOME}/3rdparty/dmlc-core/include + target_include_directories(onnxruntime_providers_tvm PRIVATE + ${onnxruntime_TVM_HOME}/include + ${onnxruntime_TVM_HOME}/3rdparty/dlpack/include + ${onnxruntime_TVM_HOME}/3rdparty/dmlc-core/include ${PYTHON_INLCUDE_DIRS}) - onnxruntime_add_include_to_target(onnxruntime_providers_stvm onnxruntime_common onnx tvm) + onnxruntime_add_include_to_target(onnxruntime_providers_tvm onnxruntime_common onnx tvm) - add_dependencies(onnxruntime_providers_stvm ${onnxruntime_EXTERNAL_DEPENDENCIES}) + add_dependencies(onnxruntime_providers_tvm ${onnxruntime_EXTERNAL_DEPENDENCIES}) - target_link_libraries(onnxruntime_providers_stvm PRIVATE + target_link_libraries(onnxruntime_providers_tvm PRIVATE onnx tvm onnxruntime_common onnxruntime_framework ) - set_target_properties(onnxruntime_providers_stvm PROPERTIES FOLDER "ONNXRuntime") - set_target_properties(onnxruntime_providers_stvm PROPERTIES LINKER_LANGUAGE CXX) + set_target_properties(onnxruntime_providers_tvm PROPERTIES FOLDER "ONNXRuntime") + set_target_properties(onnxruntime_providers_tvm PROPERTIES LINKER_LANGUAGE CXX) - target_compile_options(onnxruntime_providers_stvm PRIVATE -Wno-error=type-limits) - target_compile_definitions(onnxruntime_providers_stvm PUBLIC DMLC_USE_LOGGING_LIBRARY=) + target_compile_options(onnxruntime_providers_tvm PRIVATE -Wno-error=type-limits) + target_compile_definitions(onnxruntime_providers_tvm PUBLIC DMLC_USE_LOGGING_LIBRARY=) install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/providers/tvm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers) endif() diff --git a/cmake/onnxruntime_python.cmake b/cmake/onnxruntime_python.cmake index 8faa2ed289f41..cc72b08d0475e 100644 --- a/cmake/onnxruntime_python.cmake +++ b/cmake/onnxruntime_python.cmake @@ -138,7 +138,7 @@ target_link_libraries(onnxruntime_pybind11_state PRIVATE onnxruntime_session ${onnxruntime_libs} ${PROVIDERS_NUPHAR} - ${PROVIDERS_STVM} + ${PROVIDERS_TVM} ${PROVIDERS_VITISAI} ${PROVIDERS_NNAPI} ${PROVIDERS_COREML} @@ -674,7 +674,7 @@ if (onnxruntime_USE_TVM) ${onnxruntime_python_providers_stvm_srcs} $/onnxruntime/providers/stvm COMMAND ${CMAKE_COMMAND} -E copy - $ + $ $/onnxruntime/capi/ COMMAND ${CMAKE_COMMAND} -E copy ${tvm_BINARY_DIR}/libtvm* diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 9bbdbb9213487..40775c0dd028b 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -495,7 +495,7 @@ set(ONNXRUNTIME_TEST_LIBS ${PROVIDERS_ACL} ${PROVIDERS_ARMNN} ${PROVIDERS_COREML} - # ${PROVIDERS_STVM} + # ${PROVIDERS_TVM} onnxruntime_optimizer onnxruntime_providers onnxruntime_util @@ -556,7 +556,7 @@ if (onnxruntime_USE_TVM) "${ONNXRUNTIME_ROOT}/test/stvm/*.cc" ) - list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_stvm) + list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_tvm) endif() if(WIN32) @@ -1288,7 +1288,7 @@ if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD endif() if (onnxruntime_USE_TVM) - # find_library(STVM_LIBS NAMES libtvm.so PATHS ${onnxruntime_STVM_HOME}/lib) + # find_library(STVM_LIBS NAMES libtvm.so PATHS ${onnxruntime_TVM_HOME}/lib) # link_directories(onnxruntime_test_all ${STVM_LIBS}) find_library(PYTHON_LIBS NAMES libpython PATHS /usr/local/lib) #target_link_libraries(onnxruntime_test_all PRIVATE ${PYTHON_LIBRARIES} -lutil) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 26a6b3925fa22..5f7503759656e 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1821,7 +1821,7 @@ def build_nuget_package(source_dir, build_dir, configs, use_cuda, use_openvino, elif use_nuphar: package_name = "/p:OrtPackageId=\"Microsoft.ML.OnnxRuntime.Nuphar\"" elif use_tvm: - package_name = "/p:OrtPackageId=\"Microsoft.ML.OnnxRuntime.Stvm\"" + package_name = "/p:OrtPackageId=\"Microsoft.ML.OnnxRuntime.Tvm\"" else: # use the solution file that includes Xamarin mobile targets sln = "OnnxRuntime.CSharp.sln"