No kernel image is available for execution on the device in function 'call'

Xavier NX with JetPack 511 (Version: 5.1.1-b56).
Added OpenCV 4.5.5 (build and install).
Built library and application successfully.
Application (ConsoleSample) aborts on first call to the GPU:
~/code/PTGDE/v5.1/Linux/PTGDE5.0/src/ConsoleSample$ ./ConsoleSample --defRadiusX=60 --defRadiusY=60 --defThreshold=8 --defBlendValue=128 --maAccumulation=128 --defAccumulation=64 --defInterpolation=1 --caRatio=10000 --caBlendValue=64 --caAccumulation=64 -movie ~/Downloads/ManCanall.mp4 ~/Downloads/ManCanallX_r60.mp4 -displaySBS >run_20230607_1140_Radius60_ca.log
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.5.5) /mnt/phsd/make_opencv/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp:264: error: (-217:Gpu API call) no kernel image is available for execution on the device in function ‘call’

Aborted (core dumped)

I have read many of the topics but this does not seem to me to be a covered issue. I.e. I am building (nvcc) with a long list of architecture codes, incl. 70 and 72 for the Xavier NX:

Linking “libptgde.so” (aarch64)…
/usr/local/cuda/bin/nvcc -ccbin g++ --shared -m64 -Xcompiler -Wall -Xcompiler -g -Xcompiler -Og -Xcompiler -fPIC -Xcompiler -DPTGDE_EXPORTS -Xcompiler -fvisibility=hidden -Xcompiler -I/usr/include/opencv4 -Xlinker --no-undefined -gencode arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_72,code=sm_72 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_87,code=sm_87 -gencode arch=compute_87,code=compute_87 -o libptgde.so PTGDE.o CudaColorAdjust.o CudaDEFn.o CudaMotionAdaptive2.o -lopencv_core -lopencv_cudaarithm -lopencv_cudaimgproc -lopencv_imgproc

The identical application with the same opencv code runs on Xavier NX with JetPack 4.6.2, and on Dell laptop with Ubuntu 20.04, A5000, Cuda 12.1, OpenCV 4.5.5.

Hi,

The error indicates that the OpenCV doesn’t build with XavierNX GPU architecture.

It looks like you add it when linking with the libptgde.so library.
Have you also added it when building the OpenCV core library?

For example:

Thanks.

ThX, Trying that now. However, how do we explain that I did NOT add that when making opencv for the Dell/Ubuntu2004/A5000? I am assuming I should have had to do that?

Hi,

OpenCV contains some basic/common GPU architecture.
So it might already contain the A5000 support.

Thanks.