@@ -39,11 +39,9 @@ def _download_qnn_sdk() -> Optional[pathlib.Path]:
39
39
- Only runs on Linux x86 platforms. Skips otherwise.
40
40
"""
41
41
print ("Downloading Qualcomm SDK..." )
42
- qairt_url = (
43
- "https://softwarecenter.qualcomm.com/api/download/software/sdks/"
44
- "Qualcomm_AI_Runtime_Community/All/2.34.0.250424/v2.34.0.250424.zip"
45
- )
46
- qairt_content_dir = "qairt/2.34.0.250424"
42
+ QNN_VERSION = "2.37.0.250724"
43
+ QAIRT_URL = f"https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/{ QNN_VERSION } /v{ QNN_VERSION } .zip"
44
+ QAIRT_CONTENT_DIR = f"qairt/{ QNN_VERSION } "
47
45
48
46
if not is_linux_x86 ():
49
47
print ("Skipping Qualcomm SDK (only supported on Linux x86)." )
@@ -54,11 +52,11 @@ def _download_qnn_sdk() -> Optional[pathlib.Path]:
54
52
print (f"Current working directory: { os .getcwd ()} " )
55
53
56
54
with tempfile .TemporaryDirectory () as tmpdir :
57
- archive_path = pathlib .Path (tmpdir ) / pathlib .Path (qairt_url ).name
55
+ archive_path = pathlib .Path (tmpdir ) / pathlib .Path (QAIRT_URL ).name
58
56
print (f"Temporary directory: { tmpdir } " )
59
57
print (f"Archive will be saved to: { archive_path } " )
60
58
61
- print (f"Downloading Qualcomm SDK from { qairt_url } ..." )
59
+ print (f"Downloading Qualcomm SDK from { QAIRT_URL } ..." )
62
60
try :
63
61
64
62
def make_report_progress ():
@@ -76,7 +74,7 @@ def report_progress(block_num, block_size, total_size):
76
74
77
75
return report_progress
78
76
79
- urllib .request .urlretrieve (qairt_url , archive_path , make_report_progress ())
77
+ urllib .request .urlretrieve (QAIRT_URL , archive_path , make_report_progress ())
80
78
print ("Download completed!" )
81
79
82
80
if archive_path .exists () and archive_path .stat ().st_size == 0 :
@@ -89,14 +87,14 @@ def report_progress(block_num, block_size, total_size):
89
87
print (f"Error during download: { e } " )
90
88
return None
91
89
92
- if qairt_url .endswith (".zip" ):
90
+ if QAIRT_URL .endswith (".zip" ):
93
91
print ("Extracting ZIP archive..." )
94
- _extract_zip (archive_path , qairt_content_dir , SDK_DIR )
95
- elif qairt_url .endswith ((".tar.gz" , ".tgz" )):
92
+ _extract_zip (archive_path , QAIRT_CONTENT_DIR , SDK_DIR )
93
+ elif QAIRT_URL .endswith ((".tar.gz" , ".tgz" )):
96
94
print ("Extracting TAR archive..." )
97
- _extract_tar (archive_path , qairt_content_dir , SDK_DIR )
95
+ _extract_tar (archive_path , QAIRT_CONTENT_DIR , SDK_DIR )
98
96
else :
99
- raise ValueError (f"Unsupported archive format: { qairt_url } " )
97
+ raise ValueError (f"Unsupported archive format: { QAIRT_URL } " )
100
98
101
99
print (f"Verifying extraction to { SDK_DIR } " )
102
100
if SDK_DIR .exists ():
0 commit comments