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

Hello i get this error. how can i solve it?

terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.5.2) /home/opencv_contrib-4.5.2/modules/cudev/include/opencv2/cudev/grid/detail/split_merge.hpp:241: error: (-217:Gpu API call) no kernel image is available for execution on the device in function ‘split’

What is the model (e.g. GTX 1060) or compute capability (e.g. 6.1) of your GPU and which compute capabilities did you compile OpenCV to use, i.e. what does the CMake output under NVDIA CUDA look like, e.g.

– NVIDIA CUDA: YES (ver 12.0, CUFFT CUBLAS NVCUVID NVCUVENC FAST_MATH)
– NVIDIA GPU arch: 61
– NVIDIA PTX archs: 61

how can i get this result. which command?

Its the CMake output from the configuration stage. If you don’t have that go to your build folder, open CMakeCache.txt and search for CUDA_ARCH_BIN, you should find something similar to

//Specify ‘real’ GPU architectures to build binaries for, BIN(PTX)
// format is supported
CUDA_ARCH_BIN:STRING=6.1,8.6

//Specify ‘virtual’ PTX architectures to build PTX intermediate
// code for
CUDA_ARCH_PTX:STRING=8.6

Which GPU are you using?

crosspost:

GPU: AMD EPYC 7542 (128) @ 2.900GHz

CUDA_ARCH_BIN:STRING=7.4

CUDA_ARCH_PTX:STRING=

CUDA: 11.6

TENSORRT: 8.4

CUDA is only supported on Nvidia GPU’s.

I am sorry.

NVIDIA A100-SXM

This has compute capability 8.0.

This is not a valid compute capability, compilation would have failed with the below message when compiling

nvcc fatal : Unsupported gpu architecture ‘compute_74’

To conclude if you have an A100, either pass

-DCUDA_ARCH_BIN=8.0

to CMake to build CUDA code for your device architechture, or don’t pass anything and it will default to building for all valid architechtures which for the combination of OpenCV 4.5.2 and CUDA 11.6 will include 8.0.

2 Likes

Great!
It works!
Thank you!

1 Like