🔩 AI Hardware — Deep Dive: NPU, TPU, GPU, ASIC, In-Memory Computing, AI Accelerator Architecture

Panduan komprehensif hardware khusus AI — dari GPU general-purpose sampai ASIC dedicated. Mencakup NPU (Neural Processing Unit) di mobile SoC (Apple Neural Engine, Qualcomm Hexagon, Samsung NPU, MediaTek APU), TPU (Tensor Processing Unit) Google untuk training & inference, GPU sebagai AI accelerator (NVIDIA H100/B200, AMD MI300X), ASIC custom (Cerebras Wafer-Scale, Groq, SambaNova, Tenstorrent), in-memory computing (memristor, ReRAM, PIM), dan metrik perbandingan (TOPS, TFLOPS, TOPS/W, latency, throughput). Vault udah punya gpu-programming-parallel-compute (CUDA/ROCm programming) dan embedded-systems (IoT hardware) — catatan ini melengkapi dari sisi AI accelerator silicon.

Posisi di Vault

Nota ini terkait dengan gpu-programming-parallel-compute (GPU arsitektur & programming — GPU adalah AI accelerator paling umum), production-model-serving-optimization (inference optimization di berbagai hardware), edge-computing-iot-security-architecture (NPU di edge device), computer-vision-deepdive (computer vision di embedded NPU), embedded-systems (SoC architecture), dan platform-technologies-overview (teknologi platform berkinerja tinggi).


Daftar Isi


Taxonomy AI Accelerator

                    AI Accelerator
                          │
        ┌─────────────────┼─────────────────┐
        │                 │                 │
      GPU              NPU              ASIC
  (NVIDIA, AMD)   (Apple, Qualcomm)  (Google, Cerebras)
        │                 │                 │
   ┌────┴────┐      ┌─────┴────┐      ┌─────┴────┐
Training  Inference  Mobile     Edge   Training  Inference
(H100)    (T4/L4)    (ANE)     (NPU)   (TPUv5)   (Edge TPU)

Perbedaan Fundamental

AspekGPUNPUTPUASIC Custom
TujuanGeneral-purpose parallel computeAI inference di mobile/edgeAI training & inference (Google)AI-specific (satu arsitektur)
FlexibilityTinggi (CUDA, ROCm, any workload)Rendah (fixed function AI ops)Sedang (XLA-compiled models)Sangat rendah (model-specific)
ProgrammingCUDA, ROCm, PyTorch, TFVendor SDK (CoreML, QNN)XLA (JAX, TF)Custom SDK
Power300-700W0.5-15W200-450W15-15000W (wafer-scale)
Best ForDatacenter trainingOn-device inferenceGoogle-scale trainingNiche high-performance

GPU untuk AI

Generasi GPU AI

GPUArsitekturFP32 TFLOPSFP16 TFLOPSINT8 TOPSMemoryHarga
NVIDIA H100 SXMHopper671,979 (sparse)3,95880GB HBM3~$30K
NVIDIA B200Blackwell904,500 (sparse)9,000192GB HBM3e~$50K
NVIDIA A100Ampere19.5312 (sparse)62480GB HBM2e~$15K
AMD MI300XCDNA3811,3072,614192GB HBM3~$15K
NVIDIA RTX 4090Ada Lovelace8216533024GB GDDR6X~$1.6K
NVIDIA RTX 6000 AdaAda Lovelace9118236448GB GDDR6~$6.8K

GPU untuk Training vs Inference

AspekTraining GPUInference GPU
PrioritasThroughput (TFLOPS)Latency (ms)
MemoryBesar (80GB+)Medium (16-48GB)
PrecisionFP16/BF16/FP8INT8/FP8/FP4
Batch SizeBesar (256-4096)Kecil (1-32)
ContohH100, A100, MI300XL4, T4, RTX 4090
KuantitasBeberapa (4-256)Banyak (100+)

TPU — Tensor Processing Unit (Google)

Generasi TPU

GenerasiTahunComputeMemoryInterconnectUse Case
TPUv1201592 TOPS (INT8)8MB SRAMInference only
TPUv2201745 TFLOPS (BF16)16GB HBM2D torusTraining + inference
TPUv32018123 TFLOPS (BF16)32GB HBM2D torus 2xTraining
TPUv42021275 TFLOPS (BF16)~48GB HBMSparseOCSTraining (Poda)
TPUv5e2023196 TFLOPS (BF16)~64GB HBMCost-efficient
TPUv5p2023459 TFLOPS (BF16)~96GB HBM2D torusTraining flagship
Edge TPU20194 TOPS (INT8)8MB SRAMUSB/PCIeEdge inference

Arsitektur TPU

MXU (Matrix Multiply Unit) — systolic array 128x128
  → Satu instruksi = satu matmul 128x128
  → Didesain untuk matmul-dominated workload (Transformer)

HBM Memory — ~900 GB/s bandwidth (TPUv3)
  → Cukup untuk men-stream weight + activation

Interconnect — 2D Torus (TPUv2+)
  → All-reduce gradient tanpa bottleneck network

