cuDNN安装

4. Installing cuDNN on Windows

4.1. Prerequisites

Ensure you meet the following requirements before you install cuDNN.

在安装cuDNN之前,请确保满足以下要求。

  • A GPU of compute capability 3.0 or higher. To understand the compute capability of the GPU on your system, see: CUDA GPUs. Also see the cuDNN Support Matrix.
    计算能力为3.0或更高的GPU。 要了解系统上GPU的计算能力,请参阅:CUDA GPU。 另请参阅cuDNN支持列表。
  • One of the following supported platforms:
    • Windows 10
    • Windows 7
    • Windows Server 2016 or Windows Server 2012
  • One of the following supported CUDA versions and NVIDIA graphics driver:
    • NVIDIA graphics driver R418 or newer for CUDA 10.1
    • NVIDIA graphics driver R410 or newer for CUDA 10.0
    • NVIDIA graphics driver R396 or newer for CUDA 9.2
    • NVIDIA graphics driver R384 or newer for CUDA 9
    For more information, see

4.1.1. Installing NVIDIA Graphics Drivers

Install up-to-date NVIDIA graphics drivers on your Windows system.

  1. Go to: NVIDIA download drivers
  2. Select the GPU and OS version from the drop down menus.
  3. Download and install NVIDIA driver as indicated in that webpage. For more information, select the ADDITIONAL INFORMATION tab for step-by-step instructions for installing a driver.
  4. Restart your system to ensure the graphics driver takes effect.

4.1.2. Installing CUDA

Refer to the following instructions for installing CUDA on Windows, including the CUDA driver and toolkit: NVIDIA CUDA Installation Guide for Windows.

4.2. Downloading cuDNN

In order to download cuDNN, ensure you are registered for the NVIDIA Developer Program.

为了下载cuDNN,请确保您已注册NVIDIA开发人员计划。(需要注册)

  1. Go to: NVIDIA cuDNN home page.
  2. Click Download.
  3. Complete the short survey and click Submit.
  4. Accept the Terms and Conditions. A list of available download versions of cuDNN displays.
  5. Select the cuDNN version to want to install. A list of available resources displays.
  6. Extract the cuDNN archive to a directory of your choice.

4.3. Installing cuDNN on Windows

The following steps describe how to build a cuDNN dependent program. In the following sections the CUDA v9.0 is used as example:

以下步骤描述了如何构建依赖cuDNN的程序。 在以下各节中,以CUDA v9.0为例:

  • Your CUDA directory path is referred to as C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
    您的CUDA目录路径称为C:\ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v9.0
  • Your cuDNN directory path is referred to as <installpath>
    您的cuDNN目录路径称为<installpath>

  1. Navigate to your <installpath> directory containing cuDNN.
  2. Unzip the cuDNN package.
    cudnn-9.0-windows7-x64-v7.zip
    or
    cudnn-9.0-windows10-x64-v7.zip
  3. Copy the following files into the CUDA Toolkit directory.
    将以下文件复制到CUDA Toolkit目录中。
    1. Copy <installpath>\cuda\bin\cudnn64_7.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin.
    2. Copy <installpath>\cuda\ include\cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include.
    3. Copy <installpath>\cuda\lib\x64\cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64.
  4. Set the following environment variables to point to where cuDNN is located. To access the value of the $(CUDA_PATH) environment variable, perform the following steps:
    设置以下环境变量以指向cuDNN所在的位置。 要访问$(CUDA_PATH)环境变量的值,请执行以下步骤:
    1. Open a command prompt from the Start menu.
    2. Type Run and hit Enter.
    3. Issue the control sysdm.cpl command.
    4. Select the Advanced tab at the top of the window.
    5. Click Environment Variables at the bottom of the window.
    6. Ensure the following values are set:
      Variable Name: CUDA_PATH 
      Variable Value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
      
  5. Include cudnn.lib in your Visual Studio project.
    在您的Visual Studio项目中包含cudnn.lib。
    1. Open the Visual Studio project and right-click on the project name.
      打开Visual Studio项目,然后右键单击项目名称(点击属性,这坑逼又说的不详细,找半天)。
    2. Click Linker > Input > Additional Dependencies.
      单击链接器>输入>其他依赖关系。
    3. Add cudnn.lib and click OK.
      添加cudnn.lib并单击确定。

4.4. Upgrading from v6 to v7

cuDNN v7 can coexist with previous versions of cuDNN, such as v5 or v6.

cuDNN v7可以与cuDNN的早期版本共存,例如v5或v6。

4.5. Troubleshooting

Join the NVIDIA Developer Forum to post questions and follow discussions.

加入NVIDIA开发者论坛发表问题并关注讨论。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值