diff --git a/benchmarks/util.py b/benchmarks/util.py index 0e62511d5a39..1e1912042da3 100644 --- a/benchmarks/util.py +++ b/benchmarks/util.py @@ -143,7 +143,7 @@ def get_cpu_name(): def get_gpu_name(): gpu_names = subprocess.check_output( ["nvidia-smi", "--query-gpu=gpu_name", "--format=csv"], - encoding='utf-8').split("\n")[1:] + encoding='utf-8').split("\n")[1:-1] if len(gpu_names) == 1: return gpu_names[0] return "One of " + ", ".join(gpu_names)