Enable log information. Disable NPU in U9

This commit is contained in:
2026-04-21 15:48:27 +10:00
parent 00f6e2f852
commit 97d814936d
18 changed files with 301 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
#include "ANSLPR_CPU.h"
#include "OpenVINODeviceConfig.h"
#include "ANSYOLOV10OVOD.h"
#include "ANSOPENVINOOD.h"
#include "ANSTENSORRTOD.h"
@@ -119,8 +120,10 @@ namespace ANSCENTER {
std::vector<std::string> available_devices = _core.get_available_devices();
bool device_found = false;
std::string deviceName = "CPU";
// Search for NPU
auto it = std::find(available_devices.begin(), available_devices.end(), "NPU");
// Search for NPU (gated by OPENVINO_ENABLE_NPU — see OpenVINODeviceConfig.h)
auto it = IsOpenVINONpuEnabled()
? std::find(available_devices.begin(), available_devices.end(), "NPU")
: available_devices.end();
if (it != available_devices.end()) {
_core.set_property("NPU", ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY));
_core.set_property("GPU", ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY));