Repository: pytorch
Issue: How install old version pytorch 1.2.0 from source?
Labels: module: build,triaged

Hi,I'm installing pytorch1.2.0 from source(anaconda,python3.7,ubuntu18.04,cuda9.2).
my commands:
```
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing
conda install -c pytorch magma-cuda92
git clone --recursive https://github.com/pytorch/pytorch
git clone --branch v1.2.0 https://github.com/pytorch/pytorch.git pytorch-1.2.0
cd pytorch-1.2.0
git submodule sync
git submodule update --init --recursive

export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install
```
and then I got an error:
```
Building wheel torch-1.2.0a0+54a63e0
-- Building version 1.2.0a0+54a63e0
cmake --build . --target install --config Release -- -j 16
[2/3113] Performing build step for 'nccl_external'
FAILED: nccl_external-prefix/src/nccl_external-stamp/nccl_external-build nccl/lib/libnccl_static.a 
cd /home/luqian/work/pytorch-1.2.0/third_party/nccl/nccl && env CCACHE_DISABLE=1 SCCACHE_DISABLE=1 make CXX=/usr/bin/c++ CUDA_HOME=/usr/local/cuda NVCC=/usr/local/cuda/bin/nvcc NVCC_GENCODE=-gencode=arch=compute_75,code=sm_75 BUILDDIR=/home/luqian/work/pytorch-1.2.0/build/nccl VERBOSE=0 -j && /home/luqian/anaconda3/bin/cmake -E touch /home/luqian/work/pytorch-1.2.0/build/nccl_external-prefix/src/nccl_external-stamp/nccl_external-build
make -C src build BUILDDIR=/home/luqian/work/pytorch-1.2.0/build/nccl
make[1]: 进入目录“/home/luqian/work/pytorch-1.2.0/third_party/nccl/nccl/src”
make[2]: 进入目录“/home/luqian/work/pytorch-1.2.0/third_party/nccl/nccl/src/collectives/device”
nvcc fatal   : Unsupported gpu architecture 'compute_75'
nvcc fatal   : Unsupported gpu architecture 'compute_75'
Makefile:52: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/all_reduce.dep' failed
make[2]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/all_reduce.dep] Error 1
make[2]: *** 正在等待未完成的任务....
nvcc fatal   : Unsupported gpu architecture 'compute_75'
Makefile:52: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/all_gather.dep' failed
make[2]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/all_gather.dep] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_75'
Makefile:52: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/reduce.dep' failed
make[2]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/reduce.dep] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_75'
Makefile:52: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/reduce_scatter.dep' failed
make[2]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/reduce_scatter.dep] Error 1
Makefile:52: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/broadcast.dep' failed
make[2]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/broadcast.dep] Error 1
nvcc fatal   : Unsupported gpu architecture 'compute_75'
Makefile:52: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/functions.dep' failed
make[2]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/functions.dep] Error 1
make[2]: 离开目录“/home/luqian/work/pytorch-1.2.0/third_party/nccl/nccl/src/collectives/device”
Makefile:49: recipe for target '/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/colldevice.a' failed
make[1]: *** [/home/luqian/work/pytorch-1.2.0/build/nccl/obj/collectives/device/colldevice.a] Error 2
make[1]: 离开目录“/home/luqian/work/pytorch-1.2.0/third_party/nccl/nccl/src”
Makefile:25: recipe for target 'src.build' failed
make: *** [src.build] Error 2
[17/3113] Building CXX object third_party/protobuf/cmake/CMake...dir/__/src/google/protobuf/compiler/csharp/csharp_message.cc.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "setup.py", line 756, in <module>
    build_deps()
  File "setup.py", line 325, in build_deps
    cmake=cmake)
  File "/home/luqian/work/pytorch-1.2.0/tools/build_pytorch_libs.py", line 64, in build_caffe2
    cmake.build(my_env)
  File "/home/luqian/work/pytorch-1.2.0/tools/setup_helpers/cmake.py", line 321, in build
    self.run(build_args, my_env)
  File "/home/luqian/work/pytorch-1.2.0/tools/setup_helpers/cmake.py", line 133, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/home/luqian/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '16']' returned non-zero exit status 1.
```

How can I solve this problem?