[Fail install from source] Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-fbgemm --use-nnpack --use-mkldnn --use-qnnpack caffe2'

Build Fail: Ubuntu16.04, CUDA8.0

[ 37%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_batch_normalization.cpp.o
[ 37%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_dw_conv_kernel_f32.cpp.o
ptxas warning : Too big maxrregcount value specified 96, will be ignored
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvlink fatal   : Internal error: reference to deleted section
Makefile:83: recipe for target '/home/ace/ace/Library/pytorch/build/nccl/obj/collectives/device/devlink.o' failed
make[5]: *** [/home/ace/ace/Library/pytorch/build/nccl/obj/collectives/device/devlink.o] Error 1
Makefile:45: recipe for target 'devicelib' failed
make[4]: *** [devicelib] Error 2
Makefile:25: recipe for target 'src.build' failed
make[3]: *** [src.build] Error 2
CMakeFiles/nccl_external.dir/build.make:110: recipe for target 'nccl_external-prefix/src/nccl_external-stamp/nccl_external-build' failed
make[2]: *** [nccl_external-prefix/src/nccl_external-stamp/nccl_external-build] Error 2
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/nccl_external.dir/all' failed
make[1]: *** [CMakeFiles/nccl_external.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 37%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_dw_convolution.cpp.o
[ 37%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_eltwise.cpp.o
[ 37%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_lrn.cpp.o
[ 37%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_lrn_kernel_f32.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_pool_kernel_f32.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_pooling.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_reorder.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/jit_uni_reorder_utils.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/nchw_pooling.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ncsp_batch_normalization.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/nhwc_pooling.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/nspc_batch_normalization.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_batch_normalization.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_convolution.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_deconvolution.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_eltwise.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_inner_product.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_lrn.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_pooling.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_rnn.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_shuffle.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/ref_softmax.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/simple_concat.cpp.o
[ 38%] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir/cpu/simple_sum.cpp.o
[ 38%] Linking CXX shared library ../../../../lib/libmkldnn.so
[ 38%] Built target mkldnn
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-fbgemm --use-nnpack --use-mkldnn --use-qnnpack caffe2'

after I install without mkl. there is another bug of libonnx !!!

[ 43%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/onnxifi_utils.cc.o
[ 43%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/optimizer/optimize.cc.o
[ 43%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/optimizer/pass.cc.o
[ 44%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/optimizer/pass_manager.cc.o
[ 44%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/optimizer/pass_registry.cc.o
[ 44%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/shape_inference/implementation.cc.o
[ 44%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/version_converter/convert.cc.o
[ 44%] Building CXX object third_party/onnx/CMakeFiles/onnx.dir/onnx/version_converter/helper.cc.o
[ 44%] Linking CXX static library ../../lib/libonnx.a
[ 44%] Built target onnx
Makefile:140: recipe for target 'all' failed

Hey there this is a new bug that has been encountered lately by many users and even by me. Would you please give me the specifications of your PC. Whats the environment, OS, Cuda yes/no etc.

Also please refer to this link here and try to follow the steps as per the blog

The blog version is to install in Non-Cuda devices and hence a flag

export NO_CUDA=1 

is used, you can omit the use of this flag and follow all the other steps.

More Information:
Ubuntu: 16.04
CUDA: 8.0
cudnn: 6.0
python: 3.6
cmake: 3.12
gcc: 5.4

(The GPU device of my computer is older, which is compute_21 — so I can not use conda install xxx to install pytorch (which only support device>=3.0))

The previous version 0.2~0.5 is well in my computer

@paul_c try with the link I provided it should solve your problem cause it helped me to install pytorch on a dev-board which is not a piece of cake. :wink:

thank you! @Amrit_Das. To be honest, the cpu version is ok. However, I want to install GPU verion. And this may caused by my device.