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 "ANSOVSEG.h"
#include "OpenVINODeviceConfig.h"
namespace ANSCENTER {
bool ANSOVSEG::OptimizeModel(bool fp16, std::string& optimizedModelFolder) {
std::lock_guard<std::recursive_mutex> lock(_mutex);
@@ -493,8 +494,11 @@ namespace ANSCENTER {
ov::Core core;
// Step 2: Get Available Devices and Log
std::vector<std::string> available_devices = core.get_available_devices();
// Define device priority: NPU > GPU > CPU
std::vector<std::string> priority_devices = { "NPU", "GPU" };
// Define device priority: NPU > GPU > CPU. NPU gated by
// OPENVINO_ENABLE_NPU — see OpenVINODeviceConfig.h.
std::vector<std::string> priority_devices;
if (IsOpenVINONpuEnabled()) priority_devices.push_back("NPU");
priority_devices.push_back("GPU");
bool device_found = false;
// Iterate over prioritized devices