Kenapa TPU Cepat untuk ML?

  1. Systolic array — compute matmul tanpa fetch instruksi tiap siklus
  2. BF16 native — tanpa konversi FP32→FP16 overhead
  3. 2D torus interconnect — all-reduce secepat intra-chip bandwidth
  4. XLA compiler — optimasi graph level TPU

NPU — Neural Processing Unit (Mobile/Edge)

NPU di Mobile

SoCNPUTOPSProcessFitur AI
Apple A18 ProNeural Engine 18-core~38 TOPS3nmOn-device LLM, image processing
Apple M4Neural Engine 18-core~38 TOPS3nmMac AI, local model
Qualcomm Snapdragon 8 Gen 3Hexagon NPU~45 TOPS4nmOn-device gen AI
Samsung Exynos 2400NPU~12 TOPS4nmGalaxy AI features
MediaTek Dimensity 9300APU 790~33 TOPS4nmEdge LLM
Google Tensor G4TPU (Edge)~10 TOPS4nmPixel AI features

NPU vs GPU di Mobile

AspekNPUGPU (Mobile)
Power EfficiencySangat tinggi (0.5-3W)Sedang (3-10W)
ThroughputTinggi untuk fixed opsTinggi tapi boros
FlexibilityFixed function (conv, matmul, activation)Programmable (any compute)
Use CaseAlways-on AI (camera, voice, translate)Gaming, rendering, compute
ProgrammingCoreML, QNN, TFLite DelegateMetal/Vulkan, OpenCL

Edge NPU (Standalone)

ChipTOPSPowerInterfaceUse Case
Google Edge TPU (Coral)42WUSB/PCIeVision, ML inference
Intel Movidius11WUSBVision inference
Hailo-8262.5WM.2/PCIeEdge real-time AI
NVIDIA Jetson Orin NX70 (GPU+DLAs)15-25WModuleEdge autonomous
Rockchip NPU (RK3588)6<5WSoC integratedEmbedded AI

ASIC Custom — Cerebras, Groq, SambaNova

Cerebras Wafer-Scale Engine (WSE-3)

SpesifikasiValue
Transistors4 trillion
Cores900,000
On-chip SRAM44 GB
Fabric Bandwidth214 Petabits/s
Process5nm
Power~15,000W

Keunggulan: Eliminasi komunikasi inter-chip. Satu wafer = satu chip. Training model besar tanpa pipeline/tensor parallelism.

Groq LPU (Language Processing Unit)

SpesifikasiValue
ArchitectureTensor Streaming Processor
MemorySRAM-only (230MB/chip) — no HBM
Latency< 1ms per token (LLM inference)
Throughput~500 tok/s per chip (Llama 2 70B)
Best ForInference latency-critical

Keunggulan: Arsitektur deterministic — tidak ada cache miss, tidak ada memory bottleneck. Predictable latency.

SambaNova SN40L

SpesifikasiValue
ArchitectureReconfigurable Dataflow Unit (RDU)
Memory64MB on-chip SRAM + 64GB HBM
PrecisionCustom mixed-precision
Best ForTraining + inference (model-specific optimization)

In-Memory Computing

Von Neumann Bottleneck

Memory (HBM/DRAM) ↔️ Compute (ALU) — bus terbatas (1-2 TB/s)
CPU/GPU idle saat nunggu data dari memory

In-Memory Architecture

Compute terjadi di memory cell — tanpa data movement

Teknologi

TeknologiStatusKecepatan vs HBMDensityMaturity
ReRAM (Resistive RAM)Prototipe10-100x4xLow — masih lab
PIM (Processing-in-Memory)Samsung HBM-PIM2xSamaMedium — Samsung product
CXL Memory PoolingProduction1-2xN/AHigh — datacenter
Near-Memory ComputeProduction (H100)1.5xN/AHigh — GPU + HBM

PIM (Processing-in-Memory) Samsung

  • Menambahkan ALU di dekat bank memory HBM
  • Eliminasi data movement antara HBM dan compute die
  • ~2x performance boost untuk bandwidth-bound workload
  • Kompatibel dengan existing GPU (driver update)

Metrik Perbandingan

MetrikArtiPenting Untuk
TFLOPSFloating-point operations per secondTraining (FP16/BF16)
TOPSInteger operations per secondInference (INT8)
Memory BandwidthGB/s — data movement speedMemory-bound workload
Memory CapacityGB — max model sizeModel fit check
InterconnectChip-to-chip bandwidth (NVLink, CXL)Distributed training
TOPS/WPerformance per wattEdge, mobile, cost
Latency p50/p99Time per inferenceProduction serving
Thermal Design PowerHeat dissipationCooling cost, form factor

Rule of Thumb

TaskMinimumRecommendedOptimal
LLM Training (7B)4x A100 80GB8x A100 80GB64x H100
LLM Training (70B)16x H10064x H100256x H100+
LLM Inference (7B)1x RTX 40901x L40S4x L40S (redundancy)
LLM Inference (70B)1x H100 (INT8)2x H100 (FP8)8x H100 (FP16)
Vision (CNN)1x RTX 30601x RTX 40904x A100
Mobile InferenceNPU 10+ TOPSNPU 20+ TOPSNPU 40+ TOPS

Koneksi ke Vault