From 4a7eaff1d9cd572819f8eb857a21ef50a57ba0c4 Mon Sep 17 00:00:00 2001 From: zz002 Date: Mon, 8 Jul 2024 20:44:30 +0800 Subject: [PATCH] [vitisai] Fix build failure introduced by #20920 (#21247) ### Description Fix build failure introduced by #20920 --- onnxruntime/core/providers/vitisai/imp/global_api.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/providers/vitisai/imp/global_api.cc b/onnxruntime/core/providers/vitisai/imp/global_api.cc index 1133751d82d65..e9ae93ded40c7 100644 --- a/onnxruntime/core/providers/vitisai/imp/global_api.cc +++ b/onnxruntime/core/providers/vitisai/imp/global_api.cc @@ -123,11 +123,11 @@ static std::string config_to_json_str(const onnxruntime::ProviderOptions& config vaip_core::DllSafe>> compile_onnx_model( const onnxruntime::GraphViewer& graph_viewer, const logging::Logger& logger, const ProviderOptions& options) { #ifndef _WIN32 - auto model_path = graph_viewer.ModelPath().ToPathString(); + auto model_path = graph_viewer.ModelPath().string(); #else using convert_t = std::codecvt_utf8; std::wstring_convert strconverter; - auto model_path = strconverter.to_bytes(graph_viewer.ModelPath().ToPathString()); + auto model_path = strconverter.to_bytes(graph_viewer.ModelPath().string()); #endif if (s_library_vitisaiep.compile_onnx_model_with_options) { return vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_with_options(model_path, graph_viewer.GetGraph(), options)); @@ -218,7 +218,7 @@ vaip_core::OrtApiForVaip* create_org_api_hook() { auto& logger = logging::LoggingManager::DefaultLogger(); auto& model = const_cast(const_model); auto model_proto = model.ToProto(); - auto file_path = model.MainGraph().ModelPath().ToPathString(); + auto file_path = model.MainGraph().ModelPath().string(); auto local_registries = IOnnxRuntimeOpSchemaRegistryList{model.MainGraph().GetSchemaRegistry()}; auto ret = Model::Create(std::move(*model_proto), file_path, &local_registries, logger); auto status = ret->MainGraph().Resolve();