You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The opencv-3.1.0 and its contrib is installed.then I am going to install dense_flow.
everything looks ok,but when I input the command below
./extract_gpu -f=test.avi -x=tmp/flow_x -y=tmp/flow_y -i=tmp/image -b=20 -t=1 -d=0 -s=1 -o=dir
then I get
OpenCV Error: Gpu API call (no kernel image is available for execution on the device) in call, file /home/yh/opencv-3.1.0/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp, line 318
terminate called after throwing an instance of 'cv::Exception'
what(): /home/yh/opencv-3.1.0/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp:318: error: (-217) no kernel image is available for execution on the device in function call
how can I solve this problem? Thx a lot!!!
The text was updated successfully, but these errors were encountered:
计算力不匹配的问题 未设置前opencv在cmake的输出是这样的:计算力是30 35 37
NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: YES
USE NVCUVID:NO
NVIDIA GPU arch: 30 35 37
NVIDIA PTX archs:
Use fast math:NO
#Note:6.1为GTX1080的计算能力,不同显卡需要根据自己的计算能力进行修改
#查询显卡计算能力,可以通过运行cuda samples中的deviceQuery得知。
#(文件夹NVIDIA_CUDA-*_Samples下编译示例, *为版本号) 如果设置成功,cmake界面会有如下显示(我的显卡是1080ti):
NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: YES
USE NVCUVID:NO
NVIDIA GPU arch: 61
NVIDIA PTX archs:61
Use fast math:NO
GPU arch/PTX archs都被设置为6.1
但如果运气不佳,添加编译选项并不能解决问题。 这时候需要修改opencv中关于CUDA计算能力这部分的配置文件./cmake/OpenCVDetectCUDA.cmake。
在
set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
set(CUDA_ARCH_PTX ${__cuda_arch_ptx} CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
之前添加
set(__cuda_arch_bin "6.1")
set(__cuda_arch_ptx "6.1")
保存后cmake上面那一段,重新将opencv cmake make make install一遍出现正确的计算能力显示61
The opencv-3.1.0 and its contrib is installed.then I am going to install dense_flow.
everything looks ok,but when I input the command below
./extract_gpu -f=test.avi -x=tmp/flow_x -y=tmp/flow_y -i=tmp/image -b=20 -t=1 -d=0 -s=1 -o=dir
then I get
OpenCV Error: Gpu API call (no kernel image is available for execution on the device) in call, file /home/yh/opencv-3.1.0/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp, line 318
terminate called after throwing an instance of 'cv::Exception'
what(): /home/yh/opencv-3.1.0/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp:318: error: (-217) no kernel image is available for execution on the device in function call
how can I solve this problem? Thx a lot!!!
The text was updated successfully, but these errors were encountered: