-
Notifications
You must be signed in to change notification settings - Fork 374
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
clang14.0.7 from Android NDK crashes when compiling bf16-gemm-1x4c8-minmax-neonbf16-bfdot.c #4775
Comments
step1: sed -i 's|-march=armv6 -mfpu=vfp|-march=armv7-a -mfpu=neon|' CMakeLists.txt step2: successfully built now, but don't know if the right way. |
Manage to get the repro steps down to:
Note that taking a closer look |
|
https://godbolt.org/z/656PqT6o1 |
I found that I can workaround the bug with changing:
to
just the ordering of interpret and get_low. |
I think i can change it to |
Hm, looks like we don't test building of these microkernels: https://github.com/google/XNNPACK/blob/master/scripts/build-android-armv7.sh#L59 We might also need to update the ndk version we are testing with: https://github.com/google/XNNPACK/blob/master/.github/workflows/build.yml#LL172C28-L172C28 |
There is even a comment about this specific issue:
|
I think the easiest fix is for you to add this compile flag when building XNNPACK |
Yep, this is what I did for now. |
NDK maintainers claim that canary builds with clang16 can compile this code. |
As I read the posts above there are two possible workarounds, either could be implemented in XNNPACK. Just waiting for some future NDK where some future Clang will be fixed, is I think an insufficient response. |
The recommended work-around is to disable ARM BF16 extensions using either |
Using tensorflow 2.13.0-rc1 and
Does not workaround the issue. And we should not expect it to because this is defined as the default behavior https://github.com/google/XNNPACK/blob/master/scripts/build-android-armv7.sh#L59 and we know the default fails to build. I've been trying to get some attention paid to this for 3.5 months #4348 |
Hi.
I am trying to update xnnpack to 2023-04-18 / 71f70de in order to update tensorflow-lite to 2.12.0.
Unfortunately clang for android segfaults when compiling
src/bf16-gemm/gen/bf16-gemm-1x4c8-minmax-neonbf16-bfdot.c
for android-armv7a.I am able to reproduce this:
I have tested NDK's r25b and r25c, but the segfault still persists and there is no way to fix this.
@Maratyszcza, could you, please, help me to find a workaround for this?
The text was updated successfully, but these errors were encountered: