From 24255674f73922575bf0f36ebd525ec683ef4395 Mon Sep 17 00:00:00 2001 From: Ivan Berg Date: Wed, 29 May 2024 11:14:00 -0700 Subject: [PATCH] Per PR comment - revert to original behavior of always logging QNN EP 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 --- .../qnn/builder/qnn_backend_manager.cc | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc b/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc index 75ddc1b162759..3826efc781a4f 100644 --- a/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc +++ b/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc @@ -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,