Manual for CUDA Development on Windows Zhengjie Lu [email protected]

Contents Section 1: Preparation .................................................................................................................................. 2 Section 2: GPU Project Setup ........................................................................................................................ 3 Section 3: Programming Environment Setup.............................................................................................. 11 Section 4: GPU File Setup............................................................................................................................ 26

Section 1: Preparation 1.1 1.2 1.3 1.4

Have Microsoft Visual Studio 2008 Express on Microsoft Windows Vista/XP on your laptop. Install CUDA Driver 2.2 on your laptop. Install CUDA Toolkit 2.2 on your laptop. Install CUDA SDK 2.2 on your laptop.

Section 2: GPU Project Setup 2.1 Open Visual Studio 2008 Express, and create a new project, as shown in figure 2.1.

Fig.2.1

2.2 Click “General” in “Project types” catalogue and then select “Empty Project” in “Visual Studio installed templates” catalogue. After doing the two steps, fill in the name of the program and click “OK”. In this example, the program name is “Lab2_GPU” as shown in figure 2.2.

Fig.2.2

2.3 Obtain the .h files, .cpp files, .ppm files and .pgm files from the assignment website, and place them in the project folder. In this case, it is “Lab2_GPU/Lab2_GPU” and it should look like this as shown in figure 2.3.

Fig.2.3

2.4 Right click the “Header Files” icon in the “Solution Explorer” window and select “Add/Existing Item…”. It is shown in figure 2.4.

Fig.2.4

2.5 Choose all the .h files in the pop up file explorer and click “Add”, as shown in figure 2.5.

Fig.2.5

2.6 Right click the “Source Files” icon in the “Solution Explorer” window and select “Add/Existing Item…”, as shown in figure 2.6.

Fig. 2.6

2.7 Choose all the .cpp files in the pop up file explorer and click “Add”, as shown in figure 2.7.

Fig.2.7

2.8 Right now, your “Solution Explorer” should looks like that shown in figure 2.8.

Fig.2.8

Section 3: Programming Environment Setup 3.1 Click the “Tool” menu and then click the “Option” item, as shown in figure 3.1.

Fig.3.1

3.2 Click the item “VC++ Direction” under “Project and Solutions”, and select “Include files” in the “Show directories for:” catalogue. It is shown in figure 3.2.

Fig.3.2

3.3 Add both the CUDA include files path and the CUDA SDK include files path, as shown in figure 3.3.

Fig.3.3

3.4 Click the item “VC++ Direction” under “Project and Solutions”, and select “Library files” in the “Show directories for:” catalogue. It is shown in figure 3.4.

Fig.3.4

3.5 Add both the CUDA library files path and the CUDA SDK library files path, as shown in figure 3.5.

Fig.3.5

3.6 Click the item “VC++ Direction” under “Project and Solutions”, and select “Source files” in the “Show directories for:” catalogue. It is shown in figure 3.6.

Fig. 3.6

3.7 Add the CUDA SDK source files path, as shown in figure 3.7.

Fig.3.7

3.8 Click the item “VC++ Project Setting” under “Project and Solutions”, and append “*.cu” to the item “C/C++ File Extension”. It is shown in figure 3.8.

Fig.3.8

3.9 Click the item “VC++ Project Setting” under “Project and Solutions”, and then fill in the blank “Rule File Searchg Paths” with the path in which the “Cuda.Rules” exists. It is shown in figure 3.9. After finishing these steps, click “OK”.

Fig.3.9

3.10

Click the “Project” menu and choose the “Properties”, as shown in figure 3.10.

Fig.3.10

3.11 Click “Linker” under the “Configuration Properties” and then click the item “General”. Select “NO/(INCREMENTAL:NO)” in “Enable Incremental Linking”. It is shown in figure 3.11.

Fig.3.11

3.12 Click “Linker” under the “Configuration Properties” and then click the item “Input”. Add two libraries “cudart.lib” and “cutil32.lib” into the blank “Additional Dependencies”. After finishing these steps, click “OK” as shown in figure 3.12.

Fig.3.12

3.13 Right click the project “Lab2_GPU” in the “Solution Explorer” window and then choose the item “Custom Build Rules…”, as shown in figure 3.13.

Fig.3.13

3.14 Select “CUDA Build Rule v2.20” in the catalogue “Available Rule Files” and click OK, as shown in figure 3.14.

Fig.3.14

3.15

A warning window would pop up and just click “OK”, as shown in figure 3.15.

Fig.3.15

Section 4: GPU File Setup 4.1 Now you can develop your own program on CPU. To develop your program on GPU, a new file with the postfix .cu should be used. Right click the “Source Files” icon in the “Solution Explorer” window and choose “Add/New Item…” as shown in figure 4.1.

Fig.4.1

4.2 Click “Code” under “Visual C++” and then select “C++ File (.cpp)” in “Visual Studio installed templates”. Give a name to the GPU file, e.g. “GPU.cu” and click “Add”.

Fig.4.2

4.3 Open the file “main.cpp” and include the file “GPU.cu” in it, as shown in figure 4.3. Now you can develop your GPU program codes in “GPU.cu” and invoke them in “main.cpp”.

Fig.4.3

Manual for CUDA Development on Windows

2.2 Click “General” in “Project types” catalogue and then select “Empty Project” in “Visual Studio installed templates” catalogue. After doing the two steps, fill in the name of the program and click. “OK”. In this example, the program name is “Lab2_GPU” as shown in figure 2.2. Fig.2.2 ...

4MB Sizes 2 Downloads 115 Views

Recommend Documents

Manual for Setting up CUDA Emulation on Windows
Open the Visual Studio project which has been setup following “Manual for CUDA Development on Windows”. Please make sure that you have finished it. 2. Right click the project (e.g. “myTest”) in the “Solution Explorer” window, and select â

Windows on the Watershed
wasteful of water than sprinklers). • Mulching (helps retain moisture in soil, and can be a way to recycle organic waste material). • Integrated Pest Management.

Koha on Windows - UGC
[PDF]Koha on Windows - UGChttps://sites.google.com/site/pramodhbabu/KohaonWindows.pdfCachedby R Weir - ‎Cited by 3 - ‎Related articlesApr 28, 2005 - The Windows install provides access to the OPAC and Librarian (INTRANET) interfaces by using Apac

on Honesty & Integrity, for Continuous Growth & Development.
Business Unit: ______ ... Phone: Mobile: Pin Code: Nature of location: Rented Own Other (Specify). Address Proof submitted: Please note your name should be ...

Development manual - GitHub
BUSMASTER is located in a Git repository on the open source hosting platform ... version of the installer, e.g. Git-1.7.7-preview20111014.exe (as of 2011-10-26).

Download CUDA for Engineers: An Introduction to High ...
quickly guiding you from running sample programs to building your own code. ... parallelism model and C extensions* Transferring data between CPU and ... equations while changing initial or boundary conditions* Viewing/processing.

windows phone 8 development pdf
Connect more apps... Try one of the apps below to open or edit this item. windows phone 8 development pdf. windows phone 8 development pdf. Open. Extract.

windows application development tutorial pdf
Try one of the apps below to open or edit this item. windows application development tutorial pdf. windows application development tutorial pdf. Open. Extract.

windows application development tutorial pdf
windows application development tutorial pdf. windows application development tutorial pdf. Open. Extract. Open with. Sign In. Main menu. Displaying windows ...

Stereo Imaging with CUDA
Dec 17, 2007 - Also, this is one case where is it acceptable to mix a driver API function (cuMemGetInfo) .... worksheet included with the CUDA SDK will aid in.

WINDOWS 10 Manual Básico.pdf
WINDOWS 10 Manual Básico.pdf. WINDOWS 10 Manual Básico.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying WINDOWS 10 Manual Básico.pdf ...

WINDOWS 8.1 Manual Básico.pdf
ordenado nadie fisgonee en lo que estaba haciendo. Page 3 of 51. WINDOWS 8.1 Manual Básico.pdf. WINDOWS 8.1 Manual Básico.pdf. Open. Extract.

Stereo Imaging with CUDA
Dec 17, 2007 - The strategy employed in this example is highly optimized ... Changing image source data type is trivial and does not require re-optimization.

User Manual Liferay Development Project for ... -
Then two lines down change app.server.dir to app.server.dir=${project.dir}/tomcat-6.0.26. • Save the modifications. • Go into source directory and copy ...

NVIDIA CUDA Compute Unified Device Architecture
Device Architecture ...... This section describes the device management functions of the CUDA .... cudaThreadExit - exit and clean-up from CUDA launches.

read pdf on windows phone
Page 1 of 1. File: Read pdf on windows phone. Download now. Click here if your download doesn't start automatically. Page 1 of 1. read pdf on windows phone.

PhD Scholarship on Land-use Scenario Development for ... - AfricaRice
The PhD candidate focusing on land-use scenario development for African ... 1) Application letter, stipulating the motivation for pursuing a PhD degree and ...

On the Development of Name Search Techniques for Arabic.pdf ...
Such systems are used for applica- tions as diverse as tax fraud detection and immigration con- trol. Using names to retrieve information makes such systems.