Enable log information. Disable NPU in U9
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <json.hpp>
|
||||
#include "ANSODEngine.h"
|
||||
#include "ANSLicense.h" // ANS_DBG macro
|
||||
#include "OpenVINODeviceConfig.h"
|
||||
#include "ANSYOLOOD.h"
|
||||
#include "ANSTENSORRTOD.h"
|
||||
#include "ANSTENSORRTCL.h"
|
||||
@@ -354,8 +355,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));
|
||||
|
||||
Reference in New Issue
Block a user