rioyokotalab / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Other
2 stars 0 forks source link

CUDA 9 Update requirements #17

Open Hiroki11x opened 6 years ago

Hiroki11x commented 6 years ago

When Caffe2 cmake

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find CUDA: Found unsuitable version "9.0", but required is exact
  version "8.0" (found /usr/local/cuda-9.0)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:313 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindCUDA.cmake:806 (find_package_handle_standard_args)
  /home/hiroki11/env/local/opencv-2.4.13/share/OpenCV/OpenCVConfig.cmake:45 (find_package)
  /home/hiroki11/env/local/opencv-2.4.13/share/OpenCV/OpenCVConfig.cmake:242 (find_host_package)
  cmake/Dependencies.cmake:172 (find_package)
  CMakeLists.txt:73 (include)

I have to rebuild opencv?

Hiroki11x commented 6 years ago
cd opencv-2.4.13
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=$LOCAL/opencv-2.4.13 \
        -DCMAKE_BUILD_TYPE=RELEASE \
        -D CUDA_NVCC_FLAGS='-std=c++11' \
        -DCUDA_ARCH_BIN="2.0 2.1(2.0) 3.0 3.5 3.7 5.0 5.2 6.0 6.1" \
        -DWITH_FFMPEG=OFF \
        -DCMAKE_CXX_FLAGS=-D_FORCE_INLINES \
        -DCUDA_TOOLKIT_ROOT_DIR=$CUDA_ROOT \
        ..

Following output

-- General configuration for OpenCV 2.4.13 =====================================

~~
~~

--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE

~~
~~

--   Other third-party libraries:
--     Use IPP:                     NO
--     Use Eigen:                   NO
--     Use TBB:                     NO
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    YES (ver 9.0)
--     Use OpenCL:                  YES

~~
~~

Call Stack (most recent call first):
  CMakeLists.txt:1105 (include)

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
opencv_dep_CUDA_nppi_LIBRARY
    linked by target "opencv_core" in directory /home/hiroki11/env/src/opencv-2.4.13/modules/core
    linked by target "opencv_core" in directory /home/hiroki11/env/src/opencv-2.4.13/modules/core
    linked by target "opencv_perf_core" in directory /home/hiroki11/env/src/opencv-2.4.13/modules/core
    linked by target "opencv_perf_core" in directory /home/hiroki11/env/src/opencv-2.4.13/modules/core
    linked by target "opencv_test_core" in directory /home/hiroki11/env/src/opencv-2.4.13/modules/core
    linked by target "opencv_test_core" in directory /home/hiroki11/env/src/opencv-2.4.13/modules/core

OpenCV-2.4.13 does not support CUDA9 ?

Hiroki11x commented 6 years ago

I tried to uodate openCV version

 cd opencv-3.3.0
  mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=$LOCAL_DIR/opencv-3.3.0 \
        -DCMAKE_BUILD_TYPE=RELEASE \
        -D CUDA_NVCC_FLAGS='-std=c++11' \
        -DCUDA_ARCH_BIN="2.0 2.1(2.0) 3.0 3.5 3.7 5.0 5.2 6.0 6.1" \
        -DWITH_FFMPEG=OFF \
        -DCMAKE_CXX_FLAGS=-D_FORCE_INLINES \
        -DCUDA_TOOLKIT_ROOT_DIR=$CUDA_ROOT \
        ..
  make -j $J
  make install

Following Error Output

--   Other third-party libraries:
--     Use Intel IPP:               NO
--     Use Intel IPP IW:            NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Lapack:                  NO
--     Use Eigen:                   NO
--     Use Cuda:                    YES (ver 9.0)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO

-- -----------------------------------------------------------------
--
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppi_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudev
linked by target "opencv_cudev" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudev
linked by target "opencv_test_cudev" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudev/test
linked by target "opencv_core" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/core
linked by target "opencv_core" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/core
linked by target "opencv_perf_core" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/core
linked by target "opencv_test_core" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/core
linked by target "opencv_cudaarithm" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudaarithm
linked by target "opencv_cudaarithm" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudaarithm
linked by target "opencv_perf_cudaarithm" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudaarithm
linked by target "opencv_test_cudaarithm" in directory /home/hiroki11/env/src/opencv-3.3.0/modules/cudaarithm

same error occured.

Hiroki11x commented 6 years ago

Refer

Hiroki11x commented 6 years ago

in opencv-2.4.13 opencv_dep_CUDA_nppi_LIBRARY was not found

in opencv-3.3.0 CUDA_nppi_LIBRARY was not found

in CUDA8/lib64

~
libnppc.so
libnppc.so.8.0
libnppc.so.8.0.61
libnppc_static.a
libnppial.so
libnppial.so.8.0
libnppial.so.8.0.61
libnppicc.so
libnppicc.so.8.0
libnppicc.so.8.0.61
libnppicom.so
libnppicom.so.8.0
libnppicom.so.8.0.61
libnppidei.so
libnppidei.so.8.0
libnppidei.so.8.0.61
libnppif.so
libnppif.so.8.0
libnppif.so.8.0.61
libnppig.so
libnppig.so.8.0
libnppig.so.8.0.61
libnppim.so
libnppim.so.8.0
libnppim.so.8.0.61
libnppi.so
libnppi.so.8.0
libnppi.so.8.0.61
libnppi_static.a
libnppist.so
libnppist.so.8.0
libnppist.so.8.0.61
libnppisu.so
libnppisu.so.8.0
libnppisu.so.8.0.61
libnppitc.so
libnppitc.so.8.0
libnppitc.so.8.0.61
libnpps.so
libnpps.so.8.0
libnpps.so.8.0.61
libnpps_static.a
~

in CUDA9/lib64

~~
libnppc.so
libnppc.so.9.0
libnppc.so.9.0.103
libnppc_static.a
libnppial.so
libnppial.so.9.0
libnppial.so.9.0.103
libnppial_static.a
libnppicc.so
libnppicc.so.9.0
libnppicc.so.9.0.103
libnppicc_static.a
libnppicom.so
libnppicom.so.9.0
libnppicom.so.9.0.103
libnppicom_static.a
libnppidei.so
libnppidei.so.9.0
libnppidei.so.9.0.103
libnppidei_static.a
libnppif.so
libnppif.so.9.0
libnppif.so.9.0.103
libnppif_static.a
libnppig.so
libnppig.so.9.0
libnppig.so.9.0.103
libnppig_static.a
libnppim.so
libnppim.so.9.0
libnppim.so.9.0.103
libnppim_static.a
libnppist.so
libnppist.so.9.0
libnppist.so.9.0.103
libnppist_static.a
libnppisu.so
libnppisu.so.9.0
libnppisu.so.9.0.103
libnppisu_static.a
libnppitc.so
libnppitc.so.9.0
libnppitc.so.9.0.103
libnppitc_static.a
libnpps.so
libnpps.so.9.0
libnpps.so.9.0.103
libnpps_static.a
~~

there are no

libnppi.so
libnppi.so.8.0
libnppi.so.8.0.61
libnppi_static.a

in CUDA9

Hiroki11x commented 6 years ago

https://stackoverflow.com/questions/45525377/installing-opencv-3-3-0-with-contrib-modules-using-cmake-cuda-9-0-rc-and-visual

edit opencv/cmake/FindCUDA.cmake as following

https://github.com/opencv/opencv/blob/05b15943d6a42c99e5f921b7dbaa8323f3c042c6/cmake/FindCUDA.cmake#L285

 285 #   CUDA_nppi_LIBRARY     -- NVIDIA Performance Primitives lib (image processing).
 286 #                            Only available for CUDA version 5.5+.
 + 287 set(CUDA_nppi_LIBRARY /usr/local/cuda-8.0/lib64/libnppi.so)
 288 #   CUDA_npps_LIBRARY     -- NVIDIA Performance Primitives lib (signal processing).
 289 #                            Only available for CUDA version 5.5+.

https://github.com/opencv/opencv/blob/05b15943d6a42c99e5f921b7dbaa8323f3c042c6/cmake/FindCUDA.cmake#L524

 522   unset(CUDA_cusparse_LIBRARY CACHE)
 523   unset(CUDA_npp_LIBRARY CACHE)
 524   unset(CUDA_nppc_LIBRARY CACHE)
 -            unset(CUDA_nppi_LIBRARY CACHE)
 + 525 #  unset(CUDA_nppi_LIBRARY CACHE)
 526   unset(CUDA_npps_LIBRARY CACHE)
