I am trying to run a CUDA application, which was already running on GTX960, on my laptop with MX250.
All CUDA APIs were returning with “initialization error”.
I am running on Windows10 64bit (on both PCs) and using CUDA Toolkit 11.1.
So I wrote a very basic application:
err = cudaGetDeviceCount(&nDevices);
if (err != cudaSuccess)
printf("cudaGetDeviceCount Error: %s\n", cudaGetErrorString(err));
printf("%d Devices\n", nDevices);
And compiled it with “nvcc test.cu -o test”
But the API cudaGetDeviceCount returns “initialization error”.
What could be the reason for this MX250 not running CUDA code?
What driver is installed? Each CUDA version requires a minimum driver version. For CUDA 11.1 on Windows, driver version must be >=456.38
Did you simply move over an existing CUDA-accelerated binary from your previous machine? That may not work, depending on how the application was compiled. There is no binary compatibility across GPU architectures. The application needs either machine code for the GPU it is running on, or intermediate PTX code that can be JIT-compiled for the current GPU. I would suggest re-compiling the CUDA application for the GPU architecture of your MX 250 (it seems to be a Pascal-family device with compute capability
Thank you for the very quick response!
I have updated my Windows drivers and changed the compilation to be:
“nvcc test.cu -gencode=arch=compute_61,code=“sm_61,compute_61” -o test”
But still no luck.
This is my NVIDIA-SMI print:
Could it be no processes are running at all ?
On my other GTX960 PC there are several Windows process running.
The output of
nvidia-smi clearly states (upper right corner) that the maximum version of CUDA supported by this driver version 443.32 is CUDA 10.2.
You are trying to run CUDA 11.1, so you need to install a newer driver, at least version 456.38.
MX250 Driver 443.32 is the latest.
I downgraded CUDA 11.1 to 10.2 - recompiled, and everything works on both PCs.
Thanks a lot!