Maratyszcza / NNPACK

Acceleration package for neural networks on multi-core CPUs
BSD 2-Clause "Simplified" License
1.68k stars 316 forks source link

arm_neon.h: No such file or directory #89

Closed dragonj123 closed 7 years ago

dragonj123 commented 7 years ago

I tried to build NNPACK for ARM Neon. I used 748b9e1 based on a previous issue comment. I kept having the following build error. I am not sure if this is a problem from my configuration or the code. Does anyone have built for neon successfully?

[1/132] CC src/neon/blas/s4c2gemm-conjb.c FAILED: /home/jilwu/jilwu_ws/nnpack/NNPACK/build/src/neon/blas/s4c2gemm-conjb.c.o gcc -o /home/jilwu/jilwu_ws/nnpack/NNPACK/build/src/neon/blas/s4c2gemm-conjb.c.o -c /home/jilwu/jilwu_ws/nnpack/NNPACK/src/neon/blas/s4c2gemm-conjb.c -MMD -MF /home/jilwu/jilwu_ws/nnpack/NNPACK/build/src/neon/blas/s4c2gemm-conjb.c.o.d -O2 -std=gnu99 -g -pthread -I/home/jilwu/jilwu_ws/nnpack/NNPACK/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/src/x86_64-fma -I/home/jilwu/jilwu_ws/nnpack/NNPACK/src -I/home/jilwu/jilwu_ws/nnpack/NNPACK/src/ref -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/pthreadpool/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/fxdiv/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/fp16/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/psimd/include In file included from /home/jilwu/jilwu_ws/nnpack/NNPACK/src/neon/blas/s4c2gemm-conjb.c:4:0: /home/jilwu/jilwu_ws/nnpack/NNPACK/include/nnpack/arm_neon.h:3:22: fatal error: arm_neon.h: No such file or directory compilation terminated. [2/132] CC src/neon/blas/s4gemm.c FAILED: /home/jilwu/jilwu_ws/nnpack/NNPACK/build/src/neon/blas/s4gemm.c.o gcc -o /home/jilwu/jilwu_ws/nnpack/NNPACK/build/src/neon/blas/s4gemm.c.o -c /home/jilwu/jilwu_ws/nnpack/NNPACK/src/neon/blas/s4gemm.c -MMD -MF /home/jilwu/jilwu_ws/nnpack/NNPACK/build/src/neon/blas/s4gemm.c.o.d -O2 -std=gnu99 -g -pthread -I/home/jilwu/jilwu_ws/nnpack/NNPACK/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/src/x86_64-fma -I/home/jilwu/jilwu_ws/nnpack/NNPACK/src -I/home/jilwu/jilwu_ws/nnpack/NNPACK/src/ref -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/pthreadpool/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/fxdiv/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/fp16/include -I/home/jilwu/jilwu_ws/nnpack/NNPACK/deps/psimd/include In file included from /home/jilwu/jilwu_ws/nnpack/NNPACK/src/neon/blas/s4gemm.c:4:0: /home/jilwu/jilwu_ws/nnpack/NNPACK/include/nnpack/arm_neon.h:3:22: fatal error: arm_neon.h: No such file or directory compilation terminated. ninja: build stopped: subcommand failed.

Maratyszcza commented 7 years ago

Yes, I regularly build NNPACK for ARM/ARM64.

Do you build on an ARM system? arm_neon.h is the standard header for Neon intrinsics, it should have been installed with your compiler.

dragonj123 commented 7 years ago

Got it. Thanks! Let me try and fix this now.

qqdog123 commented 7 years ago

@Maratyszcza How to do cross-compile for ARM? I dont quite understand build.ninja to change the configuration. Any guidelines on how to specify compiler when build?

Maratyszcza commented 7 years ago

Cross-compilation for ARM/Linux is not supported.