cmake -DCMAKE_INSTALL_PREFIX=/home/hiroki11/env/local/opencv-3.3.0 \
        -DCMAKE_BUILD_TYPE=RELEASE \
        -D CUDA_NVCC_FLAGS='-std=c++11' \
        -DCUDA_ARCH_BIN="2.0 2.1(2.0) 3.0 3.5 3.7 5.0 5.2 6.0 6.1" \
        -DWITH_FFMPEG=OFF \
        -DCMAKE_CXX_FLAGS=-D_FORCE_INLINES \
        -DCUDA_TOOLKIT_ROOT_DIR=$CUDA_ROOT \
        ..

Succeeded

-- General configuration for OpenCV 3.3.0 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Timestamp:                   2017-08-09T05:41:40Z
--     Host:                        Linux XXXXXXXXXXXXXXX
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:
--       requested:                 DETECT
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.5)
--     C++ flags (Release):         -D_FORCE_INLINES   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -D_FORCE_INLINES   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          gtk-x11-2.0 gdk-x11-2.0 atk-1.0 gio-2.0 pangoft2-1.0 pangocairo-1.0 gdk_pixbuf-2.0 cairo pango-1.0 fontconfig gobject-2.0 glib-2.0 freetype gthread-2.0 /lib64/libjpeg.so /lib64/libpng.so /lib64/libz.so dl m pthread rt cudart nppc nppi npps cufft -L/usr/local/cuda/lib64 -L/usr/local/cuda-8.0/lib64
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 cudev core cudaarithm flann imgproc ml objdetect video cudabgsegm cudafilters cudaimgproc cudawarping dnn imgcodecs photo shape videoio cudacodec highgui ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo java stitching superres videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 python2 python3 viz
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.24.28)
--     GThread :                    YES (ver 2.46.2)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.7)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        build (ver encoder: 0x020e)
--     PNG:                         /lib64/libpng.so (ver 1.5.13)
--     TIFF:                        build (ver 42 - 4.0.2)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
--     GDAL:                        NO
--     GDCM:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      NO
--       avcodec:                   NO
--       avformat:                  NO
--       avutil:                    NO
--       swscale:                   NO
--       avresample:                NO
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     Aravis SDK:                  NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/YES
--     XIMEA:                       NO
--     Xine:                        NO
--     Intel Media SDK:             NO
--     gPhoto2:                     NO
-- 
--   Parallel framework:            pthreads
-- 
--   Trace:                         YES ()
-- 
--   Other third-party libraries:
--     Use Intel IPP:               NO
--     Use Intel IPP IW:            NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Lapack:                  NO
--     Use Eigen:                   NO
--     Use Cuda:                    YES (ver 9.0)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             20 21 30 35 37 50 52 60 61
--     NVIDIA PTX archs:
--     Use fast math:               NO
-- 
--   OpenCL:                        <Dynamic loading of OpenCL library>
--     Include path:                /home/hiroki11/env/src/opencv-3.3.0/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /home/hiroki11/env/pyenv/shims/python2.7 (ver 2.7.9)
-- 
--   Python 3:
--     Interpreter:                 NO
-- 
--   Python (for build):            /home/hiroki11/env/pyenv/shims/python2.7
-- 
--   Java:
--     ant:                         /bin/ant (ver 1.9.2)
--     JNI:                         /usr/lib/jvm/java/include /usr/lib/jvm/java/include/linux /usr/lib/jvm/java/include
--     Java wrappers:               YES
--     Java tests:                  YES
-- 
--   Matlab:                        Matlab not found or implicitly disabled
-- 
--   Documentation:
--     Doxygen:                     /usr/bin/doxygen (ver 1.8.5)
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /home/hiroki11/env/local/opencv-3.3.0
-- 
--   cvconfig.h is in:              /home/hiroki11/env/src/opencv-3.3.0/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hiroki11/env/src/opencv-3.3.0/build
Hiroki11x commented 6 years ago
$ make -j 128
Built target pch_Generate_opencv_test_imgproc
Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
Generating opencl_kernels_core.cpp, opencl_kernels_core.hpp
[ 33%] Built target pch_Generate_opencv_test_cudawarping
[ 33%] Built target pch_Generate_opencv_perf_cudaoptflow
[ 33%] Built target pch_Generate_opencv_perf_features2d
[ 33%] Built target pch_Generate_opencv_perf_cudaarithm
[ 33%] [ 33%] Built target pch_Generate_opencv_test_cudaarithm
Built target pch_Generate_opencv_stitching
[ 33%] [ 33%] [ 33%] nvcc fatal   : Unsupported gpu architecture 'compute_20'
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):
  Error generating
  /home/hiroki11/env/src/opencv-3.3.0/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o

make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Built target pch_Generate_opencv_test_cudaimgproc
Built target pch_Generate_opencv_perf_cudaimgproc
Built target pch_Generate_opencv_test_superres
[ 33%] Built target pch_Generate_opencv_test_features2d
[ 33%] [ 33%] Built target pch_Generate_opencv_perf_objdetect
Built target pch_Generate_opencv_test_shape
[ 33%] [ 33%] [ 33%] [ 33%] Built target pch_Generate_opencv_perf_cudaobjdetect
Built target pch_Generate_opencv_test_objdetect
Built target pch_Generate_opencv_test_imgcodecs
Built target pch_Generate_opencv_perf_dnn
[ 33%] Built target pch_Generate_opencv_test_core
[ 33%] [ 33%] Built target pch_Generate_opencv_perf_cudabgsegm
Built target pch_Generate_opencv_test_cudafeatures2d
[ 33%] Built target pch_Generate_opencv_test_cudafilters
[ 33%] [ 33%] [ 33%] [ 33%] Built target pch_Generate_opencv_test_videoio
Built target pch_Generate_opencv_test_calib3d
Built target pch_Generate_opencv_test_cudastereo
Built target pch_Generate_opencv_test_cudabgsegm
[ 33%] [ 33%] Built target pch_Generate_opencv_perf_cudalegacy
Built target pch_Generate_opencv_perf_cudafeatures2d
[ 33%] Built target pch_Generate_opencv_test_flann
[ 33%] Built target pch_Generate_opencv_test_videostab
[ 33%] Built target pch_Generate_opencv_perf_stitching
[ 33%] Built target pch_Generate_opencv_test_stitching
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 33%] Built target pch_Generate_opencv_test_cudalegacy
make: *** [all] Error 2
Hiroki11x commented 6 years ago

I gave up build opencv with cuda9 without libnppi.so.

ref [OpenCV complete compilation difficulty ranking] http://qiita.com/fukushima1981/items/fae7d40123bfdf426624

So, I tried to build opencv without cuda

$ cmake -DCMAKE_INSTALL_PREFIX=/home/hiroki11/env/local/opencv-3.3.0 \
        -DCMAKE_BUILD_TYPE=RELEASE \
        -DWITH_CUDA=OFF \
        -DWITH_FFMPEG=OFF \
        -DCMAKE_CXX_FLAGS=-D_FORCE_INLINES \
        ..

cmake suceeded then

$ make -j 128
~~
~~
BUILD SUCCESSFUL
Total time: 4 seconds
[100%] Built target opencv_perf_core
[100%] Built target opencv_test_java

finally I executed

$ make install
Hiroki11x commented 6 years ago

ReBuild Caffe2

$ cd caffe2
$ rm -rf build && mkdir build && cd build
$ CMAKE_PREFIX_PATH=/home/hiroki11/env/local/protobuf-3.2.0:/home/hiroki11/env/local/opencv-3.3.0:/home/hiroki11/env/local/snappy_1.1.4 cmake .. \
-DBLAS=Eigen \
-DUSE_CUDA=ON \
-DUSE_ROCKSDB=OFF \
-DUSE_GLOO=ON \
-DUSE_REDIS=ON \
-DUSE_OPENCV=ON \
-DUSE_GFLAGS=OFF \
-DCUDNN_INCLUDE_DIR=/home/hiroki11/env/local/cuda/include \
-DCUDNN_LIBRARY=/home/hiroki11/env/local/cuda/lib/libcudnn.so \
-DCMAKE_INSTALL_PREFIX=/home/hiroki11/caffe2/local \
-DMPI_C_COMPILER=/shared/comms/openmpi-2.0.1/xl/bin/mpicc \
-DMPI_CXX_COMPILER=/shared/comms/openmpi-2.0.1/xl/bin/mpicxx

Out put below

~~
~~
-- ******** Summary ********
-- General:
--   Git version           : 
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 4.8.5
--   Protobuf compiler     : /home/hiroki11/env/local/protobuf-3.2.0/bin/protoc
--   CXX flags             :  -fopenmp -std=c++11 -O2 -fPIC -Wno-narrowing
--   Build type            : Release
--   Compile definitions   : CAFFE2_USE_EIGEN_FOR_BLAS;CAFFE2_USE_GOOGLE_GLOG;EIGEN_MPL2_ONLY;CAFFE2_FORCE_FALLBACK_CUDA_MPI
-- 
--   BUILD_SHARED_LIBS     : ON
--   BUILD_PYTHON          : ON
--     Python version      : 2.7.5
--     Python library      : /usr/lib64/libpython2.7.so
--   BUILD_TEST            : ON
--   USE_CUDA              : ON
--     CUDA version        : 9.0
--   USE_CNMEM             : OFF
--   USE_NERVANA_GPU       : OFF
--   USE_GLOG              : ON
--   USE_GFLAGS            : OFF
--   USE_LMDB              : ON
--     LMDB version        : 0.9.18
--   USE_LEVELDB           : ON
--     LevelDB version     : 1.20
--     Snappy version      : 1.1.4
--   USE_OPENCV            : ON
--     OpenCV version      : 3.3.0
--   USE_FFMPEG            : 
--   USE_ZMQ               : OFF
--   USE_ROCKSDB           : OFF
--   USE_MPI               : ON
--   USE_NCCL              : ON
--   USE_NNPACK            : OFF
--   USE_OPENMP            : ON
--   USE_REDIS             : ON
--   USE_GLOO              : ON
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hiroki11/caffe2/build

then I executed

$ make -j 128 install
~~
~~
[ 58%] [ 58%] [ 58%] Building CXX object caffe2/CMakeFiles/Caffe2_CPU.dir/utils/signal_handler.cc.o
Building CXX object caffe2/CMakeFiles/Caffe2_CPU.dir/utils/string_utils.cc.o
Building CXX object caffe2/CMakeFiles/Caffe2_CPU.dir/utils/threadpool/ThreadPool.cc.o
Building CXX object caffe2/CMakeFiles/Caffe2_CPU.dir/utils/smart_tensor_printer.cc.o
Linking CXX shared library libCaffe2_CPU.so
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib64/libnvrtc.so when searching for -lnvrtc
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib64/libnvrtc.so when searching for -lnvrtc
/usr/bin/ld: cannot find -lnvrtc
collect2: error: ld returned 1 exit status
make[2]: *** [caffe2/libCaffe2_CPU.so] Error 1
make[1]: *** [caffe2/CMakeFiles/Caffe2_CPU.dir/all] Error 2
make: *** [all] Error 2
Hiroki11x commented 6 years ago

I checked this shared object file

$cd /usr/local/cuda/lib64
$ ls -la
~~
~~
 libnvrtc.so -> libnvrtc.so.9.0
 libnvrtc.so.9.0 -> libnvrtc.so.9.0.102

Use file command

$ file libnvrtc.so.9.0.102
libnvrtc.so.9.0.102: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

In this case (using PowerPC) the others (libraries) are for 64-bit PowerPC.

$ file libnvrtc-builtins.so.9.0.103
libnvrtc-builtins.so.9.0.103: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, stripped

so, all libraries should be for PowerPC. However, libnvrtc.so is ELF 64-bit LSB shared object, x86-64

I gave up.

Hiroki11x commented 6 years ago

I heard CUDA9 problem is modified.

after cmake

$make -j 128 install

~~
~~

