Download QNN SDK outside of CMake for wheel builds (v2)#17751
Download QNN SDK outside of CMake for wheel builds (v2)#17751larryliu0820 merged 2 commits intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17751
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Pending, 2 Unrelated FailuresAs of commit 8bcc146 with merge base f478cb3 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
efe9333 to
39ba417
Compare
Unlike the reverted #17717 which set EXECUTORCH_BUILD_QNN=ON in pybind.cmake (causing all pybind-preset CI jobs to attempt the flaky cmake-time SDK download), this keeps QNN OFF in the preset. Only wheel builds enable it: setup.py detects QNN_SDK_ROOT and passes -DEXECUTORCH_BUILD_QNN=ON to cmake. The pre_build_script downloads the SDK before cmake runs, avoiding the flaky in-cmake download. The cmake fallback download is kept as a last resort, gated on QNN_SDK_ROOT not already being set. Also fix test_wheel_package_qnn.sh to export LD_LIBRARY_PATH so libQnnHtp.so can be found at runtime, and check InitBackend() return value in qnn_manager_lifecycle.py to prevent segfaults when QNN backend initialization fails. Co-authored-by: Claude <noreply@anthropic.com>
39ba417 to
f37a7d7
Compare
Unlike the reverted #17717 which set EXECUTORCH_BUILD_QNN=ON in pybind.cmake (causing all pybind-preset CI jobs to attempt the flaky cmake-time SDK download), this keeps QNN OFF in the preset. Only wheel builds enable it: setup.py detects QNN_SDK_ROOT and passes -DEXECUTORCH_BUILD_QNN=ON to cmake.
The pre_build_script downloads the SDK before cmake runs, avoiding the flaky in-cmake download. The cmake fallback download is kept as a last resort, gated on QNN_SDK_ROOT not already being set.