Compile Error, How can I fix it?

When I compiled PyTorch v1.5 and v1.6, I always failed 51% of the time.

collect_env.py:

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: CentOS Linux release 7.6.1810 (AltArch)
GCC version: (GCC) 9.2.0
CMake version: version 3.16.5

Python version: 3.7
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.19.1
[conda] Could not collect

And uname -a:

Linux aln220 4.14.0-115.el7a.0.1.aarch64 #1 SMP Sun Nov 25 20:54:21 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

And in the CMakeError.log, I found the following message:

Run Build Command(s):/usr/bin/gmake cmTC_8212c/fast && /usr/bin/gmake -f CMakeFiles/cmTC_8212c.dir/build.make CMakeFiles/cmTC_8212c.dir/build
gmake[1]: Entering directory `/GPUFS/nsccgz_xliao_lds/pytorch/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8212c.dir/src.c.o
/usr/local/bin/gcc   -fopenmp -DNDEBUG -Wno-ignored-qualifiers -Wno-absolute-value -DCOMPILER_SUPPORTS_SVE -march=armv8-a+sve -fPIE   -o CMakeFiles/cmTC_8212c.dir/src.c.o   -c /GPUFS/nsccgz_xliao_lds/pytorch/build/CMakeFiles/CMakeTmp/src.c
/GPUFS/nsccgz_xliao_lds/pytorch/build/CMakeFiles/CMakeTmp/src.c:2:12: fatal error: arm_sve.h: No such file or directory
    2 |   #include <arm_sve.h>
      |            ^~~~~~~~~~~
compilation terminated.
gmake[1]: *** [CMakeFiles/cmTC_8212c.dir/src.c.o] Error 1
gmake[1]: Leaving directory `/GPUFS/nsccgz_xliao_lds/pytorch/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_8212c/fast] Error 2

Hey, I used to get this very error when I used to build for arm64. Then when I built without QNN_PACK, and PYTORCH_QNN_PACK it worked. I also found that the tag v1.4.0 I was able to build with PYTORCH_QNN_PACK. So if you don’t need QNN_PACK (this is for low-precision fast inference on small devices, I believe), you can try that till it is fixed. I also have a repo, in which I have built some wheels if you need Pytorch ARM Builds.

1 Like

Thank you very much! I will try it , thanks for your general help