/* ═══════════════════════════════════════════════════════════════ AMDMetricsCard — Live AMD MI300X Performance Metrics Displays real-time GPU stats streamed via SSE during scans ═══════════════════════════════════════════════════════════════ */ import './AMDMetricsCard.css'; export default function AMDMetricsCard({ amdMetrics, isComplete, scanDuration }) { if (!amdMetrics) { return (
AMD MI300X — Live Performance
Connecting to AMD GPU...
Powered by AMD ROCm + HBM3 Architecture
); } const { gpu_utilization_percent = 0, vram_used_gb = 0, vram_total_gb = 192, memory_bandwidth_tbs = 0, temperature_c = 0, power_draw_w = 0, tokens_per_sec = 0, } = amdMetrics; const vramPercent = vram_total_gb > 0 ? Math.round((vram_used_gb / vram_total_gb) * 100) : 0; const tempClass = temperature_c >= 75 ? 'temp-hot' : temperature_c >= 60 ? 'temp-warm' : ''; return (
{/* Header */}
AMD MI300X — Live Performance
{/* Completion message */} {isComplete && scanDuration && (
Scan completed in {scanDuration}s on AMD MI300X
)} {/* Stats Grid */}
{/* GPU Utilization */}
GPU Utilization {gpu_utilization_percent}%
{/* VRAM Used */}
VRAM Used {vram_used_gb} / {vram_total_gb} GB
{/* Memory Bandwidth */}
Memory Bandwidth {memory_bandwidth_tbs} TB/s
{/* Temperature */}
Temperature {temperature_c}°C
{/* Power Draw */}
Power Draw {power_draw_w}W
{/* Inference Speed */}
Inference Speed {tokens_per_sec} tok/s
{/* Footer */}
Powered by AMD ROCm + HBM3 Architecture
); }