gpu_flow icon indicating copy to clipboard operation
gpu_flow copied to clipboard

OpenCV error: Gpu API call (invalid device function)

Open zhaiyuan opened this issue 7 years ago • 2 comments

when i compute flow, i encounter the problem of "OpenCV Error: Gpu API call (invalid device function) in call, file /home/lei/opencvqt/opencv2.4.10/modules/gpu/include/opencv2/gpu/device/detail/transform_detail.hpp, line 361 terminate called after throwing an instance of 'cv::Exception' what(): /home/lei/opencvqt/opencv-2.4.10/modules/gpu/include/opencv2/gpu/device/detail/transform_detail.hpp:361: error: (-217) invalid device function in function call". I search how to solve it in google, and find most solution is set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -arch compute_20 -code sm_20) in cmakelist.txt. The gpu of my computer is NVIDIA TITAN X, so I amend -arch to compute_61 -code sm_61 according to my gpu, add it to CMakeLists.txt and remake it. But the problem also exists I don't know how to solve it?

zhaiyuan avatar Jun 30 '17 14:06 zhaiyuan

Have you solved the problem? I also meet it.

fairyzhxz avatar Nov 03 '18 08:11 fairyzhxz

Have you solved the problem? I also meet it. my computer is GeForce GTX 1080 Ti,

dsj1840923452 avatar Nov 01 '19 03:11 dsj1840923452