Hi all,
I’m trying to install pytorch from source, but I’m getting the “ninja: build stopped: subcomman failed. error”. Here are the versions I’m using:
Ubuntu: 16.04.5 LTS
GCC: 5.4.0
CUDA: 11.0
CUDNN: 8.1.0
Python: 3.8.8
pytorch: latest, just cloned from git
The error message I get is
[2708/6039] Building CXX object third_party/ideep/mkl-dnn/src/cpu/CMakeFiles/dnnl_cpu.dir/cpu_reorder.cpp.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File “setup.py”, line 876, in
build_deps()
File “setup.py”, line 354, in build_deps
build_caffe2(version=version,
File “/local/scratch/public/pytorch/tools/build_pytorch_libs.py”, line 58, in build_caffe2
cmake.build(my_env)
File “/local/scratch/public/pytorch/tools/setup_helpers/cmake.py”, line 345, in build
self.run(build_args, my_env)
File “/local/scratch/public/pytorch/tools/setup_helpers/cmake.py”, line 140, in run
check_call(command, cwd=self.build_dir, env=env)
File “/alt/applic/user-maint/tb588/Conda/envs/pytorch_env/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘48’]’ returned non-zero exit status 1.
I tried
git clean -xdf
python setup.py clean
git submodule sync
git submodule deinit -f .
git submodule update --init --recursive
python setup.py install
but that didn’t help. Does anyone know how to fix this?
Thanks!