Repository: pytorch
Issue: cmake error
Labels: caffe2

building caffe2 with gpu exits with the following log output 

System Info : 
> PyTorch version: 0.4.0
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 18.04 LTS
GCC version: (Ubuntu 7.3.0-16ubuntu3) 7.3.0
CMake version: version 3.10.2
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.2.88
GPU models and configuration: GPU 0: Tesla V100-SXM2-16GB
Nvidia driver version: 396.26
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a
Versions of relevant libraries:
[pip3] numpy (1.14.4)
[conda] cuda90                    1.0                  h6433d27_0    pytorch
[conda] pytorch                   0.4.0           py36_cuda9.0.176_cudnn7.1.2_1  [cuda90]  pytorch
[conda] torchvision               0.2.1                    py36_1    pytorch


Build command used : 
> ./pytorch/scripts/build_anaconda.sh --install-locally --cuda 9.0 --cudnn 7

Since the build file exits if I provide it with : 
> ./pytorch/scripts/build_anaconda.sh --install-locally --cuda 9.2 --cudnn 7

_Even tensorflow has this problem for cuda 9.2 so I had installed the cuda 9.0 toolkit as well. Error while using cuda 9.0 toolkit (if I build with path containing "..............**:/usr/local/cuda-9.0/bin/:**..............", instead of "........................**:/usr/local/cuda-9.2/bin/:**......................"):_ 
> CUDA 9.0 is not compatible with std::tuple from GCC version >= 6. Please upgrade to CUDA 9.2 or use the following option to use another version (for example)

So I did use cuda 9.2 in path variable but build it using argument of --cuda 9.0

This time it finally did start building but exists at 74%  with the following : 

> [ 74%] Linking CXX shared library ../../lib/libcaffe2_observers.so
[ 74%] Built target caffe2_observers
[ 74%] Linking CXX shared module python/caffe2_pybind11_state.cpython-36m-x86_64-linux-gnu.so
[ 74%] Built target caffe2_pybind11_state
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 420, in main
    execute(sys.argv[1:])
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 411, in execute
    verify=args.verify)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/api.py", line 200, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/build.py", line 2168, in build_tree
    notest=notest,
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/build.py", line 1408, in build
    utils.check_call_env(cmd, env=env, cwd=src_dir, stats=build_stats)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/utils.py", line 300, in check_call_env
    return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/conda_build/utils.py", line 280, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-e', '/home/ubuntu/anaconda3/conda-bld/caffe2-cuda9.0-cudnn7_1530219711645/work/conda_build.sh']' returned non-zero exit status 2.
 



Aim : to run detectron on my env. Please advice as to what to do ?