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,6 +1,7 @@
#include "ANSYOLOOD.h"
#include "Utility.h"
#include "EPLoader.h"
#include "OpenVINODeviceConfig.h"
#include "ANSGpuFrameRegistry.h"
#include "NV12PreprocessHelper.h" // tl_currentGpuFrame()
#ifdef USEONNXOV
@@ -303,20 +304,26 @@ namespace ANSCENTER
const std::string numberOfThreads = "8";
const std::string numberOfStreams = "8";
std::vector<std::unordered_map<std::string, std::string>> try_configs = {
{ {"device_type","AUTO:NPU,GPU"}, {"precision",precision},
{"num_of_threads",numberOfThreads}, {"num_streams",numberOfStreams},
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} },
std::vector<std::unordered_map<std::string, std::string>> try_configs;
// NPU gated by OPENVINO_ENABLE_NPU — see OpenVINODeviceConfig.h
if (IsOpenVINONpuEnabled()) {
try_configs.push_back(
{ {"device_type","AUTO:NPU,GPU"}, {"precision",precision},
{"num_of_threads",numberOfThreads}, {"num_streams",numberOfStreams},
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} });
}
try_configs.push_back(
{ {"device_type","GPU.0"}, {"precision",precision},
{"num_of_threads",numberOfThreads}, {"num_streams",numberOfStreams},
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} },
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} });
try_configs.push_back(
{ {"device_type","GPU.1"}, {"precision",precision},
{"num_of_threads",numberOfThreads}, {"num_streams",numberOfStreams},
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} },
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} });
try_configs.push_back(
{ {"device_type","AUTO:GPU,CPU"}, {"precision",precision},
{"num_of_threads",numberOfThreads}, {"num_streams",numberOfStreams},
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} }
};
{"enable_opencl_throttling","False"}, {"enable_qdq_optimizer","True"} });
for (const auto& config : try_configs) {
try {