Enable log information. Disable NPU in U9
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user