Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 committed Jul 23, 2024
1 parent 69901a8 commit ef2fb77
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Status QnnBackendManager::InitializeQnnLog() {
}
}

ORT_RETURN_IF(QNN_BACKEND_NO_ERROR != result, "Failed to initialize logging in the QNN backend");
ORT_RETURN_IF(QNN_BACKEND_NO_ERROR != result, "Failed to initialize logging in the QNN backend. Error: ", QnnErrorHandleToString(result));
return Status::OK();
}

Expand Down Expand Up @@ -320,7 +320,7 @@ Status QnnBackendManager::UpdateQnnLogLevel(logging::Severity ort_log_level) {
LOGS(*logger_, ERROR) << "Invalid log handle provided to QnnLog_setLogLevel.";
}
}
ORT_RETURN_IF(QNN_BACKEND_NO_ERROR != result, "Failed to set log level in Qnn backend");
ORT_RETURN_IF(QNN_BACKEND_NO_ERROR != result, "Failed to set log level in Qnn backend. Error: ", QnnErrorHandleToString(result));
return Status::OK();
}

Expand Down Expand Up @@ -566,7 +566,7 @@ std::unique_ptr<unsigned char[]> QnnBackendManager::GetContextBinaryBuffer(uint6
// Generate all graphs in one single context
Qnn_ErrorHandle_t rt = qnn_interface_.contextGetBinarySize(contexts_[0], &required_buffer_size);
if (QNN_CONTEXT_NO_ERROR != rt) {
LOGS(*logger_, ERROR) << "Failed to get QNN context binary size. Error code: " << rt;
LOGS(*logger_, ERROR) << "Failed to get QNN context binary size. Error: " << QnnErrorHandleToString(rt);
return nullptr;
}

Expand All @@ -581,7 +581,7 @@ std::unique_ptr<unsigned char[]> QnnBackendManager::GetContextBinaryBuffer(uint6
required_buffer_size,
&written_buffer_size);
if (QNN_CONTEXT_NO_ERROR != rt) {
LOGS(*logger_, ERROR) << "Failed to get context binary.";
LOGS(*logger_, ERROR) << "Failed to get context binary. Error: " << QnnErrorHandleToString(rt);
return nullptr;
}

Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/qnn/builder/qnn_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ Status QnnModel::DeserializeGraphInfoFromBinaryInfo(const QnnSystemContext_Graph
}
Qnn_GraphHandle_t graph;
auto qnn_interface = qnn_backend_manager_->GetQnnInterface();
auto rt = qnn_interface.graphRetrieve(context, graph_name.c_str(), &graph);
ORT_RETURN_IF(QNN_SUCCESS != rt, "Failed to retrieve QNN graph.");
Qnn_ErrorHandle_t rt = qnn_interface.graphRetrieve(context, graph_name.c_str(), &graph);
ORT_RETURN_IF(QNN_SUCCESS != rt, "Failed to retrieve QNN graph. Error: ", QnnErrorHandleToString(rt));

graph_info_ = std::make_unique<GraphInfo>(graph,
graph_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool QnnModelWrapper::CreateQnnGraph(const Qnn_ContextHandle_t& context,
if (rt != QNN_GRAPH_NO_ERROR || graph_ == nullptr) {
rt = qnn_interface_.graphRetrieve(context, graph_name_.c_str(), &graph_);
if (rt != QNN_GRAPH_NO_ERROR || graph_ == nullptr) {
LOGS(logger_, ERROR) << "Failed to create Qnn graph: " << graph_name;
LOGS(logger_, ERROR) << "Failed to create Qnn graph: " << graph_name << " Error: " << QnnErrorHandleToString(rt);
return false;
}
}
Expand Down

0 comments on commit ef2fb77

Please sign in to comment.