addKernel launch failed: no kernel image is available for execution on the device

940MX is a compute capability 5.0 GPU. You need to compile for a architecture that matches your GPU. CUDA 11.x and 12.x compile by default for cc5.2. See here.

1 Like