Sie sind auf Seite 1von 5

Preparing your system for CSCI376 lab

This guide is based on the computer with the following setup:


• Microsoft Visual Studio 2017
• Windows 10 Home 64-bit
However, it should work on all versions starting from Visual Studio 2012 onwards and Windows 7
or Windows 8.

Introduction
OpenCL SDKs:
• AMD – AMD APP (Accelerated Parallel Processing)
• NVIDIA – CUDA (Compute Unified Device Architecture)
• Intel – Intel SDK for OpenCL Applications

OpenCL uses an “Installable Client Driver” (ICD) model


• To allow platforms from different vendors to co-exist
• Applications can choose a platform at runtime

Can check which SDK your PC already have by running regedit:


Look for the following folder in the registry:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors

This document will guide you in setting up the Visual Studio environment for using OpenCL with
AMD APP SDK.

Step 1
Download AMD APP SDK 3.0 from moodle and install it to your computer. Take note on the
installation path. (Default installation path is C:\program files (x86)\AMD APP SDK)

Step 2
Copy the header files and library files from the installed folders to C:\program files
(x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\

Source Path Copy To


C:\program files (x86)\AMD APP C:\program files (x86)\Microsoft Visual
SDK\3.0\include Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include
(both CL and GL subfolder)
C:\program files (x86)\AMD APP C:\program files (x86)\Microsoft Visual
SDK\3.0\lib\x86 Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86
(for 32-bit)
C:\program files (x86)\AMD APP C:\program files (x86)\Microsoft Visual
SDK\3.0\lib\x86_64 Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64
(for 64-bit)
Step 3
Start your Visual Studio 2017 and open the attached Hello OpenCL project (or create a new C++
Empty project).

Click on View on the menu then select Property Manager

Step 4
Expand <project name> → Debug | x64 and double-click on Microsoft.Cpp.x64.user
(Note: This setup is for 64-bit debug development)
Step 5
On the left pane of the Microsoft.Cpp.x64.user Property Pages, select Linker → Input

Then on the right pane, click on the pull-down menu of the Additional Dependencies and select
<Edit…> and type
OpenCL.lib

on the textbox and click OK.


Step 6
Build and execute (press Crtl + F5) the Hello OpenCL project. If you see the following output on the
screen, you have setup everything correctly.