mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
### Description Fix build failure introduced by #20920
This commit is contained in:
parent
83e0c6b96e
commit
4a7eaff1d9
1 changed files with 3 additions and 3 deletions
|
|
@ -123,11 +123,11 @@ static std::string config_to_json_str(const onnxruntime::ProviderOptions& config
|
|||
vaip_core::DllSafe<std::vector<std::unique_ptr<vaip_core::ExecutionProvider>>> 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<wchar_t>;
|
||||
std::wstring_convert<convert_t, wchar_t> 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<onnxruntime::Model&>(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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue