Skip to content

Commit 2bdff3d

Browse files
committed
use qnn 2.37
1 parent 1ac600a commit 2bdff3d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

backends/qualcomm/scripts/download_qnn_sdk.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ def _download_qnn_sdk() -> Optional[pathlib.Path]:
3939
- Only runs on Linux x86 platforms. Skips otherwise.
4040
"""
4141
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}"
4745

4846
if not is_linux_x86():
4947
print("Skipping Qualcomm SDK (only supported on Linux x86).")
@@ -54,11 +52,11 @@ def _download_qnn_sdk() -> Optional[pathlib.Path]:
5452
print(f"Current working directory: {os.getcwd()}")
5553

5654
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
5856
print(f"Temporary directory: {tmpdir}")
5957
print(f"Archive will be saved to: {archive_path}")
6058

61-
print(f"Downloading Qualcomm SDK from {qairt_url}...")
59+
print(f"Downloading Qualcomm SDK from {QAIRT_URL}...")
6260
try:
6361

6462
def make_report_progress():
@@ -76,7 +74,7 @@ def report_progress(block_num, block_size, total_size):
7674

7775
return report_progress
7876

79-
urllib.request.urlretrieve(qairt_url, archive_path, make_report_progress())
77+
urllib.request.urlretrieve(QAIRT_URL, archive_path, make_report_progress())
8078
print("Download completed!")
8179

8280
if archive_path.exists() and archive_path.stat().st_size == 0:
@@ -89,14 +87,14 @@ def report_progress(block_num, block_size, total_size):
8987
print(f"Error during download: {e}")
9088
return None
9189

92-
if qairt_url.endswith(".zip"):
90+
if QAIRT_URL.endswith(".zip"):
9391
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")):
9694
print("Extracting TAR archive...")
97-
_extract_tar(archive_path, qairt_content_dir, SDK_DIR)
95+
_extract_tar(archive_path, QAIRT_CONTENT_DIR, SDK_DIR)
9896
else:
99-
raise ValueError(f"Unsupported archive format: {qairt_url}")
97+
raise ValueError(f"Unsupported archive format: {QAIRT_URL}")
10098

10199
print(f"Verifying extraction to {SDK_DIR}")
102100
if SDK_DIR.exists():

0 commit comments

Comments
 (0)