feichtenhofer / gpu_flow

GPU based optical flow extraction in OpenCV
427 stars 109 forks source link

OpenCV error: Gpu API call (invalid device function) #4

Open zhaiyuan opened 7 years ago

zhaiyuan commented 7 years ago

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?

fairyzhxz commented 5 years ago

Have you solved the problem? I also meet it.

dsj1840923452 commented 4 years ago

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