Abstract

本cuDNN 8.0.4开发人员指南概述了cuDNN功能,如可自定义的数据布局、支持灵活的dimension ordering,striding,4D张量的子区域,这些张量用作其所有例程的输入和输出。这种灵活性可简单集成到任何神经网络实现中。

要访问cuDNN API参考,请参阅cuDNN API参考指南。

https://docs.nvidia.com/deeplearning/cudnn/api/index.html

有关先前发布的cuDNN开发人员文档,请参阅cuDNN存档。

https://docs.nvidia.com/deeplearning/cudnn/archives/index.html

1. Overview

NVIDIA CUDA Deep Neural Network library (cuDNN) 提供了深度神经网络GPU加速库。该cuDNN数据类型参考API描述了所有类型和枚举的 cuDNN库API。该cuDNN API参考描述了所有程序的API cuDNN库。

该cuDNN库以及这个API文档已经被分成以下库:

  • cudnn_ops_infer -该实体包含与cuDNN上下文创建和销毁,张量描述符管理器,张量实用程序以及常见ML算法的推理部分(例如批处理归一化,softmax,dropout等)有关的例程。
  • cudnn_ops_train -该实体包含通用的训练例程和算法,例如批量归一化,softmax,dropout等。
  • cudnn_ops_train 库依赖于 cudnn_ops_infer。
  • cudnn_cnn_infer-该实体包含推理时所需的与卷积神经网络相关的所有例程。的 cudnn_cnn_infer 库依赖于 cudnn_ops_infer。
  • cudnn_cnn_train-该实体包含训练期间所需的与卷积神经网络相关的所有例程。的 cudnn_cnn_train 库依赖于 cudnn_ops_infer, cudnn_ops_train和 cudnn_cnn_infer。
  • cudnn_adv_infer-该实体包含所有其他功能和算法。这包括RNN,CTC loss和多线程attention。cudnn_adv_infer 库依赖于 cudnn_ops_infer。
  • cudnn_adv_train -该实体包含以下所有cudnn_adv_infer训练对象 。 cudnn_adv_train 库依赖于 cudnn_ops_infer, cudnn_ops_train和 cudnn_adv_infer。
  • cudnn -这是应用程序层和cuDNN代码之间的可选填充层。该层在运行时适时地为API开放了适配的库。
  • cudnn_ops_infer - This entity contains the routines related to cuDNN context creation and destruction, tensor descriptor management, tensor utility routines, and the inference portion of common ML algorithms such as batch normalization, softmax, dropout, etc.
  • cudnn_ops_train - This entity contains common training routines and algorithms, such as batch normalization, softmax, dropout, etc. The cudnn_ops_train library depends on cudnn_ops_infer.
  • cudnn_cnn_infer - This entity contains all routines related to convolutional neural networks needed at inference time. The cudnn_cnn_infer library depends on cudnn_ops_infer.
  • cudnn_cnn_train - This entity contains all routines related to convolutional neural networks needed during training time. The cudnn_cnn_train library depends on cudnn_ops_infer, cudnn_ops_train, and cudnn_cnn_infer.
  • cudnn_adv_infer - This entity contains all other features and algorithms. This includes RNNs, CTC loss, and Multihead Attention. The cudnn_adv_infer library depends on cudnn_ops_infer.
  • cudnn_adv_train - This entity contains all the training counterparts of cudnn_adv_infer. The cudnn_adv_train library depends on cudnn_ops_infer, cudnn_ops_train, and cudnn_adv_infer.
  • cudnn - This is an optional shim layer between the application layer and the cuDNN code. This layer opportunistically opens the correct library for the API at runtime.

2. Programming Model

cudn库公开了一个主机API,但是假设对于使用GPU的操作,可以从设备直接访问所需的数据。

使用cuDNN的应用程序必须通过调用cudnnCreate()初始化库上下文的句柄。这个句柄被显式地传递给对GPU数据进行操作的每个后续库函数。一旦应用程序使用完cudndn,它就可以使用cudndestory()释放与库句柄关联的资源。这种方法允许用户在使用多个主机线程、gpu和CUDA流时显式地控制库的功能。

例如,应用程序可以使用cudaSetDevice将不同的设备与不同的主机线程相关联,并且在每个主机线程中,使用一个唯一的cuDNN句柄,该句柄将库调用定向到与之关联的设备。因此,使用不同句柄进行的cudn库调用将自动在不同的设备上运行。

假定与特定cuDNN关联的设备在相应的cudncreate()和cudndestory()调用之间保持不变。为了使cuDNN库在同一主机线程中使用不同的设备,应用程序必须通过调用cudaSetDevice()设置要使用的新设备,然后通过调用cudnnCreate()创建另一个cuDNN,cuDNN将与新设备相关联。

cuDNN API Compatibility

Beginning in cuDNN 7, the binary compatibility of a patch and minor releases is maintained as follows:

  • Any patch release x.y.z is forward or backward-compatible with applications built against another cuDNN patch release x.y.w (meaning, of the same major and minor version number, but having w!=z).
  • cuDNN minor releases beginning with cuDNN 7 are binary backward-compatible with applications built against the same or earlier patch release (meaning, an application built against cuDNN 7.x is binary compatible with cuDNN library 7.y, where y>=x).
  • Applications compiled with a cuDNN version 7.y are not guaranteed to work with 7.x release when y > x.

