当前位置:网站首页>GPU, CUDA,cuDNN三者的关系总结
GPU, CUDA,cuDNN三者的关系总结
2022-04-23 11:16:00 【挽手等风起】
GPU, CUDA,cuDNN三者的关系总结
CPU 和 GPU
cpu和gpu结构展示
GPU(图像处理器,Graphics Processing Unit)和CPU(中央处理器,Central Processing Unit)在设计上的主要差异在于GPU有更多的运算单元(如图中绿色的ALU),而Control和Cache单元不如CPU多,这是因为GPU在进行并行计算的时候每个运算单元都是执行相同的程序,而不需要太多的控制。Cache单元是用来做数据缓存的,CPU可以通过Cache来减少存取主内存的次数,也就是减少内存延迟(memory latency)。GPU中Cache很小或者没有,因为GPU可以通过并行计算的方式来减少内存延迟。因此CPU的Cahce设计主要是实现低延迟,Control主要是通用性,复杂的逻辑控制单元可以保证CPU高效分发任务和指令。所以CPU擅长逻辑控制,是串行计算,而GPU擅长高强度计算,是并行计算。打个比方,GPU就像成千上万的苦力,每个人干的都是类似的苦力活,相互之间没有依赖,都是独立的,简单的人多力量大;CPU就像包工头,虽然也能干苦力的活,但是人少,所以一般负责任务分配,人员调度等工作。
可以看出GPU加速是通过大量线程并行实现的,因此对于不能高度并行化的工作而言,GPU就没什么效果了。而CPU则是串行操作,需要很强的通用性,主要起到统管和分配任务的作用。
CUDA
CUDA是NVIDIA推出的用于自家GPU的并行计算框架,也就是说CUDA只能在NVIDIA的GPU上运行,而且只有当要解决的计算问题是可以大量并行计算的时候才能发挥CUDA的作用。
cuDNN
cuDNN(CUDA Deep Neural Network library):是NVIDIA打造的针对深度神经网络的加速库,是一个用于深层神经网络的GPU加速库。如果你要用GPU训练模型,cuDNN不是必须的,但是一般会采用这个加速库。
总结
简单来说,CPU适合串行计算,擅长逻辑控制。GPU擅长并行高强度并行计算,适用于AI算法的训练学习
CUDA 是NVIDIA专门负责管理分配运算单元的框架
cuDNN是用于深层神经网络的gpu加速库
查询版本命令:
ubuntu:
cuda 版本
nvcc -V
cat /usr/local/cuda/version.txt
cudnn 版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
查看Nvidia GPU版本
nvidia-smi
//10s显示一次
watch -n 10 nvidia-smi
nvidia-smi -l
版权声明
本文为[挽手等风起]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_36697196/article/details/124329433
边栏推荐
- SVN的使用:
- Facing the global market, platefarm today logs in to four major global platforms such as Huobi
- Jupyter lab top ten high productivity plug-ins
- Understanding of fileprovider path configuration strategy
- Software testers, how to mention bugs?
- Detailed introduction to paging exploration of MySQL index optimization
- Visualized common drawing (II) line chart
- PlatoFarm推出正式版游戏经济模型的特点分析
- 采用百度飞桨EasyDL完成指定目标识别
- 使用 PHP PDO ODBC 示例的 Microsoft Access 数据库
猜你喜欢
学习 Go 语言 0x04:《Go 语言之旅》中切片的练习题代码
Using Baidu PaddlePaddle EasyDL to accomplish specified target recognition
MIT: label every pixel in the world with unsupervised! Humans: no more 800 hours for an hour of video
分享两个实用的shell脚本
After the MySQL router is reinstalled, it reconnects to the cluster for boot - a problem that has been configured in this host before
Visualization Road (11) detailed explanation of Matplotlib color
Mysql8. 0 installation guide
年度最尴尬的社死瞬间,是Siri给的
Visual common drawing (IV) histogram
一道有趣的阿里面试题
随机推荐
详解MySQL中timestamp和datetime时区问题导致做DTS遇到的坑
MBA-day5数学-应用题-工程问题
Introduction to neo4j authoritative guide, recommended by Qiu Bojun, Zhou Hongxiang, Hu Xiaofeng, Zhou Tao and other celebrities
妊娠箱和分娩箱的区别
Detailed explanation of integer data type tinyint in MySQL
Learn go language 0x07: stringer exercise code in go language journey
When the activity is in progress! Click the link to join the live studio to participate in "can AI really save energy?" Let's have a discussion!
Mysql8. 0 installation guide
redis优化系列(二)Redis主从原理、主从常用配置
mysql分表之后如何平滑上线详解
Learning website materials
Mysql排序的特性详情
比深度学习更值得信赖的模型ART
Detailed explanation of typora Grammar (I)
解决 『SunCertPathBuilderException:unable to find valid certification path to requested target』 问题
Visualization Road (10) detailed explanation of segmentation canvas function
升级cpolar内网穿透能获得的功能
Mysql database transaction example tutorial
Detailed explanation of MySQL creation stored procedure and function
MySQL sorting feature details