Fix AMD ALPR_OCR and custom model
This commit is contained in:
@@ -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 {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user