Log error caused by NPU SSR. (#20356)

### Description
Log error caused by NPU SSR.
This commit is contained in:
Hector Li 2024-04-17 18:27:45 -07:00 committed by GitHub
parent ccaa4d1db2
commit 301240433c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -287,6 +287,12 @@ Status QnnModel::ExecuteGraph(const Ort::KernelContext& context) {
ORT_RETURN_IF_ERROR(qnn_backend_manager_->ExtractBackendProfilingInfo());
}
if (QNN_COMMON_ERROR_SYSTEM_COMMUNICATION == execute_status) {
auto error_message = "NPU crashed. SSR detected. Caused QNN graph execute error. Error code: ";
LOGS(logger_, ERROR) << error_message << execute_status;
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, error_message, execute_status);
}
if (QNN_GRAPH_NO_ERROR != execute_status) {
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "QNN graph execute error. Error code: ", execute_status);
}