3. Convolution Formulas

This section describes the various convolution formulas implemented in convolution functions.

The convolution terms described in the table below apply to all the convolution formulas that follow.

cuDNN 功能模块解析的更多相关文章

  1. 【JAVAWEB学习笔记】网上商城实战5:后台的功能模块

    今日任务 完成后台的功能模块 1.1      网上商城的后台功能的实现: 1.1.1    后台的功能的需求: 1.1.1.1  分类管理: [查询所有分类] * 在左侧菜单页面中点击分类管理: * ...

  2. webpack模块解析

    前面的话 在web存在多种支持JavaScript模块化的工具(如requirejs和r.js),这些工具各有优势和限制.webpack基于从这些系统获得的经验教训,并将模块的概念应用于项目中的任何文 ...

  3. 文件一键上传、汉字转拼音、excel文件上传下载功能模块的实现

    ----------------------------------------------------------------------------------------------[版权申明: ...

  4. 痞子衡嵌入式:ARM Cortex-M内核那些事(3)- 功能模块

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是ARM Cortex-M功能模块. ARM Cortex-M处理器家族发展至今(2016),已有5代产品,分别是CM0/CM0+.CM1 ...

  5. Connect模块解析 转载

    来自对<了不起的Node.js>一书的学习ConnectNode.js为常规的网络应用提供了基本的API.然而,实际情况下,绝大部分网络应用都需要完成一系列类似的操作,这些类似的操作你一定 ...

  6. nginx源代码分析--nginx模块解析

    nginx的模块很之多.能够觉得全部代码都是以模块的形式组织.这包含核心模块和功能模块,针对不同的应用场合.并不是全部的功能模块都要被用到,附录A给出的是默认configure(即简单的httpser ...

  7. Spring 7大功能模块的作用

    1.   Spring 7大功能模块的作用 1)   核心容器(Spring core) 核心容器提供Spring框架的基本功能.Spring以bean的方式组织和管理Java应用中的各个组件及其关系 ...

  8. C# winform利用反射和自定义特性加载功能模块(插件式开发)

    由于在实际的工作中, 碰见这样的一个问题: 一个软件, 销售给A客户 他需要所有功能, 但是销售给B客户, 他只需要其中的一部分, 1.如果我们在实际的开发过程中, 没有把一些功能模块区分开来的话, ...

  9. Python技法:用argparse模块解析命令行选项

    1. 用argparse模块解析命令行选项 我们在上一篇博客<Linux:可执行程序的Shell传参格式规范>中介绍了Linux系统Shell命令行下可执行程序应该遵守的传参规范(包括了各 ...

随机推荐

  1. hdu1824 基础2sat

    题意: Let's go home Time Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...

  2. Python编写基于socket的非阻塞多人聊天室程序(单线程&多线程)

    前置知识:socket非阻塞函数(socket.setblocking(False)),简单多线程编程 代码示例: 1. 单线程非阻塞版本: 服务端: #!/usr/bin/env python # ...

  3. jquery简单实现tab选项卡效果

    html: <ul class="tab"> <li>最新</li> <li class="cur">热门< ...

  4. Andrew Ng机器学习算法入门(三):线性回归算法

    线性回归 线性回归,就是能够用一个直线较为精确地描述数据之间的关系.这样当出现新的数据的时候,就能够预测出一个简单的值. 线性回归中最常见的就是房价的问题.一直存在很多房屋面积和房价的数据,如下图所示 ...

  5. 每天一道面试题LeetCode 01 -- 两数之和

    Two Sum 两数之和 Given an array of integers, find two numbers such that they add up to a specific target ...

  6. 基于react hooks,antd4 配置生成表单并自动排列

    react后台项目,大多都是表单处理,比如下列4种常见1*n布局 (如果手工编码,大量的Row,Col, Form.Item的嵌套,排列,如果加上联动处理,代码将十分臃肿,不易维护) 一行一列 一行两 ...

  7. 【JavaScript】JS从入门到深入(复习查漏向

    [JavaScript]JS从入门到深入(复习查漏向 pre 精细得学过一遍JS后才发现,原来之前CTF中有些nodejs的题目以及一些游戏题的payload就变得很好理解了. 基础知识 ECMASc ...

  8. SpringBoot整合JWT

    JWT (整合SpringBoot) 1. 引入依赖 <!-- 引入JWT --> <dependency> <groupId>com.auth0</grou ...

  9. spring boot 与 Mybatis整合(*)

    在pom.xml文件中加入数据库.spring-mybatis整合 <!-- spring boot 整合mybatis --> <dependency> <groupI ...

  10. JPEG头部解析

    6.3 JPEG格式       6.3.1简介  微处理机中的存放顺序有正序(big endian)和逆序(little endian)之分.正序存放就是高字节存放在前低字节在后,而逆序存放就是低字 ...