Repository: pytorch
Issue: cudnn not found
Labels: module: build,module: cudnn,triaged,actionable

When I build from source on tag v1.0.0 it doesn't detect cudnn. I use arch linux and in the latest release arch has moved cudnn to standard locations (/usr/lib and /usr/include).

When I run the following, cudnn is not detected:
```
python setup.py install
```
But when I run it with the following cudnn is detected:
```
CUDNN_INCLUDE_DIR=/usr/include CUDNN_LIBRARY=/usr/lib python setup.py install
```
 - PyTorch Version : 1.0.0
 - OS (e.g., Linux): Arch linux
 - How you installed PyTorch : source
 - Python version: 3.7
 - CUDA: 10
 - cuDNN version: 7.4.1
 - GPU models and configuration: Nvidia GTX 1050

log when cudnn not detected:
```
Building wheel torch-1.0.0a0+db5d313
running install
setup.py::run()
running build_deps
setup.py::build_deps::run()
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x '' ']'
+ CMAKE_COMMAND=cmake
++ command -v cmake3
+ [[ -x '' ]]
+ USE_CUDA=0
+ USE_FBGEMM=0
+ USE_ROCM=0
+ USE_NNPACK=0
+ USE_MKLDNN=0
+ USE_QNNPACK=0
+ USE_GLOO_IBVERBS=0
+ CAFFE2_STATIC_LINK_CUDA=0
+ RERUN_CMAKE=1
+ [[ 5 -gt 0 ]]
+ case "$1" in
+ USE_CUDA=1
+ shift
+ [[ 4 -gt 0 ]]
+ case "$1" in
+ USE_NNPACK=1
+ shift
+ [[ 3 -gt 0 ]]
+ case "$1" in
+ USE_MKLDNN=1
+ shift
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ USE_QNNPACK=1
+ shift
+ [[ 1 -gt 0 ]]
+ case "$1" in
+ break
+ CMAKE_INSTALL='make install'
+ BUILD_SHARED_LIBS=ON
+ USER_CFLAGS=
+ USER_LDFLAGS=
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
++ uname
+ '[' Linux == Darwin ']'
+++ dirname ../tools/build_pytorch_libs.sh
++ cd ../tools/..
+++ pwd
++ printf '%q\n' /home/amsha/builds/pytorch
+ BASE_DIR=/home/amsha/builds/pytorch
+ TORCH_LIB_DIR=/home/amsha/builds/pytorch/torch/lib
+ INSTALL_DIR=/home/amsha/builds/pytorch/torch/lib/tmp_install
+ THIRD_PARTY_DIR=/home/amsha/builds/pytorch/third_party
+ C_FLAGS=
+ C_FLAGS=' -DOMPI_SKIP_MPICXX=1'
+ LDFLAGS=
+ LD_POSTFIX=.so
++ uname
+ [[ Linux == \D\a\r\w\i\n ]]
+ [[ 0 -eq 1 ]]
+ LDFLAGS=' -Wl,-rpath,$ORIGIN'
+ CPP_FLAGS=' -std=c++11 '
+ THD_FLAGS=
+ [[ 0 -eq 1 ]]
+ CUDA_NVCC_FLAGS=' -DOMPI_SKIP_MPICXX=1'
+ [[ -z '' ]]
+ CUDA_DEVICE_DEBUG=0
+ '[' -z '' ']'
++ getconf _NPROCESSORS_ONLN
+ MAX_JOBS=8
+ BUILD_TYPE=Release
+ [[ -n '' ]]
+ [[ -n '' ]]
+ echo 'Building in Release mode'
Building in Release mode
+ mkdir -p /home/amsha/builds/pytorch/torch/lib/tmp_install
+ for arg in "$@"
+ [[ caffe2 == \c\a\f\f\e\2 ]]
+ build_caffe2
+ [[ -z '' ]]
+ EXTRA_CAFFE2_CMAKE_FLAGS=()
+ [[ -n '' ]]
+ [[ -n /home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages ]]
+ EXTRA_CAFFE2_CMAKE_FLAGS+=("-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH")
+ [[ 1 -eq 1 ]]
+ cmake /home/amsha/builds/pytorch -DPYTHON_EXECUTABLE=/home/amsha/virtualenv/torch-1.0-20181213/bin/python -DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so.1.0 -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m -DBUILDING_WITH_TORCH_LIBS=ON -DTORCH_BUILD_VERSION=1.0.0a0+db5d313 -DCMAKE_BUILD_TYPE=Release -DBUILD_TORCH=ON -DBUILD_PYTHON=ON -DBUILD_SHARED_LIBS=ON -DBUILD_BINARY=OFF -DBUILD_TEST=ON -DINSTALL_TEST=ON -DBUILD_CAFFE2_OPS=ON -DONNX_NAMESPACE=onnx_torch -DUSE_CUDA=1 -DUSE_DISTRIBUTED=ON -DUSE_FBGEMM=0 -DUSE_NUMPY= -DNUMPY_INCLUDE_DIR=/usr/lib/python3.7/site-packages/numpy/core/include -DUSE_SYSTEM_NCCL=OFF -DNCCL_INCLUDE_DIR= -DNCCL_ROOT_DIR= -DNCCL_SYSTEM_LIB= -DCAFFE2_STATIC_LINK_CUDA=0 -DUSE_ROCM=0 -DUSE_NNPACK=1 -DUSE_LEVELDB=OFF -DUSE_LMDB=OFF -DUSE_OPENCV=OFF -DUSE_QNNPACK=1 -DUSE_FFMPEG=OFF -DUSE_GLOG=OFF -DUSE_GFLAGS=OFF -DUSE_SYSTEM_EIGEN_INSTALL=OFF -DCUDNN_INCLUDE_DIR=/usr/include -DCUDNN_LIB_DIR=/usr -DCUDNN_LIBRARY=/usr/lib -DUSE_MKLDNN=1 -DNCCL_EXTERNAL=1 -DCMAKE_INSTALL_PREFIX=/home/amsha/builds/pytorch/torch/lib/tmp_install -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= '-DCMAKE_EXE_LINKER_FLAGS= -Wl,-rpath,$ORIGIN ' '-DCMAKE_SHARED_LINKER_FLAGS= -Wl,-rpath,$ORIGIN ' -DTHD_SO_VERSION=1 -DCMAKE_PREFIX_PATH=/home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages
-- std::exception_ptr is supported.
-- NUMA is available
-- Turning off deprecation warning due to glog.
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
-- Caffe2 protobuf include directory: $<BUILD_INTERFACE:/home/amsha/builds/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
-- The BLAS backend of choice:MKL
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel_lp64: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so
--   Library mkl_gnu_thread: /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so
--   Library mkl_core: /opt/intel/mkl/lib/intel64/libmkl_core.so
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Found OpenMP: TRUE   
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/libpthread.so
--   Library m: /usr/lib/libm.so
--   Library dl: /usr/lib/libdl.so
-- Brace yourself, we are building NNPACK
-- Found PythonInterp: /home/amsha/virtualenv/torch-1.0-20181213/bin/python (found version "3.7.1") 
-- LLVM FileCheck Found: /usr/bin/FileCheck
-- git Version: v1.4.0-505be96a
-- Version: 1.4.0
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Found Numa  (include: /usr/include, library: /usr/lib/libnuma.so)
-- Using third party subdirectory Eigen.
Python 3.7.1
-- Found PythonInterp: /home/amsha/virtualenv/torch-1.0-20181213/bin/python (found suitable version "3.7.1", minimum required is "2.7") 
-- Could NOT find pybind11 (missing: pybind11_DIR)
-- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) 
-- Using third_party/pybind11.
-- MPI support found
-- MPI compile flags: 
-- MPI include path: /usr/include
-- MPI LINK flags path: -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -pthread
-- MPI libraries: /usr/lib/openmpi/libmpi_cxx.so/usr/lib/openmpi/libmpi.so
[amsha-arch:11971] mca_base_component_repository_open: unable to open mca_fcoll_dynamic: /usr/lib/openmpi/openmpi/mca_fcoll_dynamic.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
[amsha-arch:11971] mca_base_component_repository_open: unable to open mca_fcoll_individual: /usr/lib/openmpi/openmpi/mca_fcoll_individual.so: undefined symbol: mca_common_ompio_file_write (ignored)
[amsha-arch:11971] mca_base_component_repository_open: unable to open mca_fcoll_two_phase: /usr/lib/openmpi/openmpi/mca_fcoll_two_phase.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
[amsha-arch:11971] mca_base_component_repository_open: unable to open mca_fcoll_dynamic_gen2: /usr/lib/openmpi/openmpi/mca_fcoll_dynamic_gen2.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
[amsha-arch:11971] mca_base_component_repository_open: unable to open mca_fcoll_static: /usr/lib/openmpi/openmpi/mca_fcoll_static.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
CMake Warning at cmake/Dependencies.cmake:619 (message):
  OpenMPI found, but it is not built with CUDA support.
Call Stack (most recent call first):
  CMakeLists.txt:201 (include)


-- Found CUDA: /opt/cuda (found suitable version "10.0", minimum required is "7.0") 
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /opt/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /opt/cuda
-- Caffe2: Header version is: 10.0
-- Found CUDNN: /usr/include  
-- Found cuDNN: v7.4.1  (include: /usr/include, library: /usr/lib)
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;7.0;7.0+PTX
-- Added CUDA NVCC flags for: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_70,code=compute_70
-- Could NOT find CUB (missing: CUB_INCLUDE_DIR) 
-- MPI include path: /usr/include
-- MPI libraries: /usr/lib/openmpi/libmpi_cxx.so/usr/lib/openmpi/libmpi.so
-- CUDA detected: 10.0
-- 
-- ******** Summary ********
--   CMake version         : 3.13.1
--   CMake command         : /usr/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 8.2.1
--   CXX flags             :  -Wno-deprecated -fvisibility-inlines-hidden -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL
--   CMAKE_PREFIX_PATH     : /home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages
--   CMAKE_INSTALL_PREFIX  : /home/amsha/builds/pytorch/torch/lib/tmp_install
--   CMAKE_MODULE_PATH     : /home/amsha/builds/pytorch/cmake/Modules;/home/amsha/builds/pytorch/cmake/public/../Modules_CUDA_fix
-- 
--   ONNX version          : 1.3.0
--   ONNX NAMESPACE        : onnx_torch
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
-- 
--   Protobuf compiler     : 
--   Protobuf includes     : 
--   Protobuf libraries    : 
--   BUILD_ONNX_PYTHON     : OFF
-- Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor
-- Removing -DNDEBUG from compile flags
-- MAGMA not found. Compiling without MAGMA support
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- AVX compiler support found
-- AVX2 compiler support found
-- Atomics: using C11 intrinsics
-- Found a library with BLAS API (mkl).
-- Found a library with LAPACK API. (mkl)
-- Found CUDA: /opt/cuda (found suitable version "10.0", minimum required is "5.5") 
disabling ROCM because NOT USE_ROCM is set
-- MIOpen not found. Compiling without MIOpen support
CMake Deprecation Warning at third_party/ideep/mkl-dnn/CMakeLists.txt:21 (cmake_policy):
  The OLD behavior for policy CMP0048 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at third_party/ideep/mkl-dnn/CMakeLists.txt:22 (cmake_policy):
  The OLD behavior for policy CMP0054 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Detecting Intel(R) MKL: trying mklml_intel
-- Intel(R) MKL: include /opt/intel/mkl/include
-- Intel(R) MKL: lib /opt/intel/mkl/lib/intel64/libmkl_rt.so
-- Intel(R) MKL: OpenMP lib -fopenmp
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- VTune profiling environment is unset
CMake Warning (dev) at cmake/public/mkldnn.cmake:1 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable MKLDNN_ROOT is set to:

    /home/amsha/builds/pytorch/third_party/ideep/mkl-dnn

  For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1309 (INCLUDE)
  CMakeLists.txt:201 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- GCC 8.2.1: Adding gcc and gcc_s libs to link line
-- Using python found in /home/amsha/virtualenv/torch-1.0-20181213/bin/python
-- Configuring build for SLEEF-v3.2
   Target system: Linux-4.18.16-arch1-1-ARCH
   Target processor: x86_64
   Host system: Linux-4.18.16-arch1-1-ARCH
   Host processor: x86_64
   Detected C compiler: GNU @ /usr/bin/cc
-- Using option `-Wall -Wno-unused -Wno-attributes -Wno-unused-result -Wno-psabi -ffp-contract=off -fno-math-errno -fno-trapping-math` to compile libsleef
-- Building shared libs : OFF
-- MPFR : /usr/lib/libmpfr.so
-- MPFR header file in /usr/include
-- GMP : /usr/lib/libgmp.so
-- RUNNING_ON_TRAVIS : 0
-- COMPILER_SUPPORTS_OPENMP : 1
-- Using python found in /home/amsha/virtualenv/torch-1.0-20181213/bin/python
-- /usr/bin/c++ /home/amsha/builds/pytorch/torch/abi-check.cpp -o /home/amsha/builds/pytorch/build/abi-check
-- Determined _GLIBCXX_USE_CXX11_ABI=1
-- Found CUDA: /opt/cuda (found suitable version "10.0", minimum required is "7.5") 
-- MPI_LIBRARIES: /usr/lib/openmpi/libmpi_cxx.so;/usr/lib/openmpi/libmpi.so
-- Building the gloo backend with TCP support only
-- MPI_LINK_FLAGS: -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -pthread
-- Found CUDA: /opt/cuda (found version "10.0") 
-- Building C10D with CUDA support
-- MPI_INCLUDE_PATH: /usr/include
-- MPI_LIBRARIES: /usr/lib/openmpi/libmpi_cxx.so;/usr/lib/openmpi/libmpi.so
-- MPIEXEC: /usr/bin/mpiexec
-- Include NCCL operators
-- Including IDEEP operators
-- Excluding image processing operators due to no opencv
-- Excluding video processing operators due to no opencv
-- Include Observer library
-- Using lib/python3.7/site-packages as python relative installation path
-- Automatically generating missing __init__.py files.
-- A previous caffe2 cmake run already created the __init__.py files.
CMake Warning at CMakeLists.txt:389 (message):
  Generated cmake files are only fully tested if one builds with system glog,
  gflags, and protobuf.  Other settings may generate files that are not well
  tested.


-- 
-- ******** Summary ********
-- General:
--   CMake version         : 3.13.1
--   CMake command         : /usr/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 8.2.1
--   BLAS                  : MKL
--   CXX flags             :  -Wno-deprecated -fvisibility-inlines-hidden -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-stringop-overflow
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL;ONNX_NAMESPACE=onnx_torch;USE_C11_ATOMICS=1;HAVE_MMAP=1;_FILE_OFFSET_BITS=64;HAVE_SHM_OPEN=1;HAVE_SHM_UNLINK=1;HAVE_MALLOC_USABLE_SIZE=1
--   CMAKE_PREFIX_PATH     : /home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages
--   CMAKE_INSTALL_PREFIX  : /home/amsha/builds/pytorch/torch/lib/tmp_install
-- 
--   TORCH_VERSION         : 1.0.0
--   CAFFE2_VERSION        : 1.0.0
--   BUILD_ATEN_MOBILE     : OFF
--   BUILD_ATEN_ONLY       : OFF
--   BUILD_BINARY          : OFF
--   BUILD_CUSTOM_PROTOBUF : ON
--     Link local protobuf : ON
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : ON
--     Python version      : 3.7.1
--     Python executable   : /home/amsha/virtualenv/torch-1.0-20181213/bin/python
--     Pythonlibs version  : 3.7.1
--     Python library      : /usr/lib/libpython3.7m.so.1.0
--     Python includes     : /usr/include/python3.7m
--     Python site-packages: lib/python3.7/site-packages
--   BUILD_CAFFE2_OPS      : ON
--   BUILD_SHARED_LIBS     : ON
--   BUILD_TEST            : ON
--   USE_ASAN              : OFF
--   USE_CUDA              : 1
--     CUDA static link    : 0
--     USE_CUDNN           : OFF
--     CUDA version        : 10.0
--     CUDA root directory : /opt/cuda
--     CUDA library        : /usr/lib/libcuda.so
--     cudart library      : /opt/cuda/lib64/libcudart_static.a;-pthread;dl;/usr/lib/librt.so
--     cublas library      : /opt/cuda/lib64/libcublas.so
--     cufft library       : /opt/cuda/lib64/libcufft.so
--     curand library      : /opt/cuda/lib64/libcurand.so
--     nvrtc               : /opt/cuda/lib64/libnvrtc.so
--     CUDA include path   : /opt/cuda/include
--     NVCC executable     : /opt/cuda/bin/nvcc
--     CUDA host compiler  : /usr/bin/cc
--     USE_TENSORRT        : OFF
--   USE_ROCM              : 0
--   USE_EIGEN_FOR_BLAS    : 
--   USE_FBGEMM            : 0
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : OFF
--   USE_GLOG              : OFF
--   USE_LEVELDB           : OFF
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : OFF
--   USE_METAL             : OFF
--   USE_MKL               : ON
--   USE_MKLDNN            : ON
--   USE_MOBILE_OPENGL     : OFF
--   USE_NCCL              : ON
--     USE_SYSTEM_NCCL     : OFF
--   USE_NNPACK            : 1
--   USE_NUMPY             : ON
--   USE_OBSERVERS         : ON
--   USE_OPENCL            : OFF
--   USE_OPENCV            : OFF
--   USE_OPENMP            : OFF
--   USE_PROF              : OFF
--   USE_QNNPACK           : 1
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_ZMQ               : OFF
--   USE_DISTRIBUTED       : ON
--     USE_MPI             : ON
--     USE_GLOO            : ON
--     USE_GLOO_IBVERBS    : OFF
--   Public Dependencies  : Threads::Threads;caffe2::mkl;caffe2::mkldnn
--   Private Dependencies : qnnpack;nnpack;cpuinfo;/usr/lib/libnuma.so;fp16;/usr/lib/openmpi/libmpi_cxx.so;/usr/lib/openmpi/libmpi.so;gloo;aten_op_header_gen;onnxifi_loader;rt;gcc_s;gcc;dl
-- Configuring done
-- Generating done
```

When run with the CUDNN paths set:
```
Building wheel torch-1.0.0a0+db5d313
running install
setup.py::run()
running build_deps
setup.py::build_deps::run()
+ SYNC_COMMAND=cp
++ command -v rsync
+ '[' -x '' ']'
+ CMAKE_COMMAND=cmake
++ command -v cmake3
+ [[ -x '' ]]
+ USE_CUDA=0
+ USE_FBGEMM=0
+ USE_ROCM=0
+ USE_NNPACK=0
+ USE_MKLDNN=0
+ USE_QNNPACK=0
+ USE_GLOO_IBVERBS=0
+ CAFFE2_STATIC_LINK_CUDA=0
+ RERUN_CMAKE=1
+ [[ 5 -gt 0 ]]
+ case "$1" in
+ USE_CUDA=1
+ shift
+ [[ 4 -gt 0 ]]
+ case "$1" in
+ USE_NNPACK=1
+ shift
+ [[ 3 -gt 0 ]]
+ case "$1" in
+ USE_MKLDNN=1
+ shift
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ USE_QNNPACK=1
+ shift
+ [[ 1 -gt 0 ]]
+ case "$1" in
+ break
+ CMAKE_INSTALL='make install'
+ BUILD_SHARED_LIBS=ON
+ USER_CFLAGS=
+ USER_LDFLAGS=
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
++ uname
+ '[' Linux == Darwin ']'
+++ dirname ../tools/build_pytorch_libs.sh
++ cd ../tools/..
+++ pwd
++ printf '%q\n' /home/amsha/builds/pytorch
+ BASE_DIR=/home/amsha/builds/pytorch
+ TORCH_LIB_DIR=/home/amsha/builds/pytorch/torch/lib
+ INSTALL_DIR=/home/amsha/builds/pytorch/torch/lib/tmp_install
+ THIRD_PARTY_DIR=/home/amsha/builds/pytorch/third_party
+ C_FLAGS=
+ C_FLAGS=' -DOMPI_SKIP_MPICXX=1'
+ LDFLAGS=
+ LD_POSTFIX=.so
++ uname
+ [[ Linux == \D\a\r\w\i\n ]]
+ [[ 0 -eq 1 ]]
+ LDFLAGS=' -Wl,-rpath,$ORIGIN'
+ CPP_FLAGS=' -std=c++11 '
+ THD_FLAGS=
+ [[ 0 -eq 1 ]]
+ CUDA_NVCC_FLAGS=' -DOMPI_SKIP_MPICXX=1'
+ [[ -z '' ]]
+ CUDA_DEVICE_DEBUG=0
+ '[' -z '' ']'
++ getconf _NPROCESSORS_ONLN
+ MAX_JOBS=8
+ BUILD_TYPE=Release
+ [[ -n '' ]]
+ [[ -n '' ]]
+ echo 'Building in Release mode'
Building in Release mode
+ mkdir -p /home/amsha/builds/pytorch/torch/lib/tmp_install
+ for arg in "$@"
+ [[ caffe2 == \c\a\f\f\e\2 ]]
+ build_caffe2
+ [[ -z '' ]]
+ EXTRA_CAFFE2_CMAKE_FLAGS=()
+ [[ -n '' ]]
+ [[ -n /home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages ]]
+ EXTRA_CAFFE2_CMAKE_FLAGS+=("-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH")
+ [[ 1 -eq 1 ]]
+ cmake /home/amsha/builds/pytorch -DPYTHON_EXECUTABLE=/home/amsha/virtualenv/torch-1.0-20181213/bin/python -DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so.1.0 -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m -DBUILDING_WITH_TORCH_LIBS=ON -DTORCH_BUILD_VERSION=1.0.0a0+db5d313 -DCMAKE_BUILD_TYPE=Release -DBUILD_TORCH=ON -DBUILD_PYTHON=ON -DBUILD_SHARED_LIBS=ON -DBUILD_BINARY=OFF -DBUILD_TEST=ON -DINSTALL_TEST=ON -DBUILD_CAFFE2_OPS=ON -DONNX_NAMESPACE=onnx_torch -DUSE_CUDA=1 -DUSE_DISTRIBUTED=ON -DUSE_FBGEMM=0 -DUSE_NUMPY= -DNUMPY_INCLUDE_DIR=/usr/lib/python3.7/site-packages/numpy/core/include -DUSE_SYSTEM_NCCL=OFF -DNCCL_INCLUDE_DIR= -DNCCL_ROOT_DIR= -DNCCL_SYSTEM_LIB= -DCAFFE2_STATIC_LINK_CUDA=0 -DUSE_ROCM=0 -DUSE_NNPACK=1 -DUSE_LEVELDB=OFF -DUSE_LMDB=OFF -DUSE_OPENCV=OFF -DUSE_QNNPACK=1 -DUSE_FFMPEG=OFF -DUSE_GLOG=OFF -DUSE_GFLAGS=OFF -DUSE_SYSTEM_EIGEN_INSTALL=OFF -DCUDNN_INCLUDE_DIR=/usr/include -DCUDNN_LIB_DIR=/usr -DCUDNN_LIBRARY=/usr/lib -DUSE_MKLDNN=1 -DNCCL_EXTERNAL=1 -DCMAKE_INSTALL_PREFIX=/home/amsha/builds/pytorch/torch/lib/tmp_install -DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS= '-DCMAKE_EXE_LINKER_FLAGS= -Wl,-rpath,$ORIGIN ' '-DCMAKE_SHARED_LINKER_FLAGS= -Wl,-rpath,$ORIGIN ' -DTHD_SO_VERSION=1 -DCMAKE_PREFIX_PATH=/home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages
-- The CXX compiler identification is GNU 8.2.1
-- The C compiler identification is GNU 8.2.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Not forcing any particular BLAS to be found
-- Performing Test COMPILER_WORKS
-- Performing Test COMPILER_WORKS - Success
-- Performing Test SUPPORT_GLIBCXX_USE_C99
-- Performing Test SUPPORT_GLIBCXX_USE_C99 - Success
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success
-- std::exception_ptr is supported.
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE - Success
-- NUMA is available
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
-- Turning off deprecation warning due to glog.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS - Success
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512F_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512F_EXTENSIONS - Success
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Caffe2 protobuf include directory: $<BUILD_INTERFACE:/home/amsha/builds/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
-- The BLAS backend of choice:MKL
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel_lp64: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so
--   Library mkl_gnu_thread: /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so
--   Library mkl_core: /opt/intel/mkl/lib/intel64/libmkl_core.so
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/libpthread.so
--   Library m: /usr/lib/libm.so
--   Library dl: /usr/lib/libdl.so
-- Looking for cblas_sgemm
-- Looking for cblas_sgemm - found
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Brace yourself, we are building NNPACK
-- Found PythonInterp: /home/amsha/virtualenv/torch-1.0-20181213/bin/python (found version "3.7.1") 
-- LLVM FileCheck Found: /usr/bin/FileCheck
-- Found Git: /usr/bin/git (found version "2.20.0") 
-- git Version: v1.4.0-505be96a
-- Version: 1.4.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Found Numa: /usr/include  
-- Found Numa  (include: /usr/include, library: /usr/lib/libnuma.so)
-- Using third party subdirectory Eigen.
Python 3.7.1
-- Found PythonInterp: /home/amsha/virtualenv/torch-1.0-20181213/bin/python (found suitable version "3.7.1", minimum required is "2.7") 
-- Found PythonLibs: /usr/lib/libpython3.7m.so.1.0 (found suitable version "3.7.1", minimum required is "2.7") 
-- Could NOT find pybind11 (missing: pybind11_DIR)
-- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) 
-- Using third_party/pybind11.
-- Found MPI_C: /usr/lib/openmpi/libmpi.so (found version "3.1") 
-- Found MPI_CXX: /usr/lib/openmpi/libmpi_cxx.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- MPI support found
-- MPI compile flags: 
-- MPI include path: /usr/include
-- MPI LINK flags path: -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -pthread
-- MPI libraries: /usr/lib/openmpi/libmpi_cxx.so/usr/lib/openmpi/libmpi.so
[amsha-arch:13270] mca_base_component_repository_open: unable to open mca_fcoll_dynamic: /usr/lib/openmpi/openmpi/mca_fcoll_dynamic.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
[amsha-arch:13270] mca_base_component_repository_open: unable to open mca_fcoll_individual: /usr/lib/openmpi/openmpi/mca_fcoll_individual.so: undefined symbol: mca_common_ompio_file_write (ignored)
[amsha-arch:13270] mca_base_component_repository_open: unable to open mca_fcoll_two_phase: /usr/lib/openmpi/openmpi/mca_fcoll_two_phase.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
[amsha-arch:13270] mca_base_component_repository_open: unable to open mca_fcoll_dynamic_gen2: /usr/lib/openmpi/openmpi/mca_fcoll_dynamic_gen2.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
[amsha-arch:13270] mca_base_component_repository_open: unable to open mca_fcoll_static: /usr/lib/openmpi/openmpi/mca_fcoll_static.so: undefined symbol: mca_common_ompio_register_print_entry (ignored)
CMake Warning at cmake/Dependencies.cmake:619 (message):
  OpenMPI found, but it is not built with CUDA support.
Call Stack (most recent call first):
  CMakeLists.txt:201 (include)


-- Found CUDA: /opt/cuda (found suitable version "10.0", minimum required is "7.0") 
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /opt/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /opt/cuda
-- Caffe2: Header version is: 10.0
-- Found CUDNN: /usr/include  
-- Found cuDNN: v7.4.1  (include: /usr/include, library: /usr/lib)
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;7.0;7.0+PTX
-- Added CUDA NVCC flags for: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_70,code=compute_70
-- Could NOT find CUB (missing: CUB_INCLUDE_DIR) 
CMake Warning (dev) at third_party/gloo/CMakeLists.txt:21 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'BUILD_BENCHMARK'.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- MPI include path: /usr/include
-- MPI libraries: /usr/lib/openmpi/libmpi_cxx.so/usr/lib/openmpi/libmpi.so
-- CUDA detected: 10.0
CMake Warning at cmake/Dependencies.cmake:873 (message):
  mobile opengl is only used in android or ios builds.
Call Stack (most recent call first):
  CMakeLists.txt:201 (include)


CMake Warning at cmake/Dependencies.cmake:949 (message):
  Metal is only used in ios builds.
Call Stack (most recent call first):
  CMakeLists.txt:201 (include)


-- 
-- ******** Summary ********
--   CMake version         : 3.13.1
--   CMake command         : /usr/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 8.2.1
--   CXX flags             :  -Wno-deprecated -fvisibility-inlines-hidden -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL
--   CMAKE_PREFIX_PATH     : /home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages
--   CMAKE_INSTALL_PREFIX  : /home/amsha/builds/pytorch/torch/lib/tmp_install
--   CMAKE_MODULE_PATH     : /home/amsha/builds/pytorch/cmake/Modules;/home/amsha/builds/pytorch/cmake/public/../Modules_CUDA_fix
-- 
--   ONNX version          : 1.3.0
--   ONNX NAMESPACE        : onnx_torch
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
-- 
--   Protobuf compiler     : 
--   Protobuf includes     : 
--   Protobuf libraries    : 
--   BUILD_ONNX_PYTHON     : OFF
-- Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor
-- Removing -DNDEBUG from compile flags
-- MAGMA not found. Compiling without MAGMA support
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Looking for cpuid.h
-- Looking for cpuid.h - found
-- Performing Test HAVE_GCC_GET_CPUID
-- Performing Test HAVE_GCC_GET_CPUID - Success
-- Performing Test NO_GCC_EBX_FPIC_BUG
-- Performing Test NO_GCC_EBX_FPIC_BUG - Success
-- Performing Test C_HAS_AVX_1
-- Performing Test C_HAS_AVX_1 - Failed
-- Performing Test C_HAS_AVX_2
-- Performing Test C_HAS_AVX_2 - Success
-- Performing Test C_HAS_AVX2_1
-- Performing Test C_HAS_AVX2_1 - Failed
-- Performing Test C_HAS_AVX2_2
-- Performing Test C_HAS_AVX2_2 - Success
-- Performing Test CXX_HAS_AVX_1
-- Performing Test CXX_HAS_AVX_1 - Failed
-- Performing Test CXX_HAS_AVX_2
-- Performing Test CXX_HAS_AVX_2 - Success
-- Performing Test CXX_HAS_AVX2_1
-- Performing Test CXX_HAS_AVX2_1 - Failed
-- Performing Test CXX_HAS_AVX2_2
-- Performing Test CXX_HAS_AVX2_2 - Success
-- AVX compiler support found
-- AVX2 compiler support found
-- Performing Test HAS_C11_ATOMICS
-- Performing Test HAS_C11_ATOMICS - Success
-- Atomics: using C11 intrinsics
-- Performing Test BLAS_F2C_DOUBLE_WORKS
-- Performing Test BLAS_F2C_DOUBLE_WORKS - Failed
-- Performing Test BLAS_F2C_FLOAT_WORKS
-- Performing Test BLAS_F2C_FLOAT_WORKS - Success
-- Performing Test BLAS_USE_CBLAS_DOT
-- Performing Test BLAS_USE_CBLAS_DOT - Success
-- Found a library with BLAS API (mkl).
-- Found a library with LAPACK API. (mkl)
-- Found CUDA: /opt/cuda (found suitable version "10.0", minimum required is "5.5") 
disabling ROCM because NOT USE_ROCM is set
-- MIOpen not found. Compiling without MIOpen support
-- Found MKLDNN: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so;/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64/libmkl_core.so;-fopenmp;/usr/lib/libpthread.so;/usr/lib/libm.so;/usr/lib/libdl.so  
CMake Deprecation Warning at third_party/ideep/mkl-dnn/CMakeLists.txt:21 (cmake_policy):
  The OLD behavior for policy CMP0048 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at third_party/ideep/mkl-dnn/CMakeLists.txt:22 (cmake_policy):
  The OLD behavior for policy CMP0054 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Detecting Intel(R) MKL: trying mklml_intel
-- Detecting Intel(R) MKL: trying mklml
-- Detecting Intel(R) MKL: trying mkl_rt
-- Intel(R) MKL: include /opt/intel/mkl/include
-- Intel(R) MKL: lib /opt/intel/mkl/lib/intel64/libmkl_rt.so
-- Intel(R) MKL: OpenMP lib -fopenmp
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.14") found components:  doxygen missing components:  dot
-- VTune profiling environment is unset
CMake Warning (dev) at cmake/public/mkldnn.cmake:1 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable MKLDNN_ROOT is set to:

    /home/amsha/builds/pytorch/third_party/ideep/mkl-dnn

  For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1309 (INCLUDE)
  CMakeLists.txt:201 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for shm_open
-- Looking for shm_open - found
-- Looking for shm_unlink
-- Looking for shm_unlink - found
-- Looking for malloc_usable_size
-- Looking for malloc_usable_size - found
-- Performing Test C_HAS_THREAD
-- Performing Test C_HAS_THREAD - Success
-- GCC 8.2.1: Adding gcc and gcc_s libs to link line
-- Using python found in /home/amsha/virtualenv/torch-1.0-20181213/bin/python
-- Check size of long double
-- Check size of long double - done
-- Performing Test COMPILER_SUPPORTS_LONG_DOUBLE
-- Performing Test COMPILER_SUPPORTS_LONG_DOUBLE - Success
-- Performing Test COMPILER_SUPPORTS_FLOAT128
-- Performing Test COMPILER_SUPPORTS_FLOAT128 - Success
-- Performing Test COMPILER_SUPPORTS_SSE2
-- Performing Test COMPILER_SUPPORTS_SSE2 - Success
-- Performing Test COMPILER_SUPPORTS_SSE4
-- Performing Test COMPILER_SUPPORTS_SSE4 - Success
-- Performing Test COMPILER_SUPPORTS_AVX
-- Performing Test COMPILER_SUPPORTS_AVX - Success
-- Performing Test COMPILER_SUPPORTS_FMA4
-- Performing Test COMPILER_SUPPORTS_FMA4 - Success
-- Performing Test COMPILER_SUPPORTS_AVX2
-- Performing Test COMPILER_SUPPORTS_AVX2 - Success
-- Performing Test COMPILER_SUPPORTS_SVE
-- Performing Test COMPILER_SUPPORTS_SVE - Failed
-- Performing Test COMPILER_SUPPORTS_AVX512F
-- Performing Test COMPILER_SUPPORTS_AVX512F - Success
-- Performing Test COMPILER_SUPPORTS_OPENMP
-- Performing Test COMPILER_SUPPORTS_OPENMP - Success
-- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES
-- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES - Success
-- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH
-- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH - Success
-- Configuring build for SLEEF-v3.2
   Target system: Linux-4.18.16-arch1-1-ARCH
   Target processor: x86_64
   Host system: Linux-4.18.16-arch1-1-ARCH
   Host processor: x86_64
   Detected C compiler: GNU @ /usr/bin/cc
-- Using option `-Wall -Wno-unused -Wno-attributes -Wno-unused-result -Wno-psabi -ffp-contract=off -fno-math-errno -fno-trapping-math` to compile libsleef
-- Building shared libs : OFF
-- MPFR : /usr/lib/libmpfr.so
-- MPFR header file in /usr/include
-- GMP : /usr/lib/libgmp.so
-- RUNNING_ON_TRAVIS : 0
-- COMPILER_SUPPORTS_OPENMP : 1
-- Using python found in /home/amsha/virtualenv/torch-1.0-20181213/bin/python
-- /usr/bin/c++ /home/amsha/builds/pytorch/torch/abi-check.cpp -o /home/amsha/builds/pytorch/build/abi-check
-- Determined _GLIBCXX_USE_CXX11_ABI=1
-- Performing Test HAS_THREAD_LOCAL
-- Performing Test HAS_THREAD_LOCAL - Success
-- Found CUDA: /opt/cuda (found suitable version "10.0", minimum required is "7.5") 
-- MPI_LIBRARIES: /usr/lib/openmpi/libmpi_cxx.so;/usr/lib/openmpi/libmpi.so
-- Building the gloo backend with TCP support only
-- MPI_LINK_FLAGS: -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -pthread
-- Found CUDA: /opt/cuda (found version "10.0") 
-- Building C10D with CUDA support
-- MPI_INCLUDE_PATH: /usr/include
-- MPI_LIBRARIES: /usr/lib/openmpi/libmpi_cxx.so;/usr/lib/openmpi/libmpi.so
-- MPIEXEC: /usr/bin/mpiexec
-- Include NCCL operators
-- Including IDEEP operators
-- Excluding image processing operators due to no opencv
-- Excluding video processing operators due to no opencv
-- Include Observer library
-- Using lib/python3.7/site-packages as python relative installation path
-- Automatically generating missing __init__.py files.
CMake Warning at CMakeLists.txt:389 (message):
  Generated cmake files are only fully tested if one builds with system glog,
  gflags, and protobuf.  Other settings may generate files that are not well
  tested.


-- 
-- ******** Summary ********
-- General:
--   CMake version         : 3.13.1
--   CMake command         : /usr/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 8.2.1
--   BLAS                  : MKL
--   CXX flags             :  -Wno-deprecated -fvisibility-inlines-hidden -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-stringop-overflow
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL;ONNX_NAMESPACE=onnx_torch;USE_C11_ATOMICS=1;HAVE_MMAP=1;_FILE_OFFSET_BITS=64;HAVE_SHM_OPEN=1;HAVE_SHM_UNLINK=1;HAVE_MALLOC_USABLE_SIZE=1
--   CMAKE_PREFIX_PATH     : /home/amsha/virtualenv/torch-1.0-20181213/lib/python3.7/site-packages
--   CMAKE_INSTALL_PREFIX  : /home/amsha/builds/pytorch/torch/lib/tmp_install
-- 
--   TORCH_VERSION         : 1.0.0
--   CAFFE2_VERSION        : 1.0.0
--   BUILD_ATEN_MOBILE     : OFF
--   BUILD_ATEN_ONLY       : OFF
--   BUILD_BINARY          : OFF
--   BUILD_CUSTOM_PROTOBUF : ON
--     Link local protobuf : ON
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : ON
--     Python version      : 3.7.1
--     Python executable   : /home/amsha/virtualenv/torch-1.0-20181213/bin/python
--     Pythonlibs version  : 3.7.1
--     Python library      : /usr/lib/libpython3.7m.so.1.0
--     Python includes     : /usr/include/python3.7m
--     Python site-packages: lib/python3.7/site-packages
--   BUILD_CAFFE2_OPS      : ON
--   BUILD_SHARED_LIBS     : ON
--   BUILD_TEST            : ON
--   USE_ASAN              : OFF
--   USE_CUDA              : 1
--     CUDA static link    : 0
--     USE_CUDNN           : ON
--     CUDA version        : 10.0
--     cuDNN version       : 7.4.1
--     CUDA root directory : /opt/cuda
--     CUDA library        : /usr/lib/libcuda.so
--     cudart library      : /opt/cuda/lib64/libcudart_static.a;-pthread;dl;/usr/lib/librt.so
--     cublas library      : /opt/cuda/lib64/libcublas.so
--     cufft library       : /opt/cuda/lib64/libcufft.so
--     curand library      : /opt/cuda/lib64/libcurand.so
--     cuDNN library       : /usr/lib
--     nvrtc               : /opt/cuda/lib64/libnvrtc.so
--     CUDA include path   : /opt/cuda/include
--     NVCC executable     : /opt/cuda/bin/nvcc
--     CUDA host compiler  : /usr/bin/cc
--     USE_TENSORRT        : OFF
--   USE_ROCM              : 0
--   USE_EIGEN_FOR_BLAS    : 
--   USE_FBGEMM            : 0
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : OFF
--   USE_GLOG              : OFF
--   USE_LEVELDB           : OFF
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : OFF
--   USE_METAL             : OFF
--   USE_MKL               : ON
--   USE_MKLDNN            : ON
--   USE_MOBILE_OPENGL     : OFF
--   USE_NCCL              : ON
--     USE_SYSTEM_NCCL     : OFF
--   USE_NNPACK            : 1
--   USE_NUMPY             : ON
--   USE_OBSERVERS         : ON
--   USE_OPENCL            : OFF
--   USE_OPENCV            : OFF
--   USE_OPENMP            : OFF
--   USE_PROF              : OFF
--   USE_QNNPACK           : 1
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_ZMQ               : OFF
--   USE_DISTRIBUTED       : ON
--     USE_MPI             : ON
--     USE_GLOO            : ON
--     USE_GLOO_IBVERBS    : OFF
--   Public Dependencies  : Threads::Threads;caffe2::mkl;caffe2::mkldnn
--   Private Dependencies : qnnpack;nnpack;cpuinfo;/usr/lib/libnuma.so;fp16;/usr/lib/openmpi/libmpi_cxx.so;/usr/lib/openmpi/libmpi.so;gloo;aten_op_header_gen;onnxifi_loader;rt;gcc_s;gcc;dl
-- Configuring done
-- Generating done
```


cc @malfet @seemethere @walterddr @csarofeen @ptrblck @xwang233