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. 逆向 stdio.h 函数库 fopen 函数(调试版本)

    0x01 fopen 函数 函数原型:FILE *fopen(const char *filename, const char *mode) 返回值为 FILE 类型 函数功能:使用给定的模式 mod ...

  2. Github镜像网站

    https://hub.fastgit.org

  3. 一文详解MySQL如何同时自增自减多个字段

    本文将带大家聊一下如何同时自增自减多个字段 开始之前,先分享一套MySQL教程,小白入门或者学习巩固都可以看 MySQL基础入门-mysql教程-数据库实战(MySQL基础+MySQL高级+MySQL ...

  4. springboot使用jwt进行权限验证

    springboot使用jwt进行权限验证 依赖准备 首先导入对应的依赖 <dependencies> <dependency> <groupId>org.apac ...

  5. spring mvc简单使用

    spring mvc pom.xml依赖与插件 导入servlet.springmvc.Jackson的依赖,编译插件.tomcat <?xml version="1.0" ...

  6. 从 demo 到生产 - 手把手写出实战需求的 Flink 广播程序

    Flink 广播变量在实时处理程序中扮演着很重要的角色,适当的使用广播变量会大大提升程序处理效率. 本文从简单的 demo 场景出发,引入生产中实际的需求并提出思路与部分示例代码,应对一般需求应该没有 ...

  7. CRM帮助B2B企业持续改善战略决策「下篇」

    尽管数据早已深入人心,但依然有相当比率的B2B企业在管理和战略决策时依赖直觉而不是客户数据.不停变化的B2B市场表明了以客户为中心的趋向和格局,CRM客户管理系统能够协助您更好的使用客户数据并最大限度 ...

  8. ES6学习-5 解构赋值(2)对象的解构赋值

    啥也不说,先举个栗子: 1 let { myname, myage } = { myage: 18, myname: "郭郭" }; 2 console.log(myname) / ...

  9. MakeCode图形编程应用在micro:bit上的多工性能实测

    1. 简述 本文不涉及对测试中所用到的设备或软件的推广. micro:bit 是一款由英国广播电视公司(BBC)为青少年编程教育设计,并由微软,三星,ARM,英国兰卡斯特大学等合作伙伴共同完成开发的微 ...

  10. Linux 系统运行着许多子系统和应用程序。您可以使用系统日志记录从启动时就收集有关运行中系统的数据。有时

    概述 在本教程中,您将学习以下内容: 配置 syslog 守护程序 了解标准设施.优先级和操作 配置日志轮换 了解 rsyslog 和 syslog-ng 系统内部发生了什么 Linux 系统运行着许 ...