onnxruntime/cmake/external/tvm.cmake
Valery Chernov 625a1f7673
[TVM EP] code refactor (#10655)
* rename info to options for TVM EP

* transfer options processing from TVMExecutionProvider to TVMEPOptions

* transfer TVMRunner to separated files

* implement TVMCompiler class

* replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider

* correct logging of TVM EP options

* RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented

* add prepareComputeInfo method

* remove update_output_shapes flag

* embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner

* refactor compileModel method

* small cleaning

* separate TVM EP options data store and processing

* replace TvmTensorShape by InlinedVector with max_size 5

* correct indentation

* update TVM hash

Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
2022-03-16 13:55:04 +01:00

36 lines
No EOL
903 B
CMake

if (onnxruntime_USE_TVM)
message(STATUS "onnxruntime_USE_TVM: Fetch tvm for TVM EP")
FetchContent_Declare(
tvm
GIT_REPOSITORY https://github.com/apache/tvm.git
GIT_TAG ffd5f70370642c909222f9a4cae8400023dacbdc
)
FetchContent_GetProperties(tvm)
if(NOT tvm_POPULATED)
FetchContent_Populate(tvm)
file(CREATE_LINK ${tvm_BINARY_DIR} ${tvm_SOURCE_DIR}/build SYMBOLIC)
endif()
set(tvm_INCLUDE_DIRS ${tvm_SOURCE_DIR}/include)
endif()
if (onnxruntime_USE_NUPHAR)
message(STATUS "onnxruntime_USE_NUPHAR: Fetch onnxruntime-tvm for NUPHAR EP")
FetchContent_Declare(
tvm
GIT_REPOSITORY https://github.com/microsoft/onnxruntime-tvm.git
GIT_TAG 9ec2b92d180dff8877e402018b97baa574031b8b
)
FetchContent_GetProperties(tvm)
if(NOT tvm_POPULATED)
FetchContent_Populate(tvm)
endif()
set(tvm_INCLUDE_DIRS ${tvm_SOURCE_DIR}/include)
endif()