-
Notifications
You must be signed in to change notification settings - Fork 371
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
armeabi-v7a assembler error #4348
Comments
Which Android NDK version do you use? |
Thanks for the response, NDK is 25b |
This looks like a Clang bug. Note that it only happens when building source files for ARMv6. It looks like Clang assembly validator assumes that VFP registers are not supported (even though XNNPack pass |
Thanks, for investigating. And also occurs with v7. Any suggestions for a workaround? (I can patch, but ARM asm is outside my experience base) For example, brute force might be to add I notice the code has other tests for Clang issues, is this case something that might be changed in XNNPack? |
On further investigation I think this is an XNNPACK issue, not a Clang issue as suggested. This post refers to an arm7-a issue. But this flag is only set for arm6 devices:
XNNPack does not pass |
XNNPack passes |
OK, but that is not the issue. This issue is about armv7-a not armv6 |
ARMv7 build for XNNPack really means 32-bit ARM architecture. The minimal requirements for 32-bit ARM architecture in XNNPack is ARMv6 with VFPv2. Thus, XNNPack includes ARMv6+VFPv2-optimized microkernels in ARMv7 build, even though they won't be used in production. |
OK, but this is still not the issue. The issue is that armv7 does not build. I suggest the issue may be the |
I just run following code, this error has gone. but new issue comes #4775 sed -i 's|-march=armv6 -mfpu=vfp|-march=armv7-a -mfpu=neon|' CMakeLists.txt |
Hi @leleliu008, I got a workaround. You can directly modifiy the xnnpack source code which is inside the tflite build folder. The main idea is to bypass the error code and use the default branch. It works for me. |
While building tensorflow lite (v2.11.0) for Android armeabi-v7a I get the following invalid assembly code error:
The XNNPACK master version shows the issue is here https://github.com/google/XNNPACK/blob/master/src/xnnpack/math.h#L316
Android arm64-v8a builds and runs without error..
With an earlier tensorflow lite version (v2.8.0) both architectures built and ran without error.
As I read it
=t
is documented as a valid constraint for "ARM family", but the assembler thinks this is not the case.https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-Constraints
https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints
The text was updated successfully, but these errors were encountered: