@@ -26,10 +26,6 @@ def is_linux_x86() -> bool:
2626 Returns:
2727 bool: True if the system is Linux x86_64, False otherwise.
2828 """
29- print ("platform.system().lower(): " , platform .system ().lower ())
30- print ("platform.machine().lower(): " , platform .machine ().lower ())
31- print ("os.name: " , os .name )
32-
3329 return platform .system ().lower () == "linux" and platform .machine ().lower () in (
3430 "x86_64" ,
3531 "amd64" ,
@@ -53,34 +49,33 @@ def check_glibc_exist_and_validate() -> bool:
5349 """
5450 Check if users have glibc installed.
5551 """
56- print ("[QNN] Checking glibc exist running on Linux x86" )
5752 exists = False
5853 for path in REQUIRED_LIBC_LIBS :
5954 try :
6055 output = subprocess .check_output (
6156 [path , "--version" ], stderr = subprocess .STDOUT
6257 )
6358 output = output .decode ().split ("\n " )[0 ]
64- print (f"[QNN] glibc version for path { path } is: { output } " )
59+ logger . debug (f"[QNN] glibc version for path { path } is: { output } " )
6560 match = re .search (r"version (\d+\.\d+)" , output )
6661 if match :
6762 version = match .group (1 )
6863 if float (version ) >= MINIMUM_LIBC_VERSION :
69- print (f"[QNN] glibc version is { version } ." )
64+ logger . debug (f"[QNN] glibc version is { version } ." )
7065 exists = True
7166 return True
7267 else :
73- print (
68+ logger . error (
7469 f"[QNN] glibc version is too low. The minimum libc version is { MINIMUM_LIBC_VERSION } Please install glibc following the commands below."
7570 )
7671 else :
77- print ("[QNN] glibc version not found." )
72+ logger . error ("[QNN] glibc version not found." )
7873
7974 except Exception :
8075 continue
8176
8277 if not exists :
83- print (
78+ logger . error (
8479 r""""
8580 [QNN] glibc not found or the version is too low. Please install glibc following the commands below.
8681 Ubuntu/Debian:
@@ -180,8 +175,6 @@ def _download_qnn_sdk(dst_folder=SDK_DIR) -> Optional[pathlib.Path]:
180175 f"Qualcomm_AI_Runtime_Community/All/{ QNN_VERSION } /v{ QNN_VERSION } .zip"
181176 )
182177 QAIRT_CONTENT_DIR = f"qairt/{ QNN_VERSION } "
183- res = check_glibc_exist_and_validate ()
184- print ("[QNN] check_glibc_exist_and_validate result: " , res )
185178 if not is_linux_x86 ():
186179 logger .info ("[QNN] Skipping Qualcomm SDK (only supported on Linux x86)." )
187180 return None
0 commit comments