onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

Compilation OpenVINO EP does not work on macOS

Open ilya-lavrenov opened this issue 1 year ago • 1 comments
trafficstars

Extracted from https://github.com/microsoft/onnxruntime/issues/19191

I have the same thing when I use cmake -Donnxruntime_USE_OPENVINO=ON -Donnxruntime_ENABLE_PYTHON=ON on macOS:

-- Configuring done (2.0s)
CMake Error at onnxruntime_python.cmake:876 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:onnxruntime_providers_shared>

  No target "onnxruntime_providers_shared"
Call Stack (most recent call first):
  CMakeLists.txt:1722 (include)


CMake Error at onnxruntime_providers_openvino.cmake:44 (add_dependencies):
  The dependency target "onnxruntime_providers_shared" of target
  "onnxruntime_providers_openvino" does not exist.
Call Stack (most recent call first):
  onnxruntime_providers.cmake:144 (include)
  CMakeLists.txt:1722 (include)


CMake Error at onnxruntime_python.cmake:876 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:onnxruntime_providers_shared>

  No target "onnxruntime_providers_shared"
Call Stack (most recent call first):
  CMakeLists.txt:1722 (include)


CMake Error at onnxruntime_python.cmake:876 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_FILE:onnxruntime_providers_shared>

  No target "onnxruntime_providers_shared"
Call Stack (most recent call first):
  CMakeLists.txt:1722 (include)

We can see that onnxruntime_providers_shared is not created for macOS https://github.com/microsoft/onnxruntime/blob/f3402de01e732283283aaa208022d6c7ae85ca4a/cmake/onnxruntime_providers_cpu.cmake#L225-L235

But used unconditionally in OpenVINO EP and (likely) other provides: https://github.com/microsoft/onnxruntime/blob/f3402de01e732283283aaa208022d6c7ae85ca4a/cmake/onnxruntime_providers_openvino.cmake#L48-L50

Similarly, onnxruntime_providers_shared unconditionally used in onnxruntime_java.cmake, onnxruntime_dnnl.cmake and other places.

ilya-lavrenov avatar Jan 22 '24 06:01 ilya-lavrenov

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

github-actions[bot] avatar Feb 21 '24 15:02 github-actions[bot]

I have the same issue, I was trying to build onnxruntime with openvino on macOS. ./build.sh --config RelWithDebInfo --use_openvino GPU_FP32 --build_shared_lib --build_wheel

nfazekas avatar Mar 08 '24 11:03 nfazekas

@ryanunderhill , any idea why onnxruntime_providers_shared isn't created on MacOS? It should be supported for all platforms?

jywu-msft avatar Mar 25 '24 02:03 jywu-msft

+@sfatimar , @preetha-intel I recall that OpenVINO EP explicitly did not support MacOS. perhaps it is time to revisit since native OpenVINO does support it?

jywu-msft avatar Mar 25 '24 02:03 jywu-msft