Fix AMD ALPR_OCR and custom model

This commit is contained in:
2026-05-01 07:53:18 +10:00
parent e1f37ec767
commit 91efbb9a8f
25 changed files with 2841 additions and 429 deletions
+7 -3
View File
@@ -384,13 +384,17 @@ namespace ANSCENTER {
catch (const std::exception& e) {
const std::string msg = e.what();
// DML device-removal detection (see ANSONNXYOLO.cpp for details)
if (msg.find("887A0005") != std::string::npos) {
// DML fatal-error detection (887A0005 device-removed, 80004005 generic
// DML E_FAIL, branded DmlFusedNode / DmlCommandRecorder / etc.).
// See ANSCENTER::IsDmlFatalError in ANSEngineCommon.h.
if (IsDmlFatalError(msg)) {
if (!_dmlDeviceLost) {
_dmlDeviceLost = true;
_logger.LogFatal("ANSOVFD::RunInference",
"DirectML GPU device lost (887A0005) — will attempt CPU fallback on next call",
std::string("DirectML fatal error — will attempt CPU fallback on next call. msg=")
+ msg.substr(0, 256),
__FILE__, __LINE__);
ANS_DBG("ANSOVFD", "DML fatal msg=%s", msg.c_str());
}
return {};
}