From abdbaa581a662eb5a390d87d3c00dcca4c0af95a Mon Sep 17 00:00:00 2001 From: quic-zhanweiw <150764245+quic-zhanweiw@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:22:30 +0800 Subject: [PATCH] Update qnncontext.py Signed-off-by: quic-zhanweiw <150764245+quic-zhanweiw@users.noreply.github.com> --- QNNHelper/qnncontext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/QNNHelper/qnncontext.py b/QNNHelper/qnncontext.py index fa8b9f7..183865a 100644 --- a/QNNHelper/qnncontext.py +++ b/QNNHelper/qnncontext.py @@ -39,8 +39,8 @@ class LogLevel(): VERBOSE = 4 DEBUG = 5 - def SetLogLevel(log_level): - pyqnnhelper.set_log_level(log_level) + def SetLogLevel(log_level, log_path): + pyqnnhelper.set_log_level(log_level, log_path) class ProfilingLevel(): """ @@ -89,6 +89,7 @@ def Config(qnn_lib_path: str = "None", runtime : str = Runtime.HTP, log_level : int = LogLevel.ERROR, profiling_level : int = ProfilingLevel.OFF, + log_path : str = "None" ): global g_backend_lib_path, g_system_lib_path @@ -105,7 +106,7 @@ def Config(qnn_lib_path: str = "None", if not os.path.exists(g_system_lib_path): raise ValueError(f"system library does not exist: {g_system_lib_path}") - LogLevel.SetLogLevel(log_level) + LogLevel.SetLogLevel(log_level, log_path) ProfilingLevel.SetProfilingLevel(profiling_level)