Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on Windows 10 using OpenVino 2024.3 & 2024.4 both. #22314

Open
prashant-saxena opened this issue Oct 4, 2024 · 3 comments
Open
Labels
ep:OpenVINO issues related to OpenVINO execution provider

Comments

@prashant-saxena
Copy link

Describe the issue

Processor Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz, 1800 Mhz, 4 Core(s), 8 Logical Processor(s)
GPU Intel UHD Graphics 620
CMake 3.30.4

Build fail on windows using openvino 2024.3 & 2024.4

Urgency

Nope

Target platform

Windows 10 x64

Build script

  1. git clone --recursive https://github.com/Microsoft/onnxruntime.git
  2. cd onnxruntime
  3. python 3.10.0 virtual environment installed
  4. OpenVino 2024.3 / 2024.4 setupvars.bat executed before trying each package.
  5. python -m pip install cmake

Build command

build.bat --config Release --use_openvino HETERO:GPU,CPU --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync --skip_tests

Error / output

With OpenVino 2024.3

...
...
  provider_ort_api_init.cc
  provider_bridge_provider.cc
  my_allocator.cc
  my_ep_data_transfer.cc
  my_ep_factory.cc
  my_execution_provider.cc
Creating library D:/projects/onnxruntime/build/Windows/Release/Release/test_execution_provider.lib and object D:/p
  rojects/onnxruntime/build/Windows/Release/Release/test_execution_provider.exp
  test_execution_provider.vcxproj -> D:\projects\onnxruntime\build\Windows\Release\Release\test_execution_provider.dll
Traceback (most recent call last):
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 2972, in <module>
    sys.exit(main())
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 2862, in main
    build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 1730, in build_targets
    run_subprocess(cmd_args, env=env)
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 865, in run_subprocess
    return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
  File "D:\projects\onnxruntime\tools\python\util\run.py", line 49, in run
    completed_process = subprocess.run(
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['D:\\projects\\onnxruntime\\.venv\\Scripts\\cmake.EXE', '--build', 'D:\\projects\\onnxruntime\\\\build\\Windows\\Release', '--config', 'Release', '--', '/maxcpucount:8', '/p:CL_MPCount=7', '/nodeReuse:False']' returned non-zero exit status 1.

With OpenVino 2024.4

<char>,std::allocator<char>>::operator =(const _StringViewIsh &)': could not deduce template argument for '__formal'
              C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\xstring(599,9):
              'std::enable_if_t<false,int>' : Failed to specialize alias template
      D:\projects\onnxruntime\onnxruntime\core\providers\openvino\openvino_execution_provider.h(145,7):
      while trying to match the argument list '(const std::string, const char [15])'

Traceback (most recent call last):
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 2972, in <module>
    sys.exit(main())
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 2862, in main
    build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 1730, in build_targets
    run_subprocess(cmd_args, env=env)
  File "D:\projects\onnxruntime\tools\ci_build\build.py", line 865, in run_subprocess
    return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
  File "D:\projects\onnxruntime\tools\python\util\run.py", line 49, in run
    completed_process = subprocess.run(
  File "subprocess.py", line 524, in run
subprocess.CalledProcessError: Command '['D:\\projects\\onnxruntime\\.venv\\Scripts\\cmake.EXE', '--build', 'D:\\projects\\onnxruntime\\\\build\\Windows\\Release', '--config', 'Release', '--', '/maxcpucount:8', '/p:CL_MPCount=7', '/nodeReuse:False']' returned non-zero exit status 1.

Visual Studio Version

17.11.4

GCC / Compiler Version

No response

@prashant-saxena prashant-saxena added the build build issues; typically submitted using template label Oct 4, 2024
@github-actions github-actions bot added platform:windows issues related to the Windows platform ep:OpenVINO issues related to OpenVINO execution provider labels Oct 4, 2024
@edgchen1
Copy link
Contributor

Can you provide the full error message and the onnxruntime commit that you're using?

@prashant-saxena
Copy link
Author

commit : d0ddfa9
The problem is solved with these three changes:

  1. Change in onnxruntime\onnxruntime\core\providers\openvino\openvino_execution_provider.h
from
explicit OpenVINOExecutionProviderInfo(const std::string& dev_type
to
explicit OpenVINOExecutionProviderInfo(std::string& dev_type
  1. --config MinSizeRel
  2. The resulting onnxruntime_providers_openvino.dll was having a dependency on
openvino_2024.4.0\runtime\bin\intel64\Debug\openvinod.dll (debug version)

because internally it's using

openvino_2024.4.0\runtime\cmake\OpenVINOTargets-debug.cmake instead of release.

Even after passing --skip_tests & --skip_onnx_tests, the build process is creating all the tests.

@edgchen1
Copy link
Contributor

#21443 updated the signature of the OpenVINOExecutionProviderInfo ctor. It changed dev_type from std::string to const std::string&.

explicit OpenVINOExecutionProviderInfo(const std::string& dev_type, const std::string& precision,

However, dev_type is assigned to in this code path, so it cannot be const std::string&.

FYI @jywu-msft and @preetha-intel

@snnn snnn removed build build issues; typically submitted using template platform:windows issues related to the Windows platform labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:OpenVINO issues related to OpenVINO execution provider
Projects
None yet
Development

No branches or pull requests

3 participants