[OpenVINO-EP] Fixes OpenVINO-EP build on windows (#6726)

* Fixes OpenVINO-EP windows build

Openvino EP build is broken on windows. The issue
is wchar_t is UTF-16 on windows while on other platforms
such as Linux and MacOS, wchar_t is UTF-32.

so wide Unicode string has to be converted to an UTF8 string
for sure on windows.

This commit fixes this issue.
This commit is contained in:
Maajid khan 2021-02-18 03:19:03 +05:30 committed by GitHub
parent 9a9202a218
commit b41e9b5d4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,12 @@ OnnxRuntimeTestSession::OnnxRuntimeTestSession(Ort::Env& env, std::random_device
std::string device_id = ""; // [enable_vpu_fast_compile]: Fast-compile may be optionally enabled to speeds up the model's compilation to VPU device specific format.
size_t num_of_threads = 8; // [num_of_threads]: Overrides the accelerator default value of number of threads with this value at runtime.
std::istringstream ss(performance_test_config.run_config.ep_runtime_config_string);
#ifdef _MSC_VER
std::string ov_string = ToMBString(performance_test_config.run_config.ep_runtime_config_string);
#else
std::string ov_string = performance_test_config.run_config.ep_runtime_config_string;
#endif
std::istringstream ss(ov_string);
std::string token;
while (ss >> token) {
if(token == "") {