Skip to content

Commit

Permalink
Per PR comment - revert to original behavior of always logging QNN EP…
Browse files Browse the repository at this point in the history
… events as ORT verbose. This is to preserve existing expected behavior by some customers. It also unfortunately means the only pratical method to get any QNN logs is to fully set the level to VERBOSE
  • Loading branch information
ivberg committed May 29, 2024
1 parent 7fdf2f5 commit 2425567
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,29 +234,13 @@ void QnnLogging(const char* format,
QnnLog_Level_t level,
uint64_t timestamp,
va_list argument_parameter) {
ORT_UNUSED_PARAMETER(level);
ORT_UNUSED_PARAMETER(timestamp);

const auto& logger = ::onnxruntime::logging::LoggingManager::DefaultLogger();
const auto severity = ::onnxruntime::logging::Severity::kVERBOSE;
const auto data_type = ::onnxruntime::logging::DataType::SYSTEM;

::onnxruntime::logging::Severity severity;
switch (level) {
case QNN_LOG_LEVEL_ERROR:
severity = ::onnxruntime::logging::Severity::kERROR;
break;
case QNN_LOG_LEVEL_WARN:
severity = ::onnxruntime::logging::Severity::kWARNING;
break;
case QNN_LOG_LEVEL_INFO:
severity = ::onnxruntime::logging::Severity::kINFO;
break;
case QNN_LOG_LEVEL_VERBOSE:
case QNN_LOG_LEVEL_DEBUG: // Treat DEBUG as VERBOSE in ORT
default:
severity = ::onnxruntime::logging::Severity::kVERBOSE;
break;
}

if (logger.OutputIsEnabled(severity, data_type)) {
::onnxruntime::logging::Capture(logger,
severity,
Expand Down

0 comments on commit 2425567

Please sign in to comment.