Commit 178426b
committed
[AI generated] Add multi-GPU support and fix crash without sudo
- Refactor Intel namespace to support multiple GPUs via GpuInstance struct
- Add discover_intel_gpus() to find all Intel GPUs via sysfs vendor ID
- Refactor Xe namespace with per-GPU state (states vector, gpu_index params)
- Update Intel::init/shutdown/collect to iterate over gpu_instances
- Add has_pmu_permissions() to prevent crash from assert in i915 PMU code
- Add empty gpus vector early-return defense in Gpu::collect()
- Fix division by zero guards and typo (mem_total -> pwr_total)
- Initialize gpu-vram-totals and gpu-pwr-totals in Xe first_sample block
Fixes: Multi-GPU not detected (Issue #1407)
Fixes: Crash without sudo (Aborted core dumped)1 parent aa746ef commit 178426b
1 file changed
+279
-167
lines changed
0 commit comments