fix(benchmark): Detect Intel Arc Graphics on Core Ultra processors

When running in Docker, the systeminformation library cannot see the
host's GPU hardware. This adds a fallback to detect Intel integrated
graphics from the CPU model name, similar to how we handle AMD APUs
with Radeon graphics.

Intel Core Ultra processors (Meteor Lake, Arrow Lake) include Intel
Arc Graphics integrated. This change detects "Core Ultra" in the CPU
brand and reports "Intel Arc Graphics (Integrated)" as the GPU model.

Note: This is for display purposes only - Ollama does not support
Intel integrated graphics for AI acceleration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Sherwood 2026-01-28 16:04:56 -08:00 committed by Jake Turner
parent b9ebc6c54e
commit f6db05bed2

View File

@ -269,14 +269,23 @@ export class BenchmarkService {
gpuModel = discreteGpu?.model || graphics.controllers[0]?.model || null
}
// Fallback: Extract integrated GPU from CPU model name (common for AMD APUs)
// e.g., "AMD Ryzen AI 9 HX 370 w/ Radeon 890M" -> "Radeon 890M"
// Fallback: Extract integrated GPU from CPU model name
if (!gpuModel) {
const cpuFullName = `${cpu.manufacturer} ${cpu.brand}`
// AMD APUs: e.g., "AMD Ryzen AI 9 HX 370 w/ Radeon 890M" -> "Radeon 890M"
const radeonMatch = cpuFullName.match(/w\/\s*(Radeon\s+\d+\w*)/i)
if (radeonMatch) {
gpuModel = radeonMatch[1]
}
// Intel Core Ultra: These have Intel Arc Graphics integrated
// e.g., "Intel Core Ultra 9 285HX" -> "Intel Arc Graphics (Integrated)"
if (!gpuModel && cpu.manufacturer?.toLowerCase().includes('intel')) {
if (cpu.brand?.toLowerCase().includes('core ultra')) {
gpuModel = 'Intel Arc Graphics (Integrated)'
}
}
}
return {