Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

building Opencv 3.1.0 with cuda 8.0 in Ubuntu 14.04

I am trying to build opencv 3.1.0 with cuda 8.0 in ubuntu 14.04

  1. I first installed cuda 8.0, and nvidia diriver: 375.26.
  2. cmake: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -DOPENCV_EXTRA_MODULES_PATH=/home/lindeyang/library/opencv_contrib/modules ..

the results shows:

image description the cuda is found

Then make it shows : image description

The main errors shows is :

error "Insufficient Cuda Runtime library version, please update it."

However, Now I am using the latest version of Cuda 8.0 and the latest version driver 375.26.

Can anyone help? Thanks a lot.

Additional: the results from deviceQuery: image description

the results from nvidia-smi image description

the results after I add: -DCUDA_ARCH_BIN="5.0" -DCUDA_ARCH_PTX="5.0" image description

building Opencv 3.1.0 with cuda 8.0 in Ubuntu 14.04

I am trying to build opencv 3.1.0 with cuda 8.0 in ubuntu 14.04

  1. I first installed cuda 8.0, and nvidia diriver: 375.26.
  2. cmake: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -DOPENCV_EXTRA_MODULES_PATH=/home/lindeyang/library/opencv_contrib/modules ..

the results shows: -- Use Cuda: YES (ver 7.5) -- Use OpenCL: YES -- Use OpenVX: NO

-- Use custom HAL: NO

image description the -- NVIDIA CUDA -- Use CUFFT: YES -- Use CUBLAS: YES -- USE NVCUVID: NO -- NVIDIA GPU arch: 20 30 35 37 50 52 -- NVIDIA PTX archs:

-- Use fast math: YES

-- OpenCL: <dynamic loading="" of="" opencl="" library=""> -- Include path: /home/lindeyang/library/opencv/3rdparty/include/opencl/1.2 -- Use AMDFFT: NO -- Use AMDBLAS: NO

The cuda is found

Then make it shows : image description[ 12%] [ 12%] Generating perf_precomp.hpp.gch/opencv_perf_reg_RELEASE.gch Generating precomp.hpp.gch/opencv_reg_RELEASE.gch [ 12%] Generating test_precomp.hpp.gch/opencv_test_reg_RELEASE.gch [ 12%] Generating precomp.hpp.gch/opencv_surface_matching_RELEASE.gch In file included from /home/lindeyang/library/opencv/build/modules/core/precomp.hpp:56:0: /home/lindeyang/library/opencv/modules/core/include/opencv2/core/private.cuda.hpp:70:6: error: #error "Insufficient Cuda Runtime library version, please update it." # error "Insufficient Cuda Runtime library version, please update it." ^

The main errors shows is :

error "Insufficient Cuda Runtime library version, please update it."

However, Now I am using the latest version of Cuda 8.0 and the latest version driver 375.26.

Can anyone help? Thanks a lot.

Additional: the results from deviceQuery: image descriptionDetected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M" CUDA Driver Version / Runtime Version 8.0 / 8.0 CUDA Capability Major/Minor version number: 5.0 Total amount of global memory: 4044 MBytes (4240375808 bytes) ( 5) Multiprocessors, (128) CUDA Cores/MP: 640 CUDA Cores GPU Max Clock rate: 1176 MHz (1.18 GHz) Memory Clock rate: 2505 Mhz Memory Bus Width: 128-bit L2 Cache Size: 2097152 bytes Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096) Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 1 copy engine(s) Run time limit on kernels: Yes Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX 960M Result = PASS

the results from nvidia-smi image descriptionFri Dec 16 12:59:01 2016
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 375.26 Driver Version: 375.26 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 960M On | 0000:01:00.0 Off | N/A | | N/A 38C P8 N/A / N/A | 313MiB / 4043MiB | 8% Default | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1184 G /usr/lib/xorg/Xorg 235MiB | | 0 2000 G compiz 78MiB | +-----------------------------------------------------------------------------+

the results after I add: -DCUDA_ARCH_BIN="5.0" -DCUDA_ARCH_PTX="5.0" image description-DCUDA_ARCH_PTX="5.0"

-- Use Cuda: YES (ver 7.5) -- Use OpenCL: YES -- Use OpenVX: NO

-- Use custom HAL: NO

-- NVIDIA CUDA -- Use CUFFT: YES -- Use CUBLAS: YES -- USE NVCUVID: NO -- NVIDIA GPU arch: 50 -- NVIDIA PTX archs: 50 -- Use fast math: YES

click to hide/show revision 3
No.3 Revision

updated 2016-12-16 12:28:49 -0600

berak gravatar image

building Opencv 3.1.0 with cuda 8.0 in Ubuntu 14.04

I am trying to build opencv 3.1.0 with cuda 8.0 in ubuntu 14.04

  1. I first installed cuda 8.0, and nvidia diriver: 375.26.
  2. cmake:


cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -DOPENCV_EXTRA_MODULES_PATH=/home/lindeyang/library/opencv_contrib/modules .. ..

the results shows: shows:

--     Use Cuda:                    YES (ver 7.5)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO

NO -- Use custom HAL: NO

NO -- -- NVIDIA CUDA -- Use CUFFT: YES -- Use CUBLAS: YES -- USE NVCUVID: NO -- NVIDIA GPU arch: 20 30 35 37 50 52 -- NVIDIA PTX archs:

archs: -- Use fast math: YES

YES -- -- OpenCL: <dynamic loading="" of="" opencl="" library=""> <Dynamic loading of OpenCL library> -- Include path: /home/lindeyang/library/opencv/3rdparty/include/opencl/1.2 -- Use AMDFFT: NO -- Use AMDBLAS: NO

NO

The cuda is found

Then make make, it shows : :

[ 12%] [ 12%] Generating perf_precomp.hpp.gch/opencv_perf_reg_RELEASE.gch
Generating precomp.hpp.gch/opencv_reg_RELEASE.gch
[ 12%] Generating test_precomp.hpp.gch/opencv_test_reg_RELEASE.gch
[ 12%] Generating precomp.hpp.gch/opencv_surface_matching_RELEASE.gch
In file included from /home/lindeyang/library/opencv/build/modules/core/precomp.hpp:56:0:
/home/lindeyang/library/opencv/modules/core/include/opencv2/core/private.cuda.hpp:70:6: error: #error "Insufficient Cuda Runtime library version, please update it."
 #    error "Insufficient Cuda Runtime library version, please update it."
      ^

^

The main errors shows is :

error
#error "Insufficient Cuda Runtime library version, please update it."

it."

However, Now I am using the latest version of Cuda 8.0 and the latest version driver 375.26.

Can anyone help? Thanks a lot.

Additional:
the results from deviceQuery:
Detected 1 CUDA Capable device(s)

device(s) Device 0: "GeForce GTX 960M" CUDA Driver Version / Runtime Version 8.0 / 8.0 CUDA Capability Major/Minor version number: 5.0 Total amount of global memory: 4044 MBytes (4240375808 bytes) ( 5) Multiprocessors, (128) CUDA Cores/MP: 640 CUDA Cores GPU Max Clock rate: 1176 MHz (1.18 GHz) Memory Clock rate: 2505 Mhz Memory Bus Width: 128-bit L2 Cache Size: 2097152 bytes Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096) Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 1 copy engine(s) Run time limit on kernels: Yes Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

> deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX 960M Result = PASS

PASS

the results from nvidia-smi nvidia-smi

Fri Dec 16 12:59:01 2016 
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 375.26 Driver Version: 375.26 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 960M On | 0000:01:00.0 Off | N/A | | N/A 38C P8 N/A / N/A | 313MiB / 4043MiB | 8% Default | +-------------------------------+----------------------+----------------------+

+-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1184 G /usr/lib/xorg/Xorg 235MiB | | 0 2000 G compiz 78MiB | +-----------------------------------------------------------------------------+

+-----------------------------------------------------------------------------+ the results after I add: -DCUDA_ARCH_BIN="5.0" -DCUDA_ARCH_PTX="5.0"

-DCUDA_ARCH_PTX="5.0" -- Use Cuda: YES (ver 7.5) -- Use OpenCL: YES -- Use OpenVX: NO

NO -- Use custom HAL: NO

NO -- -- NVIDIA CUDA -- Use CUFFT: YES -- Use CUBLAS: YES -- USE NVCUVID: NO -- NVIDIA GPU arch: 50 -- NVIDIA PTX archs: 50 -- Use fast math: YES

YES

building Opencv 3.1.0 with cuda 8.0 in Ubuntu 14.04

I am trying to build opencv 3.1.0 with cuda 8.0 in ubuntu 14.04

  1. I first installed cuda 8.0, and nvidia diriver: 375.26.
  2. cmake:


cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -DOPENCV_EXTRA_MODULES_PATH=/home/lindeyang/library/opencv_contrib/modules ..

the results shows:

--     Use Cuda:                    YES (ver 7.5)
8.0)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  YES
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             20 30 35 37 50 52
--     NVIDIA PTX archs:
--     Use fast math:               YES
-- 
--   OpenCL:                        <Dynamic loading of OpenCL library>
--     Include path:                /home/lindeyang/library/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO

The cuda is found

Then make, it shows :

[ 12%] [ 12%] Generating perf_precomp.hpp.gch/opencv_perf_reg_RELEASE.gch
Generating precomp.hpp.gch/opencv_reg_RELEASE.gch
[ 12%] Generating test_precomp.hpp.gch/opencv_test_reg_RELEASE.gch
[ 12%] Generating precomp.hpp.gch/opencv_surface_matching_RELEASE.gch
In file included from /home/lindeyang/library/opencv/build/modules/core/precomp.hpp:56:0:
/home/lindeyang/library/opencv/modules/core/include/opencv2/core/private.cuda.hpp:70:6: error: #error "Insufficient Cuda Runtime library version, please update it."
 #    error "Insufficient Cuda Runtime library version, please update it."
      ^

The main errors shows is :

#error "Insufficient Cuda Runtime library version, please update it."

However, Now I am using the latest version of Cuda 8.0 and the latest version driver 375.26.

Can anyone help? Thanks a lot.

Additional:
the results from deviceQuery:
Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
  CUDA Driver Version / Runtime Version          8.0 / 8.0
  CUDA Capability Major/Minor version number:    5.0
  Total amount of global memory:                 4044 MBytes (4240375808 bytes)
  ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores
  GPU Max Clock rate:                            1176 MHz (1.18 GHz)
  Memory Clock rate:                             2505 Mhz
  Memory Bus Width:                              128-bit
  L2 Cache Size:                                 2097152 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX 960M
Result = PASS

the results from nvidia-smi

Fri Dec 16 12:59:01 2016       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26                 Driver Version: 375.26                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960M    On   | 0000:01:00.0     Off |                  N/A |
| N/A   38C    P8    N/A /  N/A |    313MiB /  4043MiB |      8%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1184    G   /usr/lib/xorg/Xorg                             235MiB |
|    0      2000    G   compiz                                          78MiB |
+-----------------------------------------------------------------------------+


the results after I add:  -DCUDA_ARCH_BIN="5.0" -DCUDA_ARCH_PTX="5.0"

--     Use Cuda:                    YES (ver 7.5)
8.0)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  YES
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             50
--     NVIDIA PTX archs:            50
--     Use fast math:               YES