当前位置:网站首页>Can GPU acceleration pytorch work?
Can GPU acceleration pytorch work?
2022-06-13 00:45:00 【Program type】
This article mainly introduces judgment pytorch Do you support GPU Accelerated operation , It has a good reference value , I hope that's helpful . If there is a mistake or not fully considered , Please grant me your advice . How to determine pytorch Do you support GPU Speed up ? What you care about , Here comes the answer .
gpu Speed up pytorch Can I use it ?
Add this code :
print torch.cuda.is_available()True
Judgment complete ! Talk about pytorch How to view gpu Information ~
Why transfer data to GPU It's called .cuda instead of .gpu, It's like transferring data to CPU The method called is .cpu? This is because GPU The programming interface of is CUDA, And not all of them right now GPU All support CUDA, Only a fraction of Nvidia Of GPU To support .
PyTorch The future may support AMD Of GPU, and AMD GPU The programming interface of is OpenCL, therefore PyTorch And it's reserved for .cl Method , For future support AMD Waiting GPU.
torch.cuda.is_available()cuda Is it available ;
torch.cuda.device_count()return gpu Number ;
torch.cuda.get_device_name(0)return gpu name , Device index defaults from 0 Start ;
torch.cuda.current_device()Returns the current device index ;

The above is personal experience , I hope I can give you a reference .
Share some of my artificial intelligence learning materials for free , Including some AI Common framework actual combat video 、 Image recognition 、OpenCV、NLQ、 machine learning 、 Computer vision 、 Videos such as deep learning and neural network 、 Courseware source code 、 Famous essence resources at home and abroad 、AI Hot papers 、 Industry reports, etc .
For better systematic learning AI, I recommend that you collect one .
Here are some screenshots , Free download method is attached at the end of the article .
One 、 Artificial intelligence courses and projects

Two 、 Famous essence resources at home and abroad

3、 ... and 、 Collection of papers on artificial intelligence

Four 、 AI Industry Report

Learn Artificial Intelligence well , Read more , Do more , practice , If you want to improve your level , We must learn to settle down and learn slowly and systematically , Only in the end can we gain something .
Click on the business card below , Scan the code and download the information for free .
边栏推荐
- Kotlin 协程,job的生命周期
- 6.824 Lab 4B: Sharded Key/Value Service
- Summary of openstack installation problems
- 市值破万亿,连续三个月销量破10万,比亚迪会成为最强国产品牌?
- Assembly language learning
- Win10 home vs pro vs enterprise vs enterprise LTSC
- How to solve the duplication problem when MySQL inserts data in batches?
- 天津银行周传凯:从 0 到 1,我的分布式数据库落地经验谈
- Target recognition gadget
- Delphi2009 connecting Oracle11g
猜你喜欢

Target recognition gadget

MySQL queries the quantity of each month and the year-on-year and month on month data of each month

磁盘分区方式对比(MBR与GPT)

Opencv face recognition of ros2 foxy~galactic~humble
![[sca-cnn interpretation] spatial and channel wise attention](/img/4b/bdcdab17d531481bf0222a96ace065.png)
[sca-cnn interpretation] spatial and channel wise attention

Maya modeling VI
![[error] invalid use of incomplete type uses an undefined type](/img/8a/7cb5d270cfd8831ddc146687fe4499.png)
[error] invalid use of incomplete type uses an undefined type

什么是 Meebits?一个简短的解释
![[network protocol] problems and solutions in the use of LwIP](/img/25/d064a761724936b8f35ee0c779e597.jpg)
[network protocol] problems and solutions in the use of LwIP

硬(磁)盘(一)
随机推荐
Some basic design knowledge
Ad14 component pin name disappeared
String类中split()方法的使用
三角波与三角波卷积
Arduino uses esp8266+ lighting technology + Xiaoai audio to realize voice control switch
[buglist] serial port programming does not read data
Installation of IK word breaker
Canvas random bubbling background
(01).NET MAUI实战 建项目
gpu加速pytorch能用吗?
AOF持久化
Kalix system - use of information collection gadgets
Arduino control soil moisture sensor
为什么磁盘分区的时候,第一个分区前面总有一段空间(63或者2048个扇区)
1. Google grpc framework source code analysis Hello World
Triangle wave and triangle wave convolution
Kali system -- dnsrecon for DNS collection and analysis
New blog address
ucore lab2
Basic operations of FreeMarker