File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22
3- from .scripts .download_qnn_sdk import install_qnn_sdk , is_linux_x86
3+ from .scripts .download_qnn_sdk import install_qnn_sdk , is_linux_x86 , QNN_ZIP_URL
44
55
66env_flag = os .getenv ("EXECUTORCH_BUILDING_WHEEL" , "0" ).lower ()
77# If users have preinstalled QNN_SDK_ROOT, we will use it.
88qnn_sdk_root_flag = os .getenv ("QNN_SDK_ROOT" , None )
99
10- if env_flag not in ("1" , "true" , "yes" ) and not qnn_sdk_root_flag and is_linux_x86 ():
11- ok = install_qnn_sdk ()
12- if not ok :
13- raise RuntimeError ("Failed to install QNN SDK. Please check the logs above." )
10+ if env_flag not in ("1" , "true" , "yes" ):
11+ if qnn_sdk_root_flag :
12+ print (
13+ f"[QNN] Using QNN SDK at { qnn_sdk_root_flag } (from QNN_SDK_ROOT)" ,
14+ flush = True ,
15+ )
16+ elif is_linux_x86 ():
17+ ok = install_qnn_sdk ()
18+ if not ok :
19+ raise RuntimeError (
20+ "Failed to set up QNN SDK.\n \n "
21+ "To resolve, try one of:\n "
22+ " 1. Download the SDK manually from:\n "
23+ f" { QNN_ZIP_URL } \n "
24+ " Or go to step 2 if QNN SDK already exists.\n "
25+ " 2. Set QNN_SDK_ROOT to an existing SDK installation:\n "
26+ " export QNN_SDK_ROOT=/path/to/qualcomm/sdk\n "
27+ " export LD_LIBRARY_PATH="
28+ "$QNN_SDK_ROOT/lib/x86_64-linux-clang/:$LD_LIBRARY_PATH"
29+ )
You can’t perform that action at this time.
0 commit comments