Skip to content
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

[Solved] Bullseye Toolchain Error: selected processor does not support `vsdot.s8 q10,q9,d4[0]' in ARM mode #90

Closed
distlibs opened this issue Dec 11, 2021 · 11 comments
Labels
Bug 🐛 Error, flaw or fault Solved 🎏 Goal Achieved!
Milestone

Comments

@distlibs
Copy link

distlibs commented Dec 11, 2021

I was trying to compile tensorflow-lite 2.7 with Raspberry Pi GCC Cross-Compiler Toolchains (Bullseye). I got error:

...
[ 73%] Building C object _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-igemm/gen/1x16c4-minmax-fp32-neondot.c.o
[ 73%] Building C object _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-igemm/gen/4x8c4-minmax-fp32-neondot.c.o
[ 73%] Building C object _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-igemm/gen/4x16c4-minmax-fp32-neondot.c.o
/tmp/ccLir1WO.s: Assembler messages:
/tmp/ccLir1WO.s:60: Error: selected processor does not support `vsdot.s8 q8,q11,d7[0]' in ARM mode
/tmp/ccLir1WO.s:62: Error: selected processor does not support `vsdot.s8 q10,q9,d7[0]' in ARM mode
/tmp/ccLir1WO.s:65: Error: selected processor does not support `vsdot.s8 q8,q9,d7[1]' in ARM mode
/tmp/ccLir1WO.s:69: Error: selected processor does not support `vsdot.s8 q10,q9,d7[1]' in ARM mode
/tmp/ccLir1WO.s:141: Error: selected processor does not support `vsdot.s8 q10,q9,d7[0]' in ARM mode
/tmp/ccLir1WO.s:144: Error: selected processor does not support `vsdot.s8 q8,q11,d7[0]' in ARM mode
make[2]: *** [_deps/xnnpack-build/CMakeFiles/XNNPACK.dir/build.make:5458: _deps/xnnpack-build/CMakeFiles/XNNPACK.dir/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/ccpalmhZ.s: Assembler messages:

Using Buster toolchain tensorflow-lite compiles without any errors.

It can be related with:

Maybe you can apply patch like you did here #89

@abhiTronix
Copy link
Owner

abhiTronix commented Dec 11, 2021

Using Buster toolchain tensorflow-lite compiles without any errors.

It can be related with:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101723
Cross-compilation for RPi3 (armv7) fails on assembly google/XNNPACK#1465
CMake build error on armv7 with latest gcc google/XNNPACK#2003

@distlibs Thanks for bug report. What I'm understanding is that GCC 9-to-11 series is affected by this bug when Binutils >2.33 is used. More specifically Binutils 2.35.1 used in Bullseye is causing this bug in our case. And, this bug is already fixed in master branch of GCC >9 but haven't been included in releases branches like releases/gcc-10.3.0 which was updated 8 months ago.

Solution:

This patch will be released with upcoming version of GCC-10 and GCC-11. Untill then, we can clone patched releases/gcc-10 branch directly for compiling GCC >=10.3.0 binaries for Bullseye to resolve this bug. But we cannot do the same for GCC-10.2.0 since, master branch will also override its version to >10.2.0 rendering it useless for cross-compiling. So just use >=10.3.0 for compiling & cross-compiling tensorflow.

@abhiTronix abhiTronix added Bug 🐛 Error, flaw or fault WIP 🏗️ Work in Progress labels Dec 11, 2021
@abhiTronix abhiTronix added this to the v3.1.0 milestone Dec 11, 2021
@distlibs
Copy link
Author

Binaries cross-compiled with GCC 10.3.0 will be compatible with Raspberry Pi 4 which runs Bullseye with GCC 10.2.1?

@abhiTronix
Copy link
Owner

Yes, aren't you using Raspberry Pi GCC-10.3.0 Native-Compiler Toolchains (Bullseye) right now? The GCC version doesn't matter, but only GLIBC, KERNEL and BINUTILS version matters, which remains the same.

@distlibs
Copy link
Author

distlibs commented Dec 12, 2021

I am using right now GCC-10.2.0 Raspberry Pi Cross-Compiler Toolchains (Bullseye). I made mistake, I updated original post. Download link.

@abhiTronix
Copy link
Owner

Yes, you can use GCC-10.3.0 instead.

@distlibs
Copy link
Author

So I need to wait until you clone patched releases/gcc-10 branch directly and pre-compile GCC 10.3.0 binaries for Bullseye? New Raspberry Pi GCC 10.3.0 Cross-Compiler Toolchains (Bullseye) binaries will be uploaded SourceForge where I can download?

@abhiTronix
Copy link
Owner

abhiTronix commented Dec 12, 2021

You need to wait untill v3.1.0 Toolchains are released, and thereby uploaded to Sourceforge after successful compiling. You should watch this repository to get notify when that happens.

@abhiTronix
Copy link
Owner

@distlibs Patch has been added. Please wait for CI workflows to finish and then I'll make the release.

@abhiTronix abhiTronix reopened this Dec 12, 2021
@abhiTronix
Copy link
Owner

abhiTronix commented Dec 12, 2021

@distlibs v3.1.0-alpha toolchains are in build and soon be available on Sourceforge.

@abhiTronix
Copy link
Owner

This issue has been resolved in the latest Toolchains version v3.1.0-alpha and GCC-10.3.0. Download it from here: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Bullseye/GCC%2010.3.0/

@abhiTronix abhiTronix added Ready to Test 👨‍🔬 Waiting for User to Test the given Solution(s)/Binaries Solved 🎏 Goal Achieved! and removed WIP 🏗️ Work in Progress labels Dec 13, 2021
@distlibs
Copy link
Author

Thanks. Compilation finished successfully using GCC-10.3.0 Raspberry Pi Cross-Compiler Toolchains (Bullseye).

@abhiTronix abhiTronix changed the title Bullseye Toolchain Error: selected processor does not support `vsdot.s8 q10,q9,d4[0]' in ARM mode [Solved] Bullseye Toolchain Error: selected processor does not support `vsdot.s8 q10,q9,d4[0]' in ARM mode Dec 13, 2021
@abhiTronix abhiTronix removed the Ready to Test 👨‍🔬 Waiting for User to Test the given Solution(s)/Binaries label Dec 13, 2021
@abhiTronix abhiTronix pinned this issue Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Error, flaw or fault Solved 🎏 Goal Achieved!
Projects
None yet
Development

No branches or pull requests

2 participants