From ccb708c6ae19e6be3d46f67864c76c7c1cff1550 Mon Sep 17 00:00:00 2001 From: Yueqing Zhang Date: Fri, 26 Jan 2024 10:47:14 +0800 Subject: [PATCH] 1. fix dependency error 2. add two additional data type --- cmake/onnxruntime_providers_vitisai.cmake | 2 +- onnxruntime/core/session/provider_bridge_ort.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/onnxruntime_providers_vitisai.cmake b/cmake/onnxruntime_providers_vitisai.cmake index e72f4a9c4b4cf..183a3e196af42 100644 --- a/cmake/onnxruntime_providers_vitisai.cmake +++ b/cmake/onnxruntime_providers_vitisai.cmake @@ -19,7 +19,7 @@ ) source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_vitisai_cc_srcs}) onnxruntime_add_shared_library(onnxruntime_providers_vitisai ${onnxruntime_providers_vitisai_cc_srcs}) - onnxruntime_add_include_to_target(onnxruntime_providers_vitisai ${ONNXRUNTIME_PROVIDERS_SHARED} nlohmann_json::nlohmann_json safeint_interface) + onnxruntime_add_include_to_target(onnxruntime_providers_vitisai ${ONNXRUNTIME_PROVIDERS_SHARED} nlohmann_json::nlohmann_json safeint_interface flatbuffers::flatbuffers) target_link_libraries(onnxruntime_providers_vitisai PRIVATE ${ONNXRUNTIME_PROVIDERS_SHARED}) if(MSVC) onnxruntime_add_include_to_target(onnxruntime_providers_vitisai dbghelp) diff --git a/onnxruntime/core/session/provider_bridge_ort.cc b/onnxruntime/core/session/provider_bridge_ort.cc index 0135eabb90fb4..92777adcd55aa 100644 --- a/onnxruntime/core/session/provider_bridge_ort.cc +++ b/onnxruntime/core/session/provider_bridge_ort.cc @@ -606,6 +606,10 @@ struct ProviderHostImpl : ProviderHost { elemType = ONNX_NAMESPACE::TensorProto_DataType_BFLOAT16; } else if (data_type->s() == "float16") { elemType = ONNX_NAMESPACE::TensorProto_DataType_FLOAT16; + } else if (data_type->s() == "uint16") { + elemType = ONNX_NAMESPACE::TensorProto_DataType_UINT16; + } else if (data_type->s() == "int16") { + elemType = ONNX_NAMESPACE::TensorProto_DataType_INT16; } else { return; }