Skip to main content

detect_gpu

Function detect_gpu 

Source
pub fn detect_gpu() -> GPUInfo
Expand description

Detect AMD GPUs using the three-tier fallback chain (rocminfo → lspci → sysfs).

Returns a GPUInfo with detected GPU details. If no AMD GPU is found, returns a default GPUInfo with gpu_count = 0.

§Hardware Test

On systems with real AMD GPUs, run with cargo test -- --ignored to execute hardware-dependent tests.