Description
BackendGPU.get_backend_info() in src/xpu_perf/micro_perf/backends/GPU/backend_gpu.py calls subprocess.run(['nvidia-smi', ...]) unconditionally. On AMD ROCm systems where nvidia-smi is not present, this raises an unhandled FileNotFoundError and crashes the benchmark before any workloads run.
Steps to Reproduce
- Run xpu-perf on a system with AMD GPUs using ROCm 7.2.2 (PyTorch with
torch.version.hip set)
- Launch any GPU benchmark:
python projects/micro_perf/launch.py --backend GPU --device 0
- Crash occurs in
get_backend_info():
FileNotFoundError: [Errno 2] No such file or directory: 'nvidia-smi'
Suggested Fix
Detect the platform and use rocm-smi on AMD ROCm systems to retrieve driver version information, rather than unconditionally calling nvidia-smi.
Description
BackendGPU.get_backend_info()insrc/xpu_perf/micro_perf/backends/GPU/backend_gpu.pycallssubprocess.run(['nvidia-smi', ...])unconditionally. On AMD ROCm systems wherenvidia-smiis not present, this raises an unhandledFileNotFoundErrorand crashes the benchmark before any workloads run.Steps to Reproduce
torch.version.hipset)python projects/micro_perf/launch.py --backend GPU --device 0get_backend_info():Suggested Fix
Detect the platform and use
rocm-smion AMD ROCm systems to retrieve driver version information, rather than unconditionally callingnvidia-smi.