Rtx3070 error kernel, exception on matcher.KnnMatch()

Im installed on my pc the RTX3070, but when I use the Cuda (emgu) this instruction:

GpuMat a1 = new GpuMat(tempalteDescriptor);
GpuMat a2 = new GpuMat(sceneDescriptor);
CudaBFMatcher matcher = new CudaBFMatcher(DistanceType.Hamming);
matcher.KnnMatch(a2, a1, matches, 8);

I have this error:

no kernel image is available for execution on the device, on Gpu API call
file name: D:\bb\cv_x64_cuda\build\opencv_contrib\modules\cudev\include\opencv2\cudev\grid\detail/transform.hpp
on the funcion:
cv::cudev::grid_transform_detail::TransformDispatcher<false, Policy>::call

on the stack i have:
at Emgu.CV.CvInvoke.CvErrorHandler(Int32 status, IntPtr funcName, IntPtr errMsg, IntPtr fileName, Int32 line, IntPtr userData)
at Emgu.CV.Cuda.CudaInvoke.cveCudaDescriptorMatcherKnnMatch1(IntPtr matcher, IntPtr queryDescs, IntPtr trainDescs, IntPtr matches, Int32 k, IntPtr masks, Boolean compactResult)
at Emgu.CV.Cuda.DescriptorMatcher.KnnMatch(IInputArray queryDescriptors, IInputArray trainDescriptors, VectorOfVectorOfDMatch matches, Int32 k, IInputArray mask, Boolean compactResult)
at GlassAnalyzer.ImageProcessing.AdapterCuda(CudaImage2 input1, CudaImage2 input2, Int32 errorMax, Int32 threshold, String basePath, Boolean save) in C:\Users\nsgIt\Documents\Visual Studio 2019\Project\GlassAnalyzerHS\GlassAnalyzer\cs\ImageProcessing.cs:line 1285

This problem solved when I changed the graphic Card and I used Quadro P1000

Hi there @g.gallucci and welcome to the NVIDIA developer forums.

This is an OpenCV error message and usually is a sign that OenCV is compiled for the wrong GPU architecture or the installed CUDA version does not meet driver/GPU requirements. Between Pascal and Ampere is quite a gap, so the first suggestion would be to update all OpenCV and CUDA/driver versions to specific Ampere generation ones.

Thanks!

But I’m using emgu CudaDLL 4.1.1.3497 and emgu DLL 4.1.1.3497.
How to compile this DLL for GPU architecture ?