Teach you the cuda5.5 and VS2010 build environment

Source: Internet
Author: User
Tags win32 cuda toolkit

The current version of the Cuda is very convenient, one of its installation includes the toolkit ' SDK ' document ' Nsight, and so on, rather than you to install one by one, this also avoids the version of the problem of different steps.

1 cuda5.5 Download Address, the official website can:

Https://developer.nvidia.com/cuda-downloads Select the computer version of your counterpart.

2 VS2010 This is nothing to say, the internet a variety of free resources, download a Do not need money on the line.

3 Cuda Installation: (Win7 version 32bit)

installation files for 3.1 Cuda

  

Directly double-click EXE file, pop-up, first will monitor your operating environment, if you can not find nividia corresponding graphics equipment, he will prompt you whether to continue installation. This nvidia graphics card, at least 8800 or more, if not able to write Cuda. Do not have an Intel or AMD graphics card on your computer, but write Cuda unless you have the money to buy a cuda-x86 compiler.

3.2 Pop-up dialog box directly OK on the line, this is cuda some of the installation files, does not matter:

3.3 He will monitor whether your computer supports CUDA construction, wait on the line

3.4 System Check

3.5 Choose to agree and continue

3.6 Recommended First select a custom installation

3.7 The most important is Cuda Document\cuda Toolkit \cuda Samples (SDK), nsight\ graphics driver, 3D if necessary, installation, does not matter. The main thing here is to see what is there, so as not to miss, bloggers originally because of the choice of a streamlined installation, not installed on the SDK.

  

3.7 Installed location, recommend yourself to build three easy to find folder, do not use his default path, so that later configure the environment variable trouble.

Bo Master's installation path is:

3.8 The next installation will do.

At this point, the Cuda installation is done.

4 Next Configure the CUDA environment variable, the default installation, he will automatically help you set up 2 environment variables, but it is best to add their own several other to facilitate the future configuration vs use

The above two environment variables are CUDA the default configuration, and then add

Cuda_bin_path%cuda_path%\bin

cuda_lib_path%cuda_path%\lib\win32

cuda_sdk_bin%cuda_sdk_path%\bin\win32

cuda_sdk_lib%cuda_sdk_path%\common\lib\win32

Cuda_sdk_path C:\cuda\cudasdk\common

Just finish adding it.

5 The next step is to monitor the success or failure of the CUDA, which we use to two things, two things that are cuda prepared for us.

DeviceQuery.exe and BandwithTest.exe

Start the cmd DOS command window first (Cuda of the blogger is installed under the C:\cuda folder)

The default entry is the c:\users\admistrator\> path, enter the CD. Two times, come to the C: directory

Enter Dir to locate the installed Cuda folder

After entering the release folder, execute BandwithTest.exe directly

And then execute deviceQuery.exe.

Get the above information because my graphics card is older 9300 belongs to the first generation of the Cuda graphics card. Rsult=pass and instructions, all passed. If rsult=fail that embarrassed, reinstall it (or your graphics card really do not give power).

5 Finally, the VS configuration.

5.1 Start VS2010

5.2 Create a Win32 console project, empty.

5.3 Right-key source files folder-> New Item-> Select Cuda c/c++-> Create a new file that ends with. cu

5.4 Right Key Engineering-"Generate Custom-" Select Cuda generation

5.5 Right Key test.cu-Property-Select Cuda C + + compiler

5.6 Right Key Engineering-"Properties-" linker-"general-" Additional Library directory-"Add directory $ (cuda_path_v5_5) \lib\$ (Platform);

5.7 Add CUDART.LIB in linker-input

5.8 in Tool-"Options-" text editor-"File extension-" Add CU \cuh two file extensions

At this point, the compilation of the environment related to the completion of the build.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.