Skip to content

Commit 14105af

Browse files
committed
test
1 parent 4c679d0 commit 14105af

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.ci/scripts/build-qnn-direct-sdk.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ bash backends/qualcomm/scripts/build.sh \
4848
log_stage "PASS 1 complete"
4949
echo "::endgroup::"
5050

51+
# Pass 1 copied PyQnnManagerAdaptor.so into backends/qualcomm/python/ in the
52+
# source tree. The site-packages wheel (installed by setup-linux.sh) doesn't
53+
# contain that compiled extension, so resolve_soc_info in pass 2 would fail
54+
# with ModuleNotFoundError. Prepend the source-tree parent to PYTHONPATH so
55+
# `import executorch` resolves to the source tree (which has the .so) instead
56+
# of site-packages. This mirrors what test-qnn-delegate-linux and similar jobs
57+
# do after sourcing build-qnn-sdk.sh.
58+
EXECUTORCH_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
59+
export PYTHONPATH="${EXECUTORCH_ROOT}/..:${PYTHONPATH:-}"
60+
log_stage "PYTHONPATH=${PYTHONPATH}"
61+
5162
# Second pass: direct mode only. The adaptor now exists, so resolve_soc_info
5263
# can map SM8750 to its HTP arch. Skips the x86_64/Android rebuild.
5364
echo "::group::Pass 2 - direct-mode (Hexagon) build"

0 commit comments

Comments
 (0)