cuDNN 功能模块解析

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.

  1. 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.

  1. 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.

Table 1. Convolution terms


cuDNN 功能模块解析相关推荐

  1. Apollo 3.5 各功能模块的启动过程解析

    严正声明:本文系作者davidhopper原创,未经许可,不得转载.  Apollo 3.5彻底摒弃ROS,改用自研的Cyber作为底层通讯与调度平台.各功能模块的启动过程与之前版本天壤之别.本文对 ...

  2. 八字算命网站源码技术细节解析:使用PHP和JAVA实现的MVC架构、MySQL数据库设计和功能模块介绍

    技术文档:八字算命网站源码 1. 简介 本文档介绍了八字算命网站源码的技术细节,包括使用的技术.架构.数据库设计.代码结构和功能模块等. 2. 技术选型 本网站采用PHP和JAVA两种技术开发,具体如 ...

  3. 付费测算源码技术细节解析:使用Laravel框架实现的星座运势、塔罗牌、牛年运程、宝宝起名、月老姻缘、起名算命等多个功能模块

    技术文档:付费测算源码 1. 简介 本文档介绍了付费测算源码的技术细节,包括使用的技术.架构.数据库设计.代码结构和功能模块等.本源码提供了星座运势.塔罗牌.牛年运程.宝宝起名.月老姻缘.起名算命等多 ...

  4. Connect模块解析 转载

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

  5. [系统安全] 四十五.APT系列(10)Metasploit后渗透技术信息收集、权限提权和功能模块详解

    您可能之前看到过我写的类似文章,为什么还要重复撰写呢?只是想更好地帮助初学者了解病毒逆向分析和系统安全,更加成体系且不破坏之前的系列.因此,我重新开设了这个专栏,准备系统整理和深入学习系统安全.逆向分 ...

  6. python文件之间的相互调用_用Python创建功能模块——截取字符串模块

    用Python创建模块 本篇文章小编给大家分享在Python如何创建属于自己的模块,实现更多的功能! 一.模块 模块是什么?简单来说,当程序的功能很多.代码量很大时,我们可以编写一个实现一定功能的py ...

  7. Spring的核心模块解析

    转载自 Spring的核心模块解析 Spring框架是一个轻量级的集成式开发框架,可以和任何一种框架集成在一起使用,可以说是一个大的全家桶.Spring从1.x发展到现在的5.x可以说是越来越强大,下 ...

  8. python编写登录_通过Python编写一个简单登录功能过程解析

    通过Python编写一个简单登录功能过程解析 需求: 写一个登录的程序, 1.最多登陆失败3次 2.登录成功,提示欢迎xx登录,今天的日期是xxx,程序结束 3.要检验输入是否为空,账号和密码不能为空 ...

  9. Nginx 静态文件服务器搭建及autoindex模块解析

    ngx_http_autoindex_module ngx_http_autoindex_module模块处理以斜杠字符('/')结尾的请求,并生成目录列表. 当ngx_http_index_modu ...

最新文章

  1. substr vs substring
  2. Eclipse Modeling Framework, 2nd Edition. (EMF)学习笔记(一)——EMF介绍
  3. 用jquery调用wcf下的各种错误码的解释。
  4. 一个 Cobol 程序员的告白
  5. 手写自己的MyBatis框架-V2.0结果集处理
  6. sdram 时钟相位_零基础学FPGA (二十五)必会! 从静态时序分析到SDRAM时序收敛(下篇)...
  7. matplotlib可视化_使用Matplotlib改善可视化设计的5个魔术技巧
  8. netbeans 添加gif图片_GIF动图制作app下载|GIF动图制作安卓版 v3.9.2 官方免费版
  9. mysql connector api_mysql8 参考手册-Connector/J使用X DevAPI进行连接压缩
  10. 【 批量爬取下载geo.datav.aliyun.com下地图的json文 】
  11. 生产环境mysql主主同步主键冲突处理
  12. linux常用命令之文件管理
  13. 与数字化先锋共绘创新蓝图
  14. 在udp聊天器里如何给飞秋发消息
  15. 怎样把word文档里的html格式去掉,word文档去除格式
  16. Redis 中的 集合(Set) SCARD:获取集合包含的元素数量
  17. WP免费主题,wordpress免费主题,WP建站主题
  18. 几种常见的开源软件许可协议(GPL, LGPL, Apache License, BSD)
  19. 我的世界服务器自动刷矿机,我的世界刷矿机MOD
  20. Visio中插入Mathtype公式

热门文章

  1. OpenAPI使用(swagger3),Kotlin使用swagger3,Java使用swagger3,gradle、Maven使用swagger3
  2. Go 学习笔记(84)— Go 项目目录结构
  3. 2022-2028年中国汽车塑料行业市场深度分析及投资趋势预测报告
  4. Python 标准库之 Queue
  5. 机房收费系统【VB版】——选择下机
  6. pandas dataframe 字符映射为数字
  7. 自然语言处理课程(二):Jieba分词的原理及实例操作
  8. LeetCode简单题之数组中第 K 个独一无二的字符串
  9. ADAS摄像头20个技术挑战
  10. OneFlow系统设计