2
votes

I was programing on a AMD Radeon 5450, but changed to a Nvidia Geforce GT 710, my code was working just fine but but now it gives error -1 on:

clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);

Which means "device not found", does OpenCL work on Nvidia cards?

more info: Visual Studios 2012, C++, Drivers are ok.

GPU Cabs Viewer says opencl is off, Nvidia says it has support to opencl.

2
Probably you are still querying first platform which is intel or amd and does not see GT 710. Most probably intel since amd has broader range of devices to recognize. Enumerate platforms too or check for nvidia drivers if it is installed or not. - huseyin tugrul buyukisik
Are you sure you have installed a recent Nvidia GPU driver for your card? - KompjoeFriek
I don't think so... I just tested on GPU Caps Viewer, and I can't turn OpenCL on, but on Nvidia's site it says it it is suported... I can't figure out why i can't run this line of code - Jaytt Corrêa
The drivers are up to date - Jaytt Corrêa
Even though Nvidia does not list OpenCL support on their site, all Nvidia cards that have come out since 2011 do support it. Even the GT 710. Maybe something from the old AMD driver is still left and is interfering somehow. Could you try to completely remove all Nvidia and AMD drivers (with something like display-driver-uninstaller and reinstall the Nvidia drivers? - KompjoeFriek

2 Answers

0
votes

AMD drivers must be uninstalled completely before install the new drivers.

http://www.guru3d.com/files-details/display-driver-uninstaller-download.html

0
votes

Also, on Windows check registry parameters.

For Nvidia OpenCL:

HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors "nvopencl64.dll"=dword:00000000 HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Khronos\OpenCL\Vendors "nvopencl32.dll"=dword:00000000

For AMD OpenCL:

HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors "AMD_OpenCL64.dll"=dword:00000000 HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Khronos\OpenCL\Vendors "AMD_OpenCL32.dll"=dword:00000000

For Intel OpenCL:

HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors "IntelOpenCL64.dll"=dword:00000000 HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Khronos\OpenCL\Vendors "IntelOpenCL32.dll"=dword:00000000