Skip to content

Commit f68e894

Browse files
lukemarsdenclaude
andcommitted
Make frontend GPU displays vendor-neutral (AMD compatible)
Updated 3 components to display AMD GPU information correctly: 1. AgentSandboxes.tsx: - 'NVIDIA GPU' → 'GPU' (fallback text) - 'nvidia-smi:' → 'GPU query:' (query timing label) 2. RunnerSummary.tsx: - GPU name parsing: Strip NVIDIA/AMD/Intel/Radeon prefixes - Tooltip: 'CUDA:' → 'SDK:' (shows 'CUDA 12.9' or 'ROCm 6.4') - cuda_version → sdk_version field 3. FloatingRunnerState.tsx: - GPU name parsing: Strip NVIDIA/AMD/Intel/Radeon prefixes - Tooltip: 'CUDA:' → 'SDK:' (vendor-neutral) - cuda_version → sdk_version field Now displays correctly for: - NVIDIA GPUs: "H100 • Driver: 550.54.15 • SDK: CUDA 12.4" - AMD GPUs: "RX 7900 XTX • Driver: 6.4.4 • SDK: ROCm 6.4" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent dca4d8b commit f68e894

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

frontend/src/components/admin/AgentSandboxes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ const AgentSandboxes: FC = () => {
567567
title="GPU Encoder Stats"
568568
subheader={
569569
<>
570-
{data.gpu_stats.gpu_name || 'NVIDIA GPU'}
570+
{data.gpu_stats.gpu_name || 'GPU'}
571571
{data.gstreamer_pipelines && (
572572
<>
573573
{' • '}
@@ -579,7 +579,7 @@ const AgentSandboxes: FC = () => {
579579
{data.gpu_stats.query_duration_ms > 0 && (
580580
<>
581581
{' • '}
582-
nvidia-smi: {data.gpu_stats.query_duration_ms}ms (cached 2s)
582+
GPU query: {data.gpu_stats.query_duration_ms}ms (cached 2s)
583583
</>
584584
)}
585585
</>

frontend/src/components/admin/FloatingRunnerState.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,12 @@ const FloatingRunnerState: FC<FloatingRunnerStateProps> = ({ onClose }) => {
206206
const getSimpleModelName = (fullName: string) => {
207207
if (!fullName || fullName === "unknown") return "Unknown";
208208

209-
// Extract key parts: NVIDIA H100, RTX 4090, etc.
209+
// Extract key parts: H100, RTX 4090, RX 7900 XTX, etc. (vendor-neutral)
210210
const name = fullName
211-
.replace(/^NVIDIA\s+/, "")
212-
.replace(/\s+PCIe.*$/, "")
213-
.replace(/\s+SXM.*$/, "");
211+
.replace(/^(NVIDIA|AMD|Intel)\s+/, "") // Remove vendor prefix
212+
.replace(/^Radeon\s+/, "") // Remove "Radeon" prefix for AMD
213+
.replace(/\s+PCIe.*$/, "") // Remove PCIe details
214+
.replace(/\s+SXM.*$/, ""); // Remove SXM details
214215
return name.length > 12 ? name.substring(0, 12) + "..." : name;
215216
};
216217

@@ -246,7 +247,7 @@ const FloatingRunnerState: FC<FloatingRunnerStateProps> = ({ onClose }) => {
246247
GPU {gpu.index}
247248
</Typography>
248249
<Tooltip
249-
title={`${gpu.model_name || "Unknown GPU"} • Driver: ${gpu.driver_version || "unknown"}CUDA: ${gpu.cuda_version || "unknown"}`}
250+
title={`${gpu.model_name || "Unknown GPU"} • Driver: ${gpu.driver_version || "unknown"}SDK: ${gpu.sdk_version || "unknown"}`}
250251
>
251252
<Typography
252253
variant="caption"

frontend/src/components/session/RunnerSummary.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,17 @@ const GPUCard: FC<{
218218
</Box>
219219
) : null;
220220

221-
// Simplify GPU model name for display
221+
// Simplify GPU model name for display (vendor-neutral)
222222
const getSimpleModelName = (fullName: string) => {
223223
if (!fullName || fullName === "unknown") return "Unknown GPU";
224224

225-
// Extract key parts: NVIDIA H100, RTX 4090, etc.
225+
// Extract key parts: H100, RTX 4090, RX 7900 XTX, etc.
226+
// Remove vendor prefix and connection type suffixes
226227
const name = fullName
227-
.replace(/^NVIDIA\s+/, "")
228-
.replace(/\s+PCIe.*$/, "")
229-
.replace(/\s+SXM.*$/, "");
228+
.replace(/^(NVIDIA|AMD|Intel)\s+/, "") // Remove vendor prefix
229+
.replace(/\s+PCIe.*$/, "") // Remove PCIe details
230+
.replace(/\s+SXM.*$/, "") // Remove SXM details
231+
.replace(/^Radeon\s+/, ""); // Remove "Radeon" prefix for AMD
230232
return name;
231233
};
232234

@@ -261,7 +263,7 @@ const GPUCard: FC<{
261263
GPU {gpu.index}
262264
</Typography>
263265
<Tooltip
264-
title={`${gpu.model_name || "Unknown GPU"} • Driver: ${gpu.driver_version || "unknown"}CUDA: ${gpu.cuda_version || "unknown"}`}
266+
title={`${gpu.model_name || "Unknown GPU"} • Driver: ${gpu.driver_version || "unknown"}SDK: ${gpu.sdk_version || "unknown"}`}
265267
>
266268
<Typography
267269
variant="caption"

0 commit comments

Comments
 (0)