第一步 先确定你的显卡 是不是N卡(控制面板 》系统》设备管理器》显示适配器)
CUDA Development Tools https://developer.nvidia.com/cuda-downloads点击打开链接
NVIDIA CUDA Getting Started Guide for Microsoft Windows
Introduction
CUDA™ is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU).
- Provide a small set of extensions to standard programming languages, like C, that enable a straightforward implementation of parallel algorithms. With CUDA C/C++, programmers can focus on the task of parallelization of the algorithms rather than spending time on their implementation.
- Support heterogeneous computation where applications use both the CPU and GPU. Serial portions of applications are run on the CPU, and parallel portions are offloaded to the GPU. As such, CUDA can be incrementally applied to existing applications. The CPU and GPU are treated as separate devices that have their own memory spaces. This configuration also allows simultaneous computation on the CPU and GPU without contention for memory resources.
This guide will show you how to install and check the correct operation of the CUDA development tools.
System Requirements
- CUDA-capable GPU
- Microsoft Windows XP, Vista, 7, or 8 or Windows Server 2003 or 2008
- NVIDIA CUDA Toolkit (available at no cost from http://www.nvidia.com/content/cuda/cuda-downloads.html)
- Microsoft Visual Studio 2008 or 2010, or a corresponding version of Microsoft Visual C++ Express
Installing CUDA Development Tools
- Verify the system has a CUDA-capable GPU.
- Download the NVIDIA CUDA Toolkit.
- Install the NVIDIA CUDA Toolkit.
- Test that the installed software runs correctly and communicated with the hardware.
Verify You Have a CUDA-Capable GPU
To verify that your GPU is CUDA-capable, open the Control Panel ( ) and double click on System. In the System Properties window that opens, click the Hardware tab, then Device Manager. Expand the Display adapters entry. There you will find the vendor name and model of your graphics card. If it is an NVIDIA card that is listed in http://www.nvidia.com/object/cuda_gpus.html, your GPU is CUDA-capable.
The Release Notes for the CUDA Toolkit also contain a list of supported products.
Download the NVIDIA CUDA Toolkit
The NVIDIA CUDA Toolkit is available at http://www.nvidia.com/content/cuda/cuda-downloads.html.
Choose the platform you are using and download the NVIDIA CUDA Toolkit
The NVIDIA CUDA Toolkit contains the driver and tools needed to create, build and run a CUDA application as well as libraries, header files, CUDA samples source code, and other resources.
Install the CUDA Software
Before installing the toolkit, you should read the Release Notes, as they provide details on installation and software functionality.
Install the CUDA Toolkit by executing the Toolkit installer and following the on-screen prompts.
You can choose what to install from the following packages:
-
Note: If you want to install the CUDA Driver for new hardware, and have already installed the CUDA Driver before, you can launch the CUDA Driver installer from the Start Menu under:CUDA Driver
NVIDIA Corporation\CUDA Toolkit\v5.0, or
NVIDIA Corporation\CUDA Toolkit\v5.0 (64 bit)
The CUDA Driver installation can be done silently or by using a GUI. A silent installation of the driver is done by enabling that feature when choosing what to install.- Silent: Only the display driver will be installed.
- GUI: A window will appear after the CUDA Toolkit installation if you allowed it at the last dialog with the full driver installation UI. You can choose which features you wish to install.
- CUDA Toolkit
The CUDA Toolkit installation defaults to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v#.#, where #.# is version number 3.2 or higher. This directory contains the following:
-
Bin\
- the compiler executables and runtime libraries Include\
- the header files needed to compile CUDA programs Lib\
- the library files needed to link CUDA programs Doc\
- the CUDA C Programming Guide, CUDA C Best Practices Guide, documentation for the CUDA libraries, and other CUDA Toolkit-related documentation
Note: CUDA Toolkit versions 3.1 and earlier installed into C:\CUDA by default, requiring prior CUDA Toolkit versions to be uninstalled before the installation of new versions. Beginning with CUDA Toolkit 3.2, multiple CUDA Toolkit versions can be installed simultaneously.
- CUDA Samples
The CUDA Samples contain source code for many example problems and templates with Microsoft Visual Studio 2008 and 2010 projects.
For Windows XP, the samples can be found here:C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\CUDA Samples\v5.0
For Windows Vista, Windows 7, and Windows Server 2008, the samples can be found here:C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0
Verify the Installation
Before continuing, it is important to verify that the CUDA programs can find and communicate correctly with the CUDA-capable hardware. To do this, you need to compile and run some of the included sample programs.
Running the Compiled Examples
The version of the CUDA Toolkit can be checked by running nvcc -V in a Command Prompt window. You can display a Command Prompt window by going to:
Start > All Programs > Accessories > Command Prompt
CUDA Samples include sample programs in both source and compiled form. To verify a correct configuration of the hardware and software, it is highly recommended that you run the deviceQuery program located here:
C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\CUDA Samples\v5.0\C\bin\win32\Release
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\C\bin\win32\Release
This assumes that you used the default installation directory structure. (On 64-bit versions of Windows, the directory name ends with \win64\Release.) If CUDA is installed and configured correctly, the output should look similar to Figure 1.
The exact appearance and the output lines might be different on your system. The important outcomes are that a device was found, that the device(s) match what is installed in your system, and that the test passed.
If a CUDA-capable device and the CUDA Driver are installed but deviceQuery reports that no CUDA-capable devices are present, ensure the deivce and driver are properly installed.
Running the bandwidthTest program, located in the same directory as deviceQuery above, ensures that the system and the CUDA-capable device are able to communicate correctly. The output should resemble Figure 2.
The device name (second line) and the bandwidth numbers vary from system to system. The important items are the second line, which confirms a CUDA device was found, and the second-to-last line, which confirms that all necessary tests passed.
If the tests do not pass, make sure you do have a CUDA-capable NVIDIA GPU on your system and make sure it is properly installed.
-
For Windows XP:
c:\Documents and Settings\All Users\Application Data\CUDA Samples\v5.0\C\bin\win32\Release
(or …\win64\Release on 64-bit Windows) -
For Windows Vista, Windows 7, Windows 8, Windows Server 2003, and Windows Server 2008:
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\C\bin\win32\Release
(or …\win64\Release on 64-bit Windows)
Compiling CUDA Programs
CUDA Samples\v5.0\C\<category>\<sample_name>or the global solution files Samples*.sln located in
CUDA Samples\v5.0\C
CUDA Samples are organized according to <category>. Each sample is organized into one of the following folders: (0_Simple, 1_Utilities, 2_Graphics, 3_Imaging, 4_Finance, 5_Simulations, 6_Advanced, 7_CUDALibraries).
Compiling Sample Projects
The bandwidthTest project is a good sample project to build and run. It is located in the NVIDIA Corporation\CUDA Samples\v5.0\C\1_Utilities\bandwidthTest directory.
The output is placed in CUDA Samples\C\v5.0\bin\win32\Release. (As mentioned previously, the \win32 segment of this address will be \win64 on 64-bit versions of Windows.) This location presumes that you used the default installation directory structure. Build the program using the appropriate solution file and run the executable. If all works correctly, the output should be similar to Figure 2.
Sample Projects
The sample projects come in two configurations: debug and release (where release contains no debugging information).
A few of the example projects require some additional setup. The simpleD3D9 example requires the system to have a Direct3D SDK installed and the Visual C++ directory paths (located in
) properly configured. Consult the Direct3D documentation for additional details.These sample projects also make use of the $CUDA_PATH environment variable to locate the CUDA Toolkit and a .rules file to locate and configure the nvcc compiler. The environment variable is set automatically and the .rules file is installed automatically as part of the CUDA Toolkit installation process. The .rules file is installed into $VisualStudioInstallDir\VC\VCProjectDefaults. You can reference this .rules file from your Visual Studio project files when building your own CUDA applications.
Build Customizations for New Projects
When creating a new CUDA application, the Visual Studio project file must be configured to include CUDA build customizations. To accomplish this, click File-> New | Project... NVIDIA-> CUDA->, then select a template for your CUDA Toolkit version. For example, selecting the "CUDA 5.0 Runtime" template will configure your project for use with the CUDA 5.0 Toolkit. The new project is technically a C++ project (.vcxproj) that is preconfigured to use NVIDIA's Build Customizations. All standard capabilities of Visual Studio C++ projects will be available.
To specify a custom CUDA Toolkit location, under CUDA C/C++, select Common, and set the CUDA Toolkit Custom Dir field as desired. Note that the selected toolkit must match the version of the Build Customizations.
Build Customizations for Existing Projects
- Open the Visual Studio 2010 project, right click on the project name, and select Build Customizations..., then select the CUDA Toolkit version you would like to target.
- Alternatively, you can configure your project always to build with the most recently installed version of the CUDA Toolkit. First add a CUDA build customization to your project as above. Then, right click on the project name and select Properties. Under CUDA C/C++, select Common, and set the CUDA Toolkit Custom Dir field to $(CUDA_PATH) .
While Option 2 will allow your project to automatically use any new CUDA Toolkit version you may install in the future, selecting the toolkit version explicitly as in Option 1 is often better in practice, because if there are new CUDA configuration options added to the build customization rules accompanying the newer toolkit, you would not see those new options using Option 2.
msbuild <projectname.extension> /t:Rebuild /p:CudaToolkitDir="drive:/path/to/new/toolkit/"
Additional Considerations
Now that you have CUDA-capable hardware and the software installed, you can examine and enjoy the numerous included programs. To begin using CUDA to accelerate the performance of your own applications, consult the CUDA C Programming Guide, located in the CUDA Toolkit documentation directory.
A number of helpful development tools are included in the CUDA Toolkit or are available for download from the NVIDIA Developer Zone to assist you as you develop your CUDA programs, such as NVIDIA® Nsight™ Visual Studio Edition, NVIDIA Visual Profiler, and cuda-memcheck.
For technical support on programming questions, consult and participate in the developer forums at http://developer.nvidia.com/cuda/.
Notices
Notice
ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, "MATERIALS") ARE BEING PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. No license is granted by implication of otherwise under any patent rights of NVIDIA Corporation. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all other information previously supplied. NVIDIA Corporation products are not authorized as critical components in life support devices or systems without express written approval of NVIDIA Corporation.
Trademarks
NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation in the U.S. and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.
Copyright
© 2007-2012 NVIDIA Corporation. All rights reserved.
支持的显卡
CUDA-Enabled Tesla GPU Computing Products
![Tesla](http://www.nvidia.com/docs/IO/85252/NV_Tesla_3D.png)
GPU | Compute Capability |
---|---|
Tesla C2075 | 2.0 |
Tesla C2050/C2070 | 2.0 |
Tesla C1060 | 1.3 |
Tesla C870 | 1.0 |
Tesla D870 | 1.0 |
GPU | Compute Capability |
---|---|
Tesla K20 | 3.5 |
Tesla K10 | 3.0 |
Tesla M2050/M2070/M2075/M2090 | 2.0 |
Tesla S1070 | 1.3 |
Tesla M1060 | 1.3 |
Tesla S870 | 1.0 |
CUDA-Enabled Quadro Products
![Quadro](http://www.nvidia.com/docs/IO/85252/NV_QUA_3D.png)
GPU | Compute Capability |
---|---|
Quadro K5000 | 3.0 |
Quadro 6000 | 2.0 |
Quadro 5000 | 2.0 |
Quadro 4000 | 2.0 |
Quadro 4000 for Mac | 2.0 |
Quadro 2000 | 2.1 |
Quadro 2000D | 2.1 |
Quadro 600 | 2.1 |
Quadro FX 5800 | 1.3 |
Quadro FX 5600 | 1.0 |
Quadro FX 4800 | 1.3 |
Quadro FX 4800 for Mac | 1.3 |
Quadro FX 4700 X2 | 1.1 |
Quadro FX 4600 | 1.0 |
Quadro FX 3800 | 1.3 |
Quadro FX 3700 | 1.1 |
Quadro FX 1800 | 1.1 |
Quadro FX 1700 | 1.1 |
Quadro FX 580 | 1.1 |
Quadro FX 570 | 1.1 |
Quadro FX 470 | 1.1 |
Quadro FX 380 | 1.1 |
Quadro FX 380 Low Profile | 1.2 |
Quadro FX 370 | 1.1 |
Quadro FX 370 Low Profile | 1.1 |
Quadro CX | 1.3 |
Quadro NVS 450 | 1.1 |
Quadro NVS 420 | 1.1 |
NVIDIA NVS 300 | 1.2 |
Quadro NVS 295 | 1.1 |
Quadro Plex 7000 | 2.0 |
Quadro Plex 2200 D2 | 1.3 |
Quadro Plex 2100 D4 | 1.1 |
Quadro Plex 2100 S4 | 1.0 |
GPU | Compute Capability |
---|---|
Quadro K500M | 3.0 |
Quadro 5010M | 2.0 |
Quadro 5000M | 2.0 |
Quadro 4000M | 2.1 |
Quadro 3000M | 2.1 |
Quadro 2000M | 2.1 |
Quadro 1000M | 2.1 |
Quadro FX 3800M | 1.1 |
Quadro FX 3700M | 1.1 |
Quadro FX 3600M | 1.1 |
Quadro FX 2800M | 1.1 |
Quadro FX 2700M | 1.1 |
Quadro FX 1800M | 1.2 |
Quadro FX 1700M | 1.1 |
Quadro FX 1600M | 1.1 |
Quadro FX 880M | 1.2 |
Quadro FX 770M | 1.1 |
Quadro FX 570M | 1.1 |
Quadro FX 380M | 1.2 |
Quadro FX 370M | 1.1 |
Quadro FX 360M | 1.1 |
Quadro NVS 320M | 1.1 |
Quadro NVS 160M | 1.1 |
Quadro NVS 150M | 1.1 |
Quadro NVS 140M | 1.1 |
Quadro NVS 135M | 1.1 |
Quadro NVS 130M | 1.1 |
CUDA-Enabled NVS Products
![NVS](http://www.nvidia.com/docs/IO/85252/NVS.Logo.png)
GPU | Compute Capability |
---|---|
Quadro NVS 450 | 1.1 |
Quadro NVS 420 | 1.1 |
NVIDIA NVS 300 | 1.2 |
Quadro NVS 295 | 1.1 |
GPU | Compute Capability |
---|---|
NVS 4200M | 2.1 |
NVS 5100M | 1.2 |
NVS 3100M | 1.2 |
NVS 2100M | 1.2 |
CUDA-Enabled GeForce Products
GeForce 8, 9, 100, 200, 400-series, 500-series, and 600-series GPUs with a minimum of 256MB of local graphics memory.
![GeForce](http://www.nvidia.com/docs/IO/85252/NV_GEF_3D.png)