Hi everyone. This is my first post, thanks for having me.
I'm trying to set up an old Toshiba laptop with a Radeon Mobility 4500 GPU, running Windows 8.1, so that I can develop against OpenCL 1.2. This is for a university project; the lecturer has specified that we have to use that version of OpenCL 1.2. I installed drivers using the Catalyst tool. Z-GPU reported that OpenCL support was available. I installed the AMD APP SDK 3.0 too.
My problem is: when I compile (under Visual Studio 2017) a short test program (mostly provided by the lecturer) intended to get OpenCL to report a device vendor string [1], I get a bunch of errors about things having been deprecated [2]. I think this may be because the version of OpenCL available through APP SDK 3.0 is (possibly much) later than the 1.2 I'm after? I'm hoping you guys might be able to point me towards a way of altering the setup so I can use OpenCL 1.2?
I did try searching both the web and this forum but couldn't find anything (that struck my admittedly uneducated eyes as) relevant. I've never done any GPU, concurrent or graphics programming before so apologies if any of the above comes across a bit daft!
Thanks in advance for any assistance.
[1] [C++] Hugh's OpenCL test snippet - Pastebin.com
[2] Hugh's VS2017 compile errors - Pastebin.com
Solved! Go to Solution.
dipak, many thanks. I checked and that option was already turned off. Including a "use deprecated" [1] macro also didn't help. For anyone else who may have a similar problem, I did get it resolved as follows:
* suppress Visual Studio warning 4996 (project properties -> C/C++ -> Advanced)
after that I got a bunch of linker errors, resolved as follows:
* include path to "OpenCL.lib" file in project "library directories" (project properties -> VC++ directories)
* include pragma to link the above file [2].
Program now produces expected output and I'm a happy bunny!
Thanks again for your help.
[1] #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
[2] #pragma comment(lib, "OpenCL.lib")
As per OpenCL 2.0 spec, some of the runtime APIs (e.g. clCreateCommandQueue) are deprecated now. However, the attached program should build/compile fine because those are not errors, rather warnings. I guess, "Treat warnings as errors" option was enabled under the VS project setting, hence the program build failed. Please disable this option, then try.
dipak, many thanks. I checked and that option was already turned off. Including a "use deprecated" [1] macro also didn't help. For anyone else who may have a similar problem, I did get it resolved as follows:
* suppress Visual Studio warning 4996 (project properties -> C/C++ -> Advanced)
after that I got a bunch of linker errors, resolved as follows:
* include path to "OpenCL.lib" file in project "library directories" (project properties -> VC++ directories)
* include pragma to link the above file [2].
Program now produces expected output and I'm a happy bunny!
Thanks again for your help.
[1] #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
[2] #pragma comment(lib, "OpenCL.lib")
It's nice to hear that the issue has been resolved now. Thanks for helping others by sharing above information.