Skip to content

fix(local-llm): detect Apple Metal GPUs in managed device auto-pick#26

Open
Bartok9 wants to merge 1 commit into
AtomicBot-ai:mainfrom
Bartok9:sera/metal-gpu-detect
Open

fix(local-llm): detect Apple Metal GPUs in managed device auto-pick#26
Bartok9 wants to merge 1 commit into
AtomicBot-ai:mainfrom
Bartok9:sera/metal-gpu-detect

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

On Apple Silicon, managed mode often printed auto → CPU (no GPU detected) even when Metal was available. parseListDevices only accepted canonical VulkanN: / CUDAN: rows and missed common Metal list-devices formats.

Fix

  • Parse Metal0: …, GPU 0: … (normalised to MetalN), and ggml-metal : device N = …
  • Treat Apple Silicon descriptions as preferred discrete-class devices in pickBestDevice
  • Tests for all three Metal shapes + auto-pick

Test plan

  • vitest run src/local-llm/gpu-devices.test.ts (18)
  • On macOS: atomic-agent models devices / models status should prefer Metal when the backend enumerates it

Agent-Owner: sera

parseListDevices only matched VulkanN/CUDAN canonical rows, so common
Metal list-devices formats (Metal0:, GPU 0:, ggml-metal device lines)
parsed as empty and auto mode fell back to "CPU (no GPU detected)" on
Apple Silicon. Normalise those forms to MetalN and treat Apple Silicon
as a preferred discrete-class device for pickBestDevice.

Agent-Owner: sera
Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant