mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
### Description In the TVM EP, this adds more entries to the conversion from `ONNXTensorElementDataType` to `DLDataType`. Additionally, it removes an unused function and updates the TVM revision to allow running models from recent revisions of TVM. ### Motivation and Context In the TVM EP, the mapping from `ONNXTensorElementDataType` to `DLDataType` was incomplete and neglected several integer types (in particular `ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8` and `ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8`) which prevented some models from running. Co-authored-by: Peter Salas <psalas@octoml.ai>
24 lines
No EOL
653 B
CMake
24 lines
No EOL
653 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 2379917985919ed3918dc12cad47f469f245be7a
|
|
)
|
|
|
|
FetchContent_GetProperties(tvm)
|
|
if(NOT tvm_POPULATED)
|
|
FetchContent_Populate(tvm)
|
|
if (WIN32)
|
|
execute_process(
|
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${tvm_BINARY_DIR}/${CMAKE_BUILD_TYPE} ${tvm_SOURCE_DIR}/build
|
|
)
|
|
else()
|
|
file(CREATE_LINK ${tvm_BINARY_DIR} ${tvm_SOURCE_DIR}/build SYMBOLIC)
|
|
endif()
|
|
endif()
|
|
|
|
set(tvm_INCLUDE_DIRS ${tvm_SOURCE_DIR}/include)
|
|
|
|
endif() |