cuDNN 功能模块解析
本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 功能模块解析的更多相关文章
- 【JAVAWEB学习笔记】网上商城实战5:后台的功能模块
今日任务 完成后台的功能模块 1.1 网上商城的后台功能的实现: 1.1.1 后台的功能的需求: 1.1.1.1 分类管理: [查询所有分类] * 在左侧菜单页面中点击分类管理: * ...
- webpack模块解析
前面的话 在web存在多种支持JavaScript模块化的工具(如requirejs和r.js),这些工具各有优势和限制.webpack基于从这些系统获得的经验教训,并将模块的概念应用于项目中的任何文 ...
- 文件一键上传、汉字转拼音、excel文件上传下载功能模块的实现
----------------------------------------------------------------------------------------------[版权申明: ...
- 痞子衡嵌入式:ARM Cortex-M内核那些事(3)- 功能模块
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是ARM Cortex-M功能模块. ARM Cortex-M处理器家族发展至今(2016),已有5代产品,分别是CM0/CM0+.CM1 ...
- Connect模块解析 转载
来自对<了不起的Node.js>一书的学习ConnectNode.js为常规的网络应用提供了基本的API.然而,实际情况下,绝大部分网络应用都需要完成一系列类似的操作,这些类似的操作你一定 ...
- nginx源代码分析--nginx模块解析
nginx的模块很之多.能够觉得全部代码都是以模块的形式组织.这包含核心模块和功能模块,针对不同的应用场合.并不是全部的功能模块都要被用到,附录A给出的是默认configure(即简单的httpser ...
- Spring 7大功能模块的作用
1. Spring 7大功能模块的作用 1) 核心容器(Spring core) 核心容器提供Spring框架的基本功能.Spring以bean的方式组织和管理Java应用中的各个组件及其关系 ...
- C# winform利用反射和自定义特性加载功能模块(插件式开发)
由于在实际的工作中, 碰见这样的一个问题: 一个软件, 销售给A客户 他需要所有功能, 但是销售给B客户, 他只需要其中的一部分, 1.如果我们在实际的开发过程中, 没有把一些功能模块区分开来的话, ...
- Python技法:用argparse模块解析命令行选项
1. 用argparse模块解析命令行选项 我们在上一篇博客<Linux:可执行程序的Shell传参格式规范>中介绍了Linux系统Shell命令行下可执行程序应该遵守的传参规范(包括了各 ...
随机推荐
- Android最新敲诈者病毒分析及解锁
一.情况简介 从去年开始PC端的敲诈者类病毒在不断的爆发,今年年初的时候手机上也开始出现了敲诈者之类的病毒,对这类病毒很无语也是趋势,因为很多时候病毒的产生是和金钱利益相关的.前天去吾爱破解论坛病毒样 ...
- 基于react hooks,antd4 配置生成表单并自动排列
react后台项目,大多都是表单处理,比如下列4种常见1*n布局 (如果手工编码,大量的Row,Col, Form.Item的嵌套,排列,如果加上联动处理,代码将十分臃肿,不易维护) 一行一列 一行两 ...
- 快速运行cmd
方法一 运行 windows+r 输入cmd 指定要手动输入cd ...... 方法二 文件地址栏 在指定路径在文件地址栏前面输入cmd 方法三 shift+鼠标右键 打开到指定文件夹,shift+鼠 ...
- Insert Pictures In Hexo Blog
After build my blog following the online course step by step , I began to try to write my own blog️ ...
- dubbo服务暴露原理-远程暴露
1.与本地暴露相比,远程暴露也大同小异 我们已经到了第三个关键词Procotol我们来看看他的继承体系图 按照经典图的路线,我们下一个关键词应该就是Server了,从方法名openServer(url ...
- 【SpringMVC】添加操作时返回400
本博客老魏原创,如需转载请留言 问题描述: springmvc向数据库添加新的记录时,发生400错误,控制台没有抛出异常. 问题原因: 视图中的提交数据的某一个字段不不匹配导致. 解决方法: 不要怀疑 ...
- pysmiles:一个用于读写SMILES表达式的python库
技术背景 SMILES表达式是化学里面常用的用于标定元素之间关系的字符串,旨在用最简短的语句来完整的表达一个分子体系内所蕴含的基本信息,比如元素.连接性以及连接属性等.由于SMILES表达式的定义种类 ...
- 基于 el-form 封装一个依赖 json 动态渲染的表单控件
nf-form 表单控件的功能 基于 el-form 封装了一个表单控件,包括表单的子控件. 既然要封装,那么就要完善一些,把能想到的功能都要实现出来,不想留遗憾. 毕竟UI库提供的功能都很强大了,不 ...
- 通过LinkedHashMap实现LRU算法
一.基于LinkedHashMap源码分析 方法调用流程(这里只是以put方法位例) put() -> putVal() -> afterNodeInsertion() -> rem ...
- checked 和 prop() (散列性比较少的)
在<input class="sex1" type="radio" checked>男 checked表示该框会被默认选上 prop()操作的是D ...