Skip to content

Commit

Permalink
Update qnncontext.py
Browse files Browse the repository at this point in the history
Signed-off-by: quic-zhanweiw <[email protected]>
  • Loading branch information
quic-zhanweiw authored Jun 25, 2024
1 parent ebb7ee0 commit abdbaa5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions QNNHelper/qnncontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
"""
Expand Down Expand Up @@ -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

Expand All @@ -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)


Expand Down

0 comments on commit abdbaa5

Please sign in to comment.