当前位置:网站首页>CUDA basic knowledge
CUDA basic knowledge
2022-07-04 03:29:00 【ngsford】
GPU The problem that computation suits to solve is simple logic , Calculations are independent and parallel , and CPU The suitable problem to solve is , Complex logic , The problem of interdependency between calculations .
GPU Our design idea is high concurrent throughput , and CPU The design idea of is low delay . So we can see , stay CPU It has multi-level cache and powerful control unit , The purpose of introducing multi-level cache is to reduce latency , and GPU in , It has a large number of computing single clouds , The control unit is relatively simple , The number of caches is also relatively small .
1. Memory model
Hardware side :
SP: Thread processor , Have your own registers( register ) And local memory( Local memory ).registers and local memory Only by SP Visit by yourself .
SM: Multicore processor , By multiple SP as well as shared memory( Shared memory ) form .shared memory Can be SM All in SP visit .
GPU: The graphics card , By multiple SM as well as global memory( Global memory ) form .global memory Can be used by all SP visit .
Software side :
thread: Threads , Corresponding SP.
block: Thread block , By multiple tread form , Corresponding SM.
grid: By multiple block form , One GPU You can have multiple grid.
warp: Thread bundles , from 32 individual tread form . generally ,block yes 32 Multiple .
The index of the thread :
For this concept , It is actually calculating the index of the current thread in the defined computing unit , Index starts from zero . The key to understanding this calculation is to introduce spatial imagination , One dimension is a line , Two dimensions are faces , Three dimensional is three-dimensional .
dim3 grid1(2, 1, 1); // x=2, y=1, z=1, It's one-dimensional ,yz by 1
dim3 grid2(4, 2, 1); // x=4, y=2, z=1, It's two-dimensional ,z by 1
dim3 grid3(2, 3, 4); // x=2, y=3, z=4, This is three-dimensional ,xyz Are not as 1边栏推荐
- Which product is better if you want to go abroad to insure Xinguan?
- PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
- Rhcsa day 3
- Johnson–Lindenstrauss Lemma
- Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
- Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
- Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]
- Remote work guide
- 96% of the collected traffic is prevented by bubble mart of cloud hosting
- Redis transaction
猜你喜欢

Recursive structure

Record a problem that soft deletion fails due to warehouse level error

Add IDM to Google browser

National standard gb28181 protocol platform easygbs fails to start after replacing MySQL database. How to deal with it?

VRRP+BFD

Pagoda SSL can't be accessed? 443 port occupied? resolvent

1day vulnerability pushback skills practice (3)

Have you entered the workplace since the first 00???

If you have just joined a new company, don't be fired because of your mistakes

Management and thesis of job management system based on SSM
随机推荐
Want to do something in production? Then try these redis commands
Formulaire day05
VRRP+BFD
查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
WordPress collection WordPress hang up collection plug-in
MySQL data query optimization -- data structure of index
Johnson–Lindenstrauss Lemma
2022 registration examination for safety production management personnel of fireworks and firecracker production units and examination skills for safety production management personnel of fireworks an
PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
What is cloud primordial?
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
Teach you how to optimize SQL
Résumé des outils communs et des points techniques de l'examen PMP
Have you entered the workplace since the first 00???
Unspeakable Prometheus monitoring practice
How about the ratings of 2022 Spring Festival Gala in all provinces? Map analysis helps you show clearly!
Imperial cms7.5 imitation "D9 download station" software application download website source code
Add IDM to Google browser
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog