gpu-probe 0.1.0

Cross-platform GPU memory (VRAM) detection with no vendor SDKs — uses NVML, Linux DRM sysfs (AMD/Intel), and macOS system_profiler/sysctl.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// SPDX-License-Identifier: Apache-2.0
//! Print every GPU detected on this host: `cargo run --example detect`.

fn main() {
    let gpus = gpu_probe::detect();
    if gpus.is_empty() {
        println!("No GPUs detected.");
        return;
    }
    for (index, gpu) in gpus.iter().enumerate() {
        println!("GPU {index}: {gpu}");
    }
}