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,5 +1,6 @@
#include "ANSOPENVINOCL.h"
#include "Utility.h"
#include "OpenVINODeviceConfig.h"
namespace ANSCENTER
{
bool OPENVINOCL::OptimizeModel(bool fp16, std::string& optimizedModelFolder) {
@@ -369,8 +370,10 @@ namespace ANSCENTER
std::vector<std::string> available_devices = core.get_available_devices();
bool device_found = false;
// 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));