GPU API Call error, invalid configuration argument when using CUDA
I compiled OpenCV3 in Windows 10 with CUDA, the compilation was succesful. I am using:
- Visual Studio 2015 in Windows 10
- CUDA 9.1
- NVIDIA Quadro P5000
- OpenCV 3.4.1
It compiles and I am able to do image processing without CUDA. When I use CUDA, I can detect the NVIDIA device and all its properties but I cannot call any image processing function. Maybe I am missing some configuration. I debugged it and found that it fails when checking for the block and grid configuration of the card, those values are passed as the Policy to the transform function but are hardcoded. It's there a way to set those values at runtime?
When I compiled OpenCV I set CUDA_ARCH_BIN and CUDA_ARCH_PTX to 6.1. Now, 6.1 is was not available before in CUDA_ARCH_BIN, but as it can be seen in the error below it is supported by the NVIDIA card I am using.
Edit 1
I still cannot run the threshold code I have.
On the other hand, opencv_test_cudaarithm can run, altough I have some errors. These are the values of the variables involved in one call of the threshold funcion.
size:[128 x 128]
type:0
channel:1
threshOp:0
useRoi:0
This are the errors after running opencv_test_cudaarithm:
[----------] Global test environment tear-down
[==========] 11613 tests from 67 test cases ran. (15629 ms total)
[ PASSED ] 11595 tests.
[ FAILED ] 18 tests, listed below:
[ FAILED ] CUDA_Arithm/Bitwise_Scalar.Or/8, where GetParam() = (Quadro P5000, 128x128, CV_32S, Channels(4))
[ FAILED ] CUDA_Arithm/Bitwise_Scalar.Or/17, where GetParam() = (Quadro P5000, 113x113, CV_32S, Channels(4))
[ FAILED ] CUDA_Arithm/Bitwise_Scalar.And/8, where GetParam() = (Quadro P5000, 128x128, CV_32S, Channels(4))
[ FAILED ] CUDA_Arithm/Bitwise_Scalar.And/17, where GetParam() = (Quadro P5000, 113x113, CV_32S, Channels(4))
[ FAILED ] CUDA_Arithm/Bitwise_Scalar.Xor/8, where GetParam() = (Quadro P5000, 128x128, CV_32S, Channels(4))
[ FAILED ] CUDA_Arithm/Bitwise_Scalar.Xor/17, where GetParam() = (Quadro P5000, 113x113, CV_32S, Channels(4))
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/0, where GetParam() = (Quadro P5000, 128x128, AngleInDegrees(false), whole matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/1, where GetParam() = (Quadro P5000, 128x128, AngleInDegrees(false), sub matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/2, where GetParam() = (Quadro P5000, 128x128, AngleInDegrees(true), whole matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/3, where GetParam() = (Quadro P5000, 128x128, AngleInDegrees(true), sub matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/4, where GetParam() = (Quadro P5000, 113x113, AngleInDegrees(false), whole matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/5, where GetParam() = (Quadro P5000, 113x113, AngleInDegrees(false), sub matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/6, where GetParam() = (Quadro P5000, 113x113, AngleInDegrees(true), whole matrix)
[ FAILED ] CUDA_Arithm/PolarToCart.Accuracy/7, where GetParam() = (Quadro P5000, 113x113, AngleInDegrees(true), sub matrix)
[ FAILED ] CUDA_Arithm/MeanStdDev.Async/0, where GetParam() = (Quadro P5000, 128x128, whole matrix)
[ FAILED ] CUDA_Arithm/MeanStdDev.Async/1, where GetParam() = (Quadro P5000, 128x128, sub matrix)
[ FAILED ] CUDA_Arithm/MeanStdDev.Async/2, where GetParam() = (Quadro P5000, 113x113, whole matrix)
[ FAILED ] CUDA_Arithm/MeanStdDev.Async/3, where GetParam() = (Quadro P5000, 113x113, sub matrix)
Info
This is the output with the error I get:
CUDA with OPENCV test program
<1> CUDA device(s) found
[CUDA Device 0]
name: Quadro P5000 ...