Enable log information. Disable NPU in U9
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "ANSFR.h"
|
||||
#include "OpenVINODeviceConfig.h"
|
||||
#include <opencv2/imgcodecs.hpp>
|
||||
#include "ANSOVFaceDetector.h"
|
||||
#include "SCRFDFaceDetector.h"
|
||||
@@ -2695,8 +2696,12 @@ namespace ANSCENTER {
|
||||
for (const auto& d : available_devices) {
|
||||
ANS_DBG("ANSFR", " OpenVINO device: %s", d.c_str());
|
||||
}
|
||||
// Prioritize devices: NPU > GPU > CPU
|
||||
std::vector<std::string> priority_devices = { "NPU","GPU","CPU" };
|
||||
// Prioritize devices: NPU > GPU > CPU. NPU gated behind runtime switch
|
||||
// (OPENVINO_ENABLE_NPU=1) — see OpenVINODeviceConfig.h.
|
||||
std::vector<std::string> priority_devices;
|
||||
if (IsOpenVINONpuEnabled()) priority_devices.push_back("NPU");
|
||||
priority_devices.push_back("GPU");
|
||||
priority_devices.push_back("CPU");
|
||||
for (const auto& device : priority_devices) {
|
||||
if (std::find(available_devices.begin(), available_devices.end(), device) != available_devices.end()) {
|
||||
ANS_DBG("ANSFR", "GetOpenVINODevice: selected %s", device.c_str());
|
||||
|
||||
Reference in New Issue
Block a user