当前位置:网站首页>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 .
边栏推荐
- Three kinds of thinking make me reborn
- Opencv face recognition of ros2 foxy~galactic~humble
- Build your own PE manually from winpe of ADK
- Ad14 component pin name disappeared
- 三栏简约typecho主题Lanstar/蓝星typecho主题
- 1115. alternate printing foobar
- Why is there always a space (63 or 2048 sectors) in front of the first partition when partitioning a disk
- Basic operations of FreeMarker
- 今日在家休息
- Another year 1024, happy programmer's Day!
猜你喜欢

Development notes of Mongoose

三角波与三角波卷积
![BUUCTF之BabySQL[极客大挑战 2019]](/img/6c/957e5e09f252210d0b4cf8771d4ade.png)
BUUCTF之BabySQL[极客大挑战 2019]

从ADK的WinPE自己手动构建自己的PE

Map from getting started to performance optimization

1. Google grpc framework source code analysis Hello World
![[sca-cnn interpretation] spatial and channel wise attention](/img/4b/bdcdab17d531481bf0222a96ace065.png)
[sca-cnn interpretation] spatial and channel wise attention

Kotlin 协程,job的生命周期

Successfully installed opencv under delphixe

Aunt learning code sequel: ability to sling a large number of programmers
随机推荐
Androi天气
[error] invalid use of incomplete type uses an undefined type
After so long use, CSDN has finally opened a blog
Daily buckle exercise - conclusion
天津银行周传凯:从 0 到 1,我的分布式数据库落地经验谈
Generate two-dimensional code in Delphi
Stack overflow learning summary
Kali system -- dnsmap for DNS collection and analysis
三栏简约typecho主题Lanstar/蓝星typecho主题
JPA execution failed in scheduled task -executing an update/delete query transactionrequiredexception
今日睡眠质量记录74分
Using fastjson to solve the problem of returning an empty array from a null value of a field string object
Maya modeling VI
杂记:intel11代和12代移动版支持原生Thunderbolt4接口,桌面版不支持
Target recognition gadget
Comparison of disk partition modes (MBR and GPT)
STM32 USB Basics
Set sail
Programming training 1
Paper reading and sharing