Professional Documents
Culture Documents
Lecture 29 GPU Architecture Example
Lecture 29 GPU Architecture Example
Differences:
No scalar processor, scalar integration
Uses multithreading to hide memory latency
Has many functional units, as opposed to a few deeply
pipelined units like a vector processor
CKV
Example
Multiply two vectors of length 8192
Code that works over all elements is the grid
SIMD
Thread Thread 1
Block 0 A[63]=B[63] * C[63]
SIMD
Thread
Grid 15
A[511]=B[511] * C[511]
Thread
Block 15
SIMD
Thread
15
A[8191]=B[8191] * C[8191]
CKV
Fermi GTX 480 Thread Block assigned to
Multithreaded SIMD Processor
Thread Scheduler
SM
CKV
Terminology
Threads of SIMD instructions
Each has its own PC
Thread scheduler uses scoreboard to dispatch
No data dependencies between threads!
Keeps track of up to 48 threads of SIMD instructions
Hides Memory Latency
SIMD Thread
Each instruction works on 32 elements
Keep Track of 48
Lanes
independent threads
CUDA Thread
MIMD
SIMD
ILP
SM
CKV
Programming the GPU