Apa itu GPU Architecture?
GPU (Graphics Processing Unit) adalah prosesor yang dirancang untuk parallel processing — menjalankan ribuan operasi kecil secara bersamaan.
Awalnya untuk grafis, sekarang dipakai luas untuk AI, ML, data science, game, dan komputasi berat.
CPU vs GPU (Gambaran Singkat)
| CPU | GPU |
|---|---|
| Sedikit core (4–32) | Ribuan core kecil |
| Kuat di single-thread | Kuat di parallel |
| Kontrol kompleks | Throughput tinggi |
| Latency rendah | Bandwidth tinggi |
GPU cocok untuk operasi yang sama di banyak data (matrix, pixel, vector).
Komponen Utama GPU Architecture
Streaming Multiprocessor (SM) / Compute Unit (CU)
Unit utama GPU
Berisi banyak core kecil (ALU)
NVIDIA → SM
AMD → CU
Satu GPU bisa punya puluhan hingga ratusan SM
GPU Cores (CUDA Core / Stream Processor)
Core sederhana
Fokus pada operasi aritmatika (add, multiply)
Tidak sekompleks core CPU
Contoh: RTX GPU bisa punya 10.000+ CUDA cores
Warp / Wavefront (Execution Model)
GPU mengeksekusi thread berkelompok
NVIDIA: Warp = 32 threads
AMD: Wavefront = 64 threads
Semua thread dalam warp menjalankan instruksi yang sama
Branch divergence (if-else berbeda) → performa turun
Memory Hierarchy GPU
Global Memory (VRAM)
Paling besar
Paling lambat
Bisa diakses semua thread
Shared Memory
Sangat cepat
Dibagi dalam satu SM
Cocok untuk data yang sering dipakai ulang
Registers
Paling cepat
Private untuk tiap thread
Jumlah terbatas
Register → Shared → L2 Cache → Global (VRAM)
Cache System
L1 Cache (dekat SM)
L2 Cache (shared antar SM)
Optimasi bandwidth memori
Execution Model (Cara GPU Bekerja)
CPU kirim kernel ke GPU
Kernel dipecah jadi:
Grid
Block
Thread
GPU menjalankan ribuan thread paralel
Grid
└── Block
└── Thread
GPU Programming Models
Beberapa cara memprogram GPU:
CUDA (NVIDIA)
OpenCL (Cross-platform)
Vulkan Compute
Metal (Apple)
DirectCompute (Windows)
GPU untuk AI & ML
GPU sangat cocok untuk:
Matrix multiplication
Tensor operations
Neural network training
Fitur khusus:
Tensor Cores (NVIDIA)
Matrix Cores (AMD)
Mixed precision (FP16, BF16)
Tantangan GPU Architecture
Memory bottleneck
Branch divergence
Debugging sulit
Power consumption tinggi
Ringkasan Singkat
GPU = parallel monster
Banyak core kecil
Eksekusi berbasis warp
Memory hierarchy sangat penting
Ideal untuk AI, grafis, scientific computing

No comments:
Post a Comment