File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
backends/qualcomm/scripts Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1414# === executorch/backends/qualcomm path ===
1515PKG_ROOT = pathlib .Path (__file__ ).parent .parent
1616QNN_SDK_PATH = PKG_ROOT / "sdk" / "qnn"
17- libcxx_DIR_PATH
1817
1918
2019def is_linux_x86 () -> bool :
@@ -216,19 +215,25 @@ def _load_libcxx_libs(lib_path):
216215# === End of libcxx handling ===
217216
218217
219- def install_qnn_sdk (force_download : bool = True ) -> bool :
218+ def install_qnn_sdk (force_download : bool = False ) -> bool :
220219 """Ensure QNN SDK + libc++ are available and loaded."""
221220 # --- set up QNN SDK ---
222221 if not QNN_SDK_PATH .exists ():
223- if force_download :
224- if not _download_qnn_sdk ():
225- return False
226- else :
227- print ("[INIT] Qualcomm SDK not found and force_download=False" )
222+ print (f"[INIT] Qualcomm SDK not found at { QNN_SDK_PATH } , downloading..." )
223+ if not _download_qnn_sdk ():
224+ return False
225+ elif force_download :
226+ print (f"[INIT] Force-download requested, re-downloading SDK..." )
227+ if not _download_qnn_sdk ():
228228 return False
229+ else :
230+ print (
231+ f"[INIT] Qualcomm SDK already exists at { QNN_SDK_PATH } , skipping download."
232+ )
229233
230234 os .environ ["QNN_SDK_ROOT" ] = str (QNN_SDK_PATH )
231235
236+ # Load QNN library
232237 qnn_lib = QNN_SDK_PATH / "lib" / "x86_64-linux-clang" / "libQnnHtp.so"
233238 try :
234239 ctypes .CDLL (str (qnn_lib ), mode = ctypes .RTLD_GLOBAL )
You can’t perform that action at this time.
0 commit comments