Snakepit.Hardware.MPSDetector (Snakepit v0.8.7)
View SourceApple Metal Performance Shaders (MPS) hardware detection.
Detects Apple Silicon GPU availability on macOS.
Summary
Types
@type mps_info() :: %{ available: boolean(), device_name: String.t(), memory_total_mb: non_neg_integer() }
Functions
@spec detect() :: mps_info() | nil
Detects MPS (Apple Metal) availability.
Returns nil on non-macOS platforms, or a map with:
:available- true if MPS is available:device_name- Name of the Metal device:memory_total_mb- GPU memory (shared memory on Apple Silicon)