I am trying to get OpenCL up and running on a Windows 7 machine. The machine has an NVIDIA GEFORCE GT 520M with driver version 8.17.12.6721
.
Does anyone know about getting started with GPU computing in OpenCL on Windows? Or of a good in-depth resource for getting it all set up? To make this question more specific, I guess I would like to know a) what SDK's and additional files must I download and install on top of the NVIDIA driver and b) how do I compile and run OpenCL code on Windows.
All CPUs support OpenCL 1.2 only. NVIDIA: NVIDIA GeForce 8600M GT, GeForce 8800 GT, GeForce 8800 GTS, GeForce 9400M, GeForce 9600M GT, GeForce GT 120, GeForce GT 130, ATI Radeon 4850, Radeon 4870, and likely more are supported. Apple (MacOS X only is supported)
There is no magic to it.
a) You have to install the CUDA SDK
b) To correctly #include
the OpenCL header you just need to set the include path of your IDE you to include/CUDA/CL
of the SDK you just installed, and link against the OpenCL.lib. That's it!
I can't describe it in detail if I don't know whether you are using Eclipse or Visual Studio or what, but if you don't know yet how to set the include path, there should be tons of instructions to be found via google.
If you are using Visual Studio then you would need to add the include and lib folders to your project as well as adding OpenCL.lib in order for everything to compile correctly. Also you would need to use the #include"CL/cl.h" command in your code.
I have ported an autotool-based project to Windows. You need MingW+msys
environment to make autotool and gcc work.
Then an OpenCL library is required to build the complete application.
I downloaded an OpenCL sample on nvidia developer's zone, and find the OpenCL.lib for x64 then you need reimp to convert the OpenCL.lib to libOpenCL.a , and copy the libOpenCL.a to mingw's system library path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With