Building NVCC (Device) object third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/nccl/./gloo_cuda_generated_nccl.cu.o
[ 16%] Built target diagnostics_test
Linking CXX executable filter_test
Linking CXX executable multiple_ranges_test
Linking CXX executable options_test
[ 16%] Built target filter_test
[ 16%] Built target multiple_ranges_test
Linking CXX executable map_test
[ 16%] Built target options_test
[ 16%] Built target map_test
Linking CXX executable benchmark_test
[ 16%] Built target benchmark_test
Linking CXX executable register_benchmark_test
Linking CXX executable complexity_test
[ 16%] Built target complexity_test
Linking CXX executable skip_with_error_test
[ 16%] Built target register_benchmark_test
[ 16%] Built target skip_with_error_test
Linking CXX executable reporter_output_test
[ 16%] Built target reporter_output_test
/home/hiroki11/caffe2/third_party/gloo/gloo/types.h(60): error: class "__half" has no member "x"

/home/hiroki11/caffe2/third_party/gloo/gloo/types.h(60): error: class "__half" has no member "x"

/home/hiroki11/caffe2/third_party/gloo/gloo/types.h(60): error: class "__half" has no member "x"

1 error detected in the compilation of "/tmp/tmpxft_00025eee_00000000-6_cuda.cpp1.ii".
CMake Error at gloo_cuda_generated_cuda.cu.o.cmake:260 (message):
  Error generating file
  /home/hiroki11/caffe2/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda.cu.o

make[2]: *** [third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/./gloo_cuda_generated_cuda.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error detected in the compilation of "/tmp/tmpxft_00025f0a_00000000-6_cuda_private.cpp1.ii".
CMake Error at gloo_cuda_generated_cuda_private.cu.o.cmake:260 (message):
  Error generating file
  /home/hiroki11/caffe2/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda_private.cu.o

make[2]: *** [third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/./gloo_cuda_generated_cuda_private.cu.o] Error 1
1 error detected in the compilation of "/tmp/tmpxft_00025ef4_00000000-6_nccl.cpp1.ii".
CMake Error at gloo_cuda_generated_nccl.cu.o.cmake:260 (message):
  Error generating file
  /home/hiroki11/caffe2/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/nccl/./gloo_cuda_generated_nccl.cu.o

make[2]: *** [third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/nccl/./gloo_cuda_generated_nccl.cu.o] Error 1
make[1]: *** [third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 16%] Built target Caffe2_PROTO
[ 16%] Built target python_copy_files
Linking CXX shared library libgmock.so
[ 16%] Built target gmock
Linking CXX shared library libgtest.so
Linking CXX shared library libgmock_main.so
[ 16%] Built target gtest
[ 16%] Built target gmock_main
[ 16%] Built target Caffe_PROTO
make: *** [all] Error 2
Hiroki11x commented 6 years ago

if I change CUDA8, I can install Caffe2.

Hiroki11x commented 6 years ago

I try to build latest caffe2 https://github.com/caffe2/caffe2/commit/c59f29163a15d0ccccb4a77db07f6f1da2757b76


[ 69%] [ 70%] [ 70%] [ 71%] [ 71%] [ 71%] [ 71%] [ 71%] [ 73%] [ 73%] [ 73%] [ 73%] Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/utils/./Caffe2_GPU_generated_math_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/core/./Caffe2_GPU_generated_context_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/image/./Caffe2_GPU_generated_transform_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_boolean_unmask_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_accumulate_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_batch_matmul_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_accuracy_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_abs_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_boolean_mask_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_distance_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_clip_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_dropout_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_cos_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_cross_entropy_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_find_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_cast_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_half_float_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_lstm_unit_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_elementwise_linear_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_elu_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_given_tensor_fill_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_filler_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_leaky_relu_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_elementwise_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_lp_pool_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_exp_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_gru_unit_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_local_response_normalization_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_multi_class_accuracy_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_loss_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_negative_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_order_switch_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_instance_norm_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_margin_ranking_criterion_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_pool_op_cudnn.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_one_hot_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_max_pool_with_index.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_log_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_math_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_mem_query_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_perplexity_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_normalize_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_relu_op_fp16.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_sin_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_softmax_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_softplus_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_resize_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_tile_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_pad_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_piecewise_linear_transform_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_pool_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_transpose_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_prelu_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_summarize_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_softsign_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_segment_reduction_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_reduction_ops.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_roi_pool_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_relu_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/sgd/./Caffe2_GPU_generated_rmsprop_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/sgd/./Caffe2_GPU_generated_momentum_sgd_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/sgd/./Caffe2_GPU_generated_adam_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_sigmoid_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_top_k.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_reverse_packed_segs_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/sgd/./Caffe2_GPU_generated_adagrad_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_space_batch_op_gpu.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_tanh_op.cu.o
Building NVCC (Device) object caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_utility_ops.cu.o
/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/one_hot_ops.cu(19): error: OneHotOp is not a template

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/one_hot_ops.cu(34): error: identifier "OneHotOp" is undefined

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/one_hot_ops.cu(34): error: type name is not allowed

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/one_hot_ops.cu(34): error: expected an expression

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/one_hot_ops.cu(34): error: type name is not allowed

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/one_hot_ops.cu(34): error: expected an expression

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(200): error: SequenceMaskOp is not a template

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(221): error: this declaration has no storage class or type specifier

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(221): error: expected a ";"

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(231): warning: parsing restarts here after previous syntax error

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(232): error: expected a declaration

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(293): warning: parsing restarts here after previous syntax error

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(294): error: expected a declaration

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(296): error: identifier "CAFFE2_PLEASE_ADD_OPERATOR_SCHEMA_FOR_SequenceMask" is undefined

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(296): error: identifier "RegistererCUDAOperatorRegistry" is undefined

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(296): error: expected a ")"

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(298): error: expected a declaration

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(123): warning: function "caffe2::<unnamed>::sequenceMaskKernel" was declared but never referenced

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(138): warning: function "caffe2::<unnamed>::windowMaskKernel" was declared but never referenced

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(158): warning: function "caffe2::<unnamed>::upperMaskKernel" was declared but never referenced

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(168): warning: function "caffe2::<unnamed>::lowerMaskKernel" was declared but never referenced

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(178): warning: function "caffe2::<unnamed>::upperDiagMaskKernel" was declared but never referenced

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/boolean_mask_ops.cu(188): warning: function "caffe2::<unnamed>::lowerDiagMaskKernel" was declared but never referenced

9 errors detected in the compilation of "/tmp/tmpxft_0001d31c_00000000-7_boolean_mask_ops.cpp1.ii".
CMake Error at Caffe2_GPU_generated_boolean_mask_ops.cu.o.cmake:260 (message):
  Error generating file
  /home/hiroki11/latest_caffe2/caffe2/build/caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_boolean_mask_ops.cu.o

make[2]: *** [caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_boolean_mask_ops.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
6 errors detected in the compilation of "/tmp/tmpxft_0001d0d5_00000000-7_one_hot_ops.cpp1.ii".
CMake Error at Caffe2_GPU_generated_one_hot_ops.cu.o.cmake:260 (message):
  Error generating file
  /home/hiroki11/latest_caffe2/caffe2/build/caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_one_hot_ops.cu.o

make[2]: *** [caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_one_hot_ops.cu.o] Error 1
/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/filler_op.cu(39): error: DiagonalFillOp is not a template

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/filler_op.cu(61): error: identifier "DiagonalFillOp" is undefined

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/filler_op.cu(61): error: type name is not allowed

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/filler_op.cu(61): error: expected an expression

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/filler_op.cu(61): error: type name is not allowed

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/filler_op.cu(61): error: expected an expression

6 errors detected in the compilation of "/tmp/tmpxft_0001d19f_00000000-7_filler_op.cpp1.ii".
CMake Error at Caffe2_GPU_generated_filler_op.cu.o.cmake:260 (message):
  Error generating file
  /home/hiroki11/latest_caffe2/caffe2/build/caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_filler_op.cu.o

make[2]: *** [caffe2/CMakeFiles/Caffe2_GPU.dir/operators/./Caffe2_GPU_generated_filler_op.cu.o] Error 1
/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/lp_pool_op.cu(24): warning: function "caffe2::<unnamed>::cuda_pow(T, T) [with T=double]" was declared but never referenced

/home/hiroki11/latest_caffe2/caffe2/caffe2/operators/lp_pool_op.cu(33): warning: function "caffe2::<unnamed>::cuda_abs(T) [with T=double]" was declared but never referenced

make[1]: *** [caffe2/CMakeFiles/Caffe2_GPU.dir/all] Error 2
make: *** [all] Error 2

I took mistake, I failed to detect opencv path

So, fix it .

I can build latest caffe2.