-
Notifications
You must be signed in to change notification settings - Fork 408
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
llvm toolchain #202
Comments
Try to disable NE10_ASM_OPTIMIZATION parameter. |
Let me explain my setup:
is there a script (or somting) I can use? |
You can use intrinsic versions instead of asm, here where it's configured in cmake:
|
thank you very much for your quick answer. so I understand that in the intrinsics vertion I don't need any of the assemby sources, am I right? thank you in advance |
You don't need the assembly sources if you use intrinsics. The performance of the intrinsics version depends on the compile very much. There are cases where the intrinsics version is a little bit faster. Usually, with a latest compiler, the difference is not significant. |
OK, trying to build the library with the VxWorks doesn't support the intrinsics (it fails at build time) and even windrever themselves can't build it. I am trying a different approch and crosscompile it with cmake (like it supposed to be built). my setup is: I edited the toolchain file to (after successful cross-compiling with gcc linario as a refference in a linux virtual machine): I skipped the compiler testing (it fails when the cmake uses operating system utilities whitch I don't care for because I need to integrate to a different OS) and set the C compiler to calng-cl and the CXX to clang++ it builds until it gets to a neon intrinsics object file (NE10_fft_float32.neonintrinsics.c.obj) what do I do now? |
So, your compiler do not support intrinsics and gcc asm syntax. You can only build generic C version using this tools them. But why you are using clang if your target is cortex? Why not gcc-aarch64-linux-gnu? Here base sample https://github.com/jserv/armv8-hello |
I've checked that NDK`s clang supports intrinsics. Some intrinsics relocated to different include file:
So, if you can bypass ABI differences, you can try NDK clang compiler. |
I did managged to run only the pure C implimimentation. for example I succeed with the ne10_mulmat_3x3f_c and failed in ne10_mulmat_3x3f_neon (and ne10_mulmat_3x3f_asm). it seems my problem is more than the neon assembly but the gnu assembly in general. I did compiled the library with gcc-linaro successfully and tryied linking it with the VxWorks kernel (I have to compile the kernel with windriver toolchain for ARMv8A whitch is based on llvm3.8) but when I call functions from the library I get undefined reference (I assume it is ABI incompatability because I see the linker links the library). |
Hmm, it can be float ABI difference. I remember same link problem when code compiled with different -mfloat-abi . But it correctly point about ABI difference, not just symbol not found. May be your linker just ignore symbol silently. |
I barely remember, ABI information stored in section .ARM.attributes, you can compare this section from two compilers, they should be same. |
OK a little progress: I managed to build the library with llvm also. I am trying to link the library to the VIP project. when I add calls to functions from the .a library I get a undefined reference error. It is the same phenomenon I saw when I build the library with gcc-linaro (but now I build the kernel and the NE10 library with the same toolchain)! |
SOLVED. I used the cmake gui to set all the tools of the llvm toolchain (I needed the linker) it built the dsp and imageproc but I need math also. |
I tryied compiling the library for crosscompilation for ARMv8 with llvm3.8 toolchain (it supports the NEON intrinsics well).
It seems the compiler does not recognize the assembler in the NE10 library.
Is there a source fit for the llvm toolchain?
Is there a script I can use manipulate the assemler to be supported?
The text was updated successfully, but these errors were encountered: