openvino: enable npu/gpu support

CPU/NPU support only exists in Intel CPUs, but Intel GPUs can very well
be used on aarch64-linux platforms.

NPU previously failed to build, but after a recent opencv fix this became
possible.
This commit is contained in:
Martin Weinelt
2025-02-28 18:38:52 +01:00
parent 6421090605
commit 3fb6f4fe9a
+4 -3
View File
@@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
"-Wno-dev"
"-DCMAKE_MODULE_PATH:PATH=${placeholder "out"}/lib/cmake"
"-DCMAKE_PREFIX_PATH:PATH=${placeholder "out"}"
"-DOpenCV_DIR=${opencv}/lib/cmake/opencv4/"
"-DOpenCV_DIR=${lib.getLib opencv}/lib/cmake/opencv4/"
"-DProtobuf_LIBRARIES=${protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}"
"-DPython_EXECUTABLE=${python.interpreter}"
@@ -117,7 +117,8 @@ stdenv.mkDerivation rec {
# features
(cmakeBool "ENABLE_INTEL_CPU" stdenv.hostPlatform.isx86_64)
(cmakeBool "ENABLE_INTEL_NPU" false) # undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32'
(cmakeBool "ENABLE_INTEL_GPU" true)
(cmakeBool "ENABLE_INTEL_NPU" stdenv.hostPlatform.isx86_64)
(cmakeBool "ENABLE_JS" false)
(cmakeBool "ENABLE_LTO" true)
(cmakeBool "ENABLE_ONEDNN_FOR_GPU" false)
@@ -148,7 +149,7 @@ stdenv.mkDerivation rec {
libusb1
libxml2
ocl-icd
opencv.cxxdev
opencv
pugixml
snappy
tbb_2022_0