-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Possibly unintentional or misconfigured dependencies for QNN EP in onnxruntime_python.cmake #23360
Comments
If I remember correctly, the "onnxruntime_test_all" has a POST_BUILD step that copies test data to the build directory, and to build onnxruntime you may need some of the test data. Therefore onnxruntime_BUILD_UNIT_TESTS=ON is required for building python. I am not sure if it is still the case. |
Interesting. Do you know if it is possible to build the tests without them automatically running when not using the build.py script? I am not sure but it feels that |
pass |
@snnn, I am unable to use build.py since I am compiling for a Qualcomm Aarch64 platform with Yocto. Do you know which CMake options can replace the |
Just calling |
Thank you for your replies, they have been helpful to me! I have now figured out that my current build error is caused by the onnxruntime/cmake/onnxruntime_unittests.cmake Lines 1043 to 1049 in cff0ec5
If However, perhaps it would be sensible to make the CMake script fail if the Let's not digress too far from the topic of this issue: Configuration dependency. If you think it is OK that this new dependency I mentioned is introduced, perhaps we should close this issue, if not, shall we leave it open to allow for more discussions? |
A suggestion would be to add a check here to see if the onnxruntime/cmake/CMakeLists.txt Lines 895 to 907 in cff0ec5
|
Describe the issue
Hi,
ORT cannot be built with QNN EP if
onnxruntime_BUILD_UNIT_TESTS=OFF
and enableonnxruntime_ENABLE_PYTHON=ON
for releases with version >= v.1.20.0. I believe this is unintentional behavior caused by a dependency to the targetonnxruntime_qnn_ctx_gen
.The error occurs in the
add_custom_command
below:onnxruntime/cmake/onnxruntime_python.cmake
Lines 1037 to 1042 in 5c1b7cc
I believe the reason why this target doesn't exist when building with unit tests disabled, is because it is only created in the
onnxruntime_unittests.cmake
here:onnxruntime/cmake/onnxruntime_unittests.cmake
Line 1321 in 5c1b7cc
I am using CMake instead of the build scripts since I am cross compiling from amd64 Linux to Aarch64 Linux with BitBake.
Urgency
Not urgent from my side, I will just build with unit tests enabled. But projects that are upgrading to version 1.20+ might notice breaking changes.
Target platform
AArch64
Build script
CMake build script with the following options:
Error / output
Visual Studio Version
No response
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: