Qualcomm AI Engine Direct - Verify Direct Build in External CI#19763
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19763
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled Job, 4 Unrelated Failures, 2 Unclassified FailuresAs of commit c978d61 with merge base 2b9e9bf ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following job 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
|
189c612 to
6453fd2
Compare
3c69416 to
b7c8e68
Compare
| install_qnn | ||
| install_hexagon_sdk | ||
|
|
||
| bash backends/qualcomm/scripts/build.sh \ |
There was a problem hiding this comment.
Should we add --skip_x86_64 --skip_linux_android to this? iiuc, build.sh still builds the x86 and full Android stacks (those default on), so a job meant to verify just the direct build does a lot of extra work. Not sure..
There was a problem hiding this comment.
Hi @psiddh,
I think both are fine. I was doing a full build just to double check that direct_runner for build-android can also be properly build. Since the goal here is to verify .so is built successfully, I have skipped x86 and android in newest change.
Thanks
| # HEXAGON_TOOLS_VERSION must match the toolchain shipped inside HEXAGON_SDK_VERSION. | ||
| HEXAGON_SDK_VERSION="6.5.0.0" | ||
| HEXAGON_TOOLS_VERSION="19.0.07" | ||
| HEXAGON_SDK_ZIP_URL="https://apigwx-aws.qualcomm.com/qsc/public/v1/api/download/software/sdks/Hexagon_SDK/Linux/Debian/${HEXAGON_SDK_VERSION}/Hexagon_SDK_Linux.zip" |
There was a problem hiding this comment.
nits: Should we add a SHA-256 check on the downloaded Hexagon SDK zip? as a follow up PR maybe ?
There was a problem hiding this comment.
I have added this check in newest commit. Thanks for the suggestion on safety check.
| PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh ${{ matrix.model }} "cmake" "qnn" | ||
|
|
||
| test-qnn-direct-build-linux: | ||
| name: test-qnn-direct-build-linux |
There was a problem hiding this comment.
I think we should we gate this job on QNN-related paths (e.g. backends/qualcomm/**, CMakeLists.txt, the build scripts) instead of running it on every PR?
There was a problem hiding this comment.
That is the intial idea. But the general layer can also introduce changes that does not work with Hexagon toolchain. For this reason, I have set it to run on every PR.
72900be to
16140f5
Compare
16140f5 to
c978d61
Compare
Summary
QNN Backend supports direct build, which is to build library with hexagon tool chain. Since it is using its own tool chain, some of the C/C++ files or functions are not accessible. For example, in this PR,
extension/data_loader/mman.huses some MACRO that is not no Hexagon toolchain. Due to this reason, mainline often breaks direct-build when someone included functions that's not supported by Hexagon tool chain. To prevent this to happen, this PR added:Test plan
Passing
test-qnn-direct-build-linuxunderpull.yml