Menu Bar

Kata Mutiara

"Keberhasilan merupakan tetesan dari jeri-payah perjuangan, luka, pengorbanan dan hal-hal yang mengejutkan. Kegagalan merupakan tetesan dari kemalasan, kebekuan, kelemahan, kehinaan dan kerendahan"

ANIMASI TULISAN BERJALAN

Saturday, January 3, 2026

Apa itu GPU Architecture?

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)

CPUGPU
Sedikit core (4–32)Ribuan core kecil
Kuat di single-threadKuat di parallel
Kontrol kompleksThroughput tinggi
Latency rendahBandwidth tinggi

➡️ GPU cocok untuk operasi yang sama di banyak data (matrix, pixel, vector).


🏗️ Komponen Utama GPU Architecture

1️⃣ 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


2️⃣ 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


3️⃣ 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


4️⃣ 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)

5️⃣ Cache System

  • L1 Cache (dekat SM)

  • L2 Cache (shared antar SM)

  • Optimasi bandwidth memori


🔄 Execution Model (Cara GPU Bekerja)

  1. CPU kirim kernel ke GPU

  2. Kernel dipecah jadi:

    • Grid

    • Block

    • Thread

  3. 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

iklan

iklan