File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
examples/qualcomm/scripts Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 7
7
import json
8
8
import os
9
9
import re
10
+ import sys
10
11
from multiprocessing .connection import Client
11
12
12
13
import numpy as np
@@ -71,20 +72,6 @@ def create_device_inputs(example_inputs, use_kv_cache):
71
72
default = "8a8w" ,
72
73
)
73
74
74
- # QNN_SDK_ROOT might also be an argument, but it is used in various places.
75
- # So maybe it's fine to just use the environment.
76
- if "QNN_SDK_ROOT" not in os .environ :
77
- raise RuntimeError ("Environment variable QNN_SDK_ROOT must be set" )
78
- print (f"QNN_SDK_ROOT={ os .getenv ('QNN_SDK_ROOT' )} " )
79
-
80
- if "LD_LIBRARY_PATH" not in os .environ :
81
- print (
82
- "[Warning] LD_LIBRARY_PATH is not set. If errors like libQnnHtp.so "
83
- "not found happen, please follow setup.md to set environment."
84
- )
85
- else :
86
- print (f"LD_LIBRARY_PATH={ os .getenv ('LD_LIBRARY_PATH' )} " )
87
-
88
75
args = parser .parse_args ()
89
76
90
77
# ensure the working directory exist.
@@ -120,6 +107,10 @@ def create_device_inputs(example_inputs, use_kv_cache):
120
107
custom_annotations = (),
121
108
quant_dtype = quant_dtype ,
122
109
)
110
+
111
+ if args .compile_only :
112
+ sys .exit (0 )
113
+
123
114
adb = SimpleADB (
124
115
qnn_sdk = os .getenv ("QNN_SDK_ROOT" ),
125
116
artifact_path = f"{ args .build_folder } " ,
You can’t perform that action at this time.
0 commit comments