Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

Enable NPU plugin in Android (#33729)

Jozef Wludzik7d8b3a1312aa
diff --git a/cmake/features.cmake b/cmake/features.cmake
index 1adbadaa23c..2a8b88025c0 100644
--- a/cmake/features.cmake
+++ b/cmake/features.cmake
@@ -43,7 +43,7 @@ endif()
ov_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF)
-ov_dependent_option (ENABLE_INTEL_NPU "NPU plugin for OpenVINO runtime" ON "X86_64;WIN32 OR LINUX" OFF)
+ov_dependent_option (ENABLE_INTEL_NPU "NPU plugin for OpenVINO runtime" ON "X86_64;WIN32 OR LINUX OR ANDROID" OFF)
ov_dependent_option (ENABLE_INTEL_NPU_INTERNAL "NPU plugin internal components for OpenVINO runtime" ON "ENABLE_INTEL_NPU" OFF)
ov_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)
diff --git a/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp b/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp
index 5d630daaa59..d21197a24c2 100644
--- a/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp
+++ b/src/plugins/intel_npu/tests/functional/behavior/ov_plugin/core_integration.hpp
@@ -474,7 +474,7 @@ TEST_P(OVClassBasicTestPNPU, smoke_registerPluginsLibrariesUnicodePath) {
ov::util::make_plugin_library_name(::ov::util::wstring_to_string(unicode_path), lib));
bool is_copy_successfully = ov::test::utils::copyFile(libPath, libPathNew);
if (!is_copy_successfully) {
- FAIL() << "Unable to copy from '" << libPath << "' to '" << libPathNew << "'";
+ FAIL() << "Unable to copy from '" << libPath.c_str() << "' to '" << libPathNew.c_str() << "'";
}
}
diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake
index 053006c031a..14ee8f56efe 100644
--- a/thirdparty/dependencies.cmake
+++ b/thirdparty/dependencies.cmake
@@ -449,12 +449,16 @@ if(ENABLE_OV_TF_LITE_FRONTEND OR ENABLE_INTEL_NPU)
add_subdirectory(thirdparty/flatbuffers EXCLUDE_FROM_ALL)
if(ENABLE_INTEL_NPU)
# NPU plugin requires flatbuffers to be built always
- add_custom_target(npu_compiler_flatbuffers ALL DEPENDS flatbuffers flatc)
+ add_custom_target(npu_compiler_flatbuffers ALL DEPENDS flatbuffers ${flatbuffers_DEPENDENCY})
set(flatbuffers_root "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flatbuffers/flatbuffers")
ov_developer_package_export_targets(TARGET flatbuffers
INSTALL_INCLUDE_DIRECTORIES "${flatbuffers_root}/include/")
ov_developer_package_export_targets(TARGET ProjectConfig)
- install(TARGETS flatc DESTINATION "developer_package/bin" COMPONENT developer_package EXCLUDE_FROM_ALL)
+ install(FILES ${flatbuffers_COMPILER} DESTINATION "developer_package/bin" COMPONENT developer_package EXCLUDE_FROM_ALL)
+ if (CMAKE_CROSSCOMPILING)
+ # NPU compiler requires flatbuffers and flatc defined as target
+ add_executable(flatc ALIAS flatbuffers::flatc)
+ endif()
endif()
endif()