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

Compilation OpenVINO EP does not work on macOS #19217

Open
ilya-lavrenov opened this issue Jan 22, 2024 · 4 comments · May be fixed by #20053
Open

Compilation OpenVINO EP does not work on macOS #19217

ilya-lavrenov opened this issue Jan 22, 2024 · 4 comments · May be fixed by #20053
Assignees
Labels
ep:OpenVINO issues related to OpenVINO execution provider platform:mobile issues related to ONNX Runtime mobile; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@ilya-lavrenov
Copy link
Contributor

ilya-lavrenov commented Jan 22, 2024

Extracted from #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

if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD
AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS"
AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android"
AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
file(GLOB onnxruntime_providers_shared_cc_srcs CONFIGURE_DEPENDS
"${ONNXRUNTIME_ROOT}/core/providers/shared/*.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/*.cc"
)
source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_shared_cc_srcs})
onnxruntime_add_shared_library(onnxruntime_providers_shared ${onnxruntime_providers_shared_cc_srcs} "${ONNXRUNTIME_ROOT}/core/dll/onnxruntime.rc")

But used unconditionally in OpenVINO EP and (likely) other provides:

add_dependencies(onnxruntime_providers_openvino onnxruntime_providers_shared ${onnxruntime_EXTERNAL_DEPENDENCIES})
target_include_directories(onnxruntime_providers_openvino SYSTEM PUBLIC ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${OpenVINO_INCLUDE_DIR} ${OPENVINO_INCLUDE_DIR_LIST} ${PYTHON_INCLUDE_DIRS} $ENV{OPENCL_INCS} $ENV{OPENCL_INCS}/../../cl_headers/)
target_link_libraries(onnxruntime_providers_openvino ${ONNXRUNTIME_PROVIDERS_SHARED} Boost::mp11 ${OPENVINO_LIB_LIST} ${ABSEIL_LIBS})

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

@github-actions github-actions bot added ep:OpenVINO issues related to OpenVINO execution provider platform:mobile issues related to ONNX Runtime mobile; typically submitted using template labels Jan 22, 2024
Copy link
Contributor

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 github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Feb 21, 2024
@nfazekas
Copy link

nfazekas commented Mar 8, 2024

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

@jywu-msft
Copy link
Member

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

@jywu-msft
Copy link
Member

+@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?

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 platform:mobile issues related to ONNX Runtime mobile; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants