1 /* 2 * Copyright (c) Qualcomm Innovation Center, Inc. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 #pragma once 9 10 #include <executorch/backends/qualcomm/qc_compiler_spec_generated.h> 11 #include <executorch/backends/qualcomm/runtime/backends/QnnImplementation.h> 12 namespace executorch { 13 namespace backends { 14 namespace qnn { 15 void LoggingCallback( 16 const char* fmt, 17 QnnLog_Level_t level, 18 std::uint64_t /*timestamp*/, 19 va_list args); 20 21 class QnnLogger { 22 public: 23 explicit QnnLogger( 24 const QnnImplementation& implementation, 25 QnnLog_Callback_t callback, 26 QnnExecuTorchLogLevel log_level); 27 ~QnnLogger(); 28 GetHandle()29 Qnn_LogHandle_t GetHandle() { 30 return handle_; 31 } 32 33 private: 34 Qnn_LogHandle_t handle_; 35 const QnnImplementation& implementation_; 36 }; 37 } // namespace qnn 38 } // namespace backends 39 } // namespace executorch 40