Because pytorch do not have binary version for ppc64le, I build it from source.
I fix some dependency like a guide in ibm website. It figure out that mkl do not need on ppc64le and I also compile magma to fit the dependency.
By the way, I use anaconda3 as the environment and install numpy, cmake, pyyaml and cffi from conda with python3.6.
After I run the command “python setup.py install”, the program show the error information like that:
– Using python found in /root/anaconda3/envs/pytorch/bin/python
CMake Error at src/ATen/cpu/cpuinfo/CMakeLists.txt:51 (MESSAGE):
Unrecognized CMAKE_SYSTEM_PROCESSOR = ppc64le
No.51 and 50 row in that file is:
ELSEIF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES “^(i686|AMD64|x86_64|armv5te|armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|arm64|aarch64)$”)
MESSAGE(FATAL_ERROR “Unrecognized CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}”)
I add ppc64le into the MATCH array like this:
ELSEIF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES “^(i686|AMD64|x86_64|armv5te|armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|arm64|aarch64|ppc64le)$”)
The compiling also failed. The hint is:
/root/pytorch/aten/src/ATen/cpu/cpuinfo/src/init.c: In function ‘cpuinfo_initialize’:
/root/pytorch/aten/src/ATen/cpu/cpuinfo/src/init.c:50:3: error: #error Unsupported target architecture
#error Unsupported target architecture
^
src/ATen/cpu/cpuinfo/CMakeFiles/cpuinfo.dir/build.make:62: recipe for target ‘src/ATen/cpu/cpuinfo/CMakeFiles/cpuinfo.dir/src/init.c.o’ failed
make[2]: *** [src/ATen/cpu/cpuinfo/CMakeFiles/cpuinfo.dir/src/init.c.o] Error 1
CMakeFiles/Makefile2:376: recipe for target ‘src/ATen/cpu/cpuinfo/CMakeFiles/cpuinfo.dir/all’ failed
make[1]: *** [src/ATen/cpu/cpuinfo/CMakeFiles/cpuinfo.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
Scanning dependencies of target tbb_static
…
[ 12%] Building CXX object src/ATen/cpu/tbb/CMakeFiles/tbb_static.dir/tbb_remote/src/tbb/task_group_context.cpp.o
[ 12%] Built target aten_files_are_generated
[ 12%] Linking CXX static library libtbb_static.a
[ 12%] Built target tbb_static
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
I don’t know why the problem happens.
Cmake in anaconda support ppc64le, but the configuration in CMakeLists shows that ppc64le is not supported.
Does pytorch support the architecture?