I loaded a CUDA template from Visual Studio 2022, compiled it (with a warning about conflicting libraries), and ran the “Start without debug.” The console comes up and displays
addKernel launch failed: no kernel image is available for execution on the device
addWithCuda failed!
I see this has been brought up on the forum quite a few times, and the suggestion was to compile with nvcc and run it from that as a solution. So I did.
nvcc -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe" -arch=sm_52 -o kernel1000.exe kernel.cu
For some odd reason, cl.exe just refuses to appear in the path depsite be putting it in the system, and account path so I had to force it.
During compile time on the command line it displayed the following:
tmpxft_0000072c_00000000-10_kernel.cudafe1.cpp
Creating library kernel1000.lib and object kernel1000.exp
Upon execution of the compile binary, i get the same result.
This is on my intel based laptop with a 940MX.
And here is nvidia-smi
Wed Feb 21 12:41:52 2024
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 546.17 Driver Version: 546.17 CUDA Version: 12.3 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce 940MX WDDM | 00000000:01:00.0 Off | N/A |
| N/A 0C P8 N/A / 200W | 0MiB / 4096MiB | 0% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+
±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
±--------------------------------------------------------------------------------------+
Any clues on resolving this?