CUDA driver version is insufficient for CUDA runtime version

I have a OpenCV program. The terminal displays “OpenCV Error : Gpu API call( CUDA driver version is in sufficient for CUDA runtime version)” when I run it.

Environment:
TX1 ubuntu 16.04
CUDA 8.0
OpenCV 2.4.13
NVidia driver Version 24.2.1

Thanks.

I have seen this cryptic message when the CMakeLists.txt file doesn’t specify the correct architecture when you compile. You should have something like this:

set(
	CUDA_NVCC_FLAGS
	${CUDA_NVCC_FLAGS}; 
    -O3 
	-gencode arch=compute_61,code=sm_61
	-gencode arch=compute_53,code=sm_53
	-gencode arch=compute_62,code=sm_62
)

Then google for what the values should be for your machine

Hi cl.weng,

Please move to jetpack 3.1 for this issue if possible.

Hi dawnhowe-sync,

Thank you for your reply.

I refer to the link below to recompile opencv, but It still have the same issue.
http://docs.opencv.org/trunk/d6/d15/tutorial_building_tegra_cuda.html

I run the deviceQuery of CUDA sample. I get the message

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is in sufficient for CUDA runtime version
Resul = FAIL

Hi WayneWWW,

Thank you for your reply.

The Jetpack version I installed is 3.1. But TX1 OS image is installed using Jetpack 2.3.1.

I try to use Jetpack 2.3.1 to install CUDA , but It still have the same issue.

I reinstall TX 1 OS and CUDA using Jetpack 2.3.1. The issue is solved.