Skip to content

Commit 75dfbfc

Browse files
committed
Resolve rebase multibackend pushing
1 parent bf68399 commit 75dfbfc

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

backends/qualcomm/tests/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def setUpClass(cls):
205205
target=cls.target,
206206
)
207207
adb.push(
208+
backends={get_backend_type(cls.backend)},
208209
init_env=True,
209210
)
210211

examples/qualcomm/utils.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,26 +140,33 @@ def __init__(
140140
self.expected_input_shape = expected_input_shape
141141
self.expected_output_shape = expected_output_shape
142142
self.extra_cmds = ""
143-
self.qnn_backend_library_paths = {}
144-
145-
146-
self.qnn_backend_library_paths = {}
143+
self.backend_library_paths = {}
144+
147145
if self.direct_mode_build_path:
148-
self.qnn_backend_library_paths.update(
146+
direct_general_artifacts = [
147+
f"{self.build_path}/examples/qualcomm/direct_executor_runner/libqnn_executorch_stub.so",
148+
f"{self.direct_mode_build_path}/backends/qualcomm/libqnn_executorch_backend.so",
149+
f"{self.direct_mode_build_path}/backends/qualcomm/qnn_executorch/direct_mode/libqnn_executorch_skel.so",
150+
]
151+
self.backend_library_paths.update(
149152
{
150153
QnnExecuTorchBackendType.kHtpBackend: [
151-
f"{self.build_path}/examples/qualcomm/direct_executor_runner/libqnn_executorch_stub.so",
152-
f"{self.direct_mode_build_path}/backends/qualcomm/libqnn_executorch_backend.so",
153-
f"{self.direct_mode_build_path}/backends/qualcomm/qnn_executorch/direct_mode/libqnn_executorch_skel.so",
154154
f"{self.qnn_sdk}/lib/hexagon-v{self.htp_arch}/unsigned/libQnnHtpV{self.htp_arch}.so",
155155
f"{self.qnn_sdk}/lib/hexagon-v{self.htp_arch}/unsigned/libQnnSystem.so",
156156
f"{self.hexagon_tools_root}/Tools/target/hexagon/lib/v{self.htp_arch}/G0/pic/libc++abi.so.1",
157157
f"{self.hexagon_tools_root}/Tools/target/hexagon/lib/v{self.htp_arch}/G0/pic/libc++.so.1",
158158
]
159159
}
160160
)
161+
for _, library_paths in self.backend_library_paths.items():
162+
library_paths.extend(direct_general_artifacts)
161163
else:
162-
self.qnn_backend_library_paths.update(
164+
traditional_general_artifacts = [
165+
f"{self.qnn_sdk}/lib/{self.target}/libQnnSystem.so",
166+
f"{self.build_path}/backends/qualcomm/libqnn_executorch_backend.so",
167+
f"{self.qnn_sdk}/lib/{self.target}/libQnnModelDlc.so",
168+
]
169+
self.backend_library_paths.update(
163170
{
164171
QnnExecuTorchBackendType.kHtpBackend: [
165172
f"{self.qnn_sdk}/lib/{self.target}/libQnnHtp.so",
@@ -178,6 +185,8 @@ def __init__(
178185
],
179186
}
180187
)
188+
for _, library_paths in self.backend_library_paths.items():
189+
library_paths.extend(traditional_general_artifacts)
181190

182191
def _adb(self, cmd, output_callback: Optional[Callable[[str], None]] = None):
183192
if not self.host_id:
@@ -215,7 +224,7 @@ def push(
215224

216225
# backend libraries
217226
for backend in backends:
218-
artifacts.extend(self.qnn_backend_library_paths[backend])
227+
artifacts.extend(self.backend_library_paths[backend])
219228

220229
with tempfile.TemporaryDirectory() as tmp_dir:
221230
input_list_file, input_files = generate_inputs(

0 commit comments

Comments
 (0)