Skip to content

Commit

Permalink
[QNN EP] Add LoggingManager::HasDefaultLogger() to provider bridge API (
Browse files Browse the repository at this point in the history
#23467)

### Description
Fixes QNN EP builds due to missing function in provider bridge API:
`logging::LoggingManager::HasDefaultLogger()`



### Motivation and Context
A [recent PR](#23120) made
QNN EP a shared library. A [different
PR](#23435) added use of a
new function to QNN EP that was not part of the provider bridge API. The
CI did not catch it because main was not merged into the first PR before
merging.
  • Loading branch information
adrianlizarraga authored and ashrit-ms committed Jan 23, 2025
1 parent 05fbbdf commit ddf0d37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ struct ProviderHost {

// logging::LoggingManager
virtual const logging::Logger& logging__LoggingManager__DefaultLogger() = 0;
virtual bool logging__LoggingManager__HasDefaultLogger() = 0;

// logging::Capture
virtual std::unique_ptr<logging::Capture> logging__Capture__construct(const logging::Logger& logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct Logger final {

struct LoggingManager final {
static const Logger& DefaultLogger() { return g_host->logging__LoggingManager__DefaultLogger(); }
static bool HasDefaultLogger() { return g_host->logging__LoggingManager__HasDefaultLogger(); }

PROVIDER_DISALLOW_ALL(LoggingManager)
};
Expand Down
1 change: 1 addition & 0 deletions onnxruntime/core/session/provider_bridge_ort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ struct ProviderHostImpl : ProviderHost {

// logging::LoggingManager (wrapped)
const logging::Logger& logging__LoggingManager__DefaultLogger() override { return logging::LoggingManager::DefaultLogger(); }
bool logging__LoggingManager__HasDefaultLogger() override { return logging::LoggingManager::HasDefaultLogger(); }

// logging::Capture (wrapped)
std::unique_ptr<logging::Capture> logging__Capture__construct(const logging::Logger& logger,
Expand Down

0 comments on commit ddf0d37

Please sign in to comment.