@@ -18,13 +18,34 @@ eval "$(conda shell.bash hook)"
1818CONDA_ENV=$( conda env list --json | jq -r " .envs | .[-1]" )
1919conda activate " ${CONDA_ENV} "
2020
21- # Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
22- source .ci/scripts/setup-vulkan-linux-deps.sh
21+ export PYTHON_EXECUTABLE=python
2322
2423# CMake options to use, in addition to the defaults.
25- EXTRA_BUILD_ARGS=" -DEXECUTORCH_BUILD_VULKAN=ON"
24+ EXTRA_BUILD_ARGS=" "
25+
26+ if [[ " $FLOW " == * qualcomm* ]]; then
27+ # Setup QNN sdk and deps - note that this is a bit hacky due to the nature of the
28+ # Qualcomm build. TODO (gjcomer) Clean this up once the QNN pybinding integration is
29+ # cleaned up.
30+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
31+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
32+ PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
33+ QNN_X86_LIB_DIR=` realpath build-x86/lib/`
34+ QNN_SDK_ROOT=" /tmp/qnn/2.28.0.241029"
35+ export LD_LIBRARY_PATH" =$QNN_X86_LIB_DIR :$QNN_SDK_ROOT /lib/x86_64-linux-clang/:${LD_LIBRARY_PATH:- } "
36+
37+ # TODO Get SDK root from install scripts
38+ EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_QNN=ON -DQNN_SDK_ROOT=$QNN_SDK_ROOT "
39+ fi
40+
41+ if [[ " $FLOW " == * vulkan* ]]; then
42+ # Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
43+ source .ci/scripts/setup-vulkan-linux-deps.sh
44+
45+ EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_VULKAN=ON"
46+ fi
2647
2748# We need the runner to test the built library.
28- PYTHON_EXECUTABLE=python CMAKE_ARGS=" $EXTRA_BUILD_ARGS " .ci/scripts/setup-linux.sh --build-tool cmake --build-mode Release
49+ PYTHON_EXECUTABLE=python CMAKE_ARGS=" $EXTRA_BUILD_ARGS " .ci/scripts/setup-linux.sh --build-tool cmake --build-mode Release --editable true
2950
3051python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report " $ARTIFACT_DIR /test_results.csv"
0 commit comments