From 01ff8aa7d507993ca420d5c2bc4aea02cb266f2a Mon Sep 17 00:00:00 2001 From: nicolargo Date: Mon, 26 Dec 2016 09:39:42 +0100 Subject: [PATCH] Force float on GPU memory --- glances/plugins/glances_gpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glances/plugins/glances_gpu.py b/glances/plugins/glances_gpu.py index f8a26fea..68465b50 100644 --- a/glances/plugins/glances_gpu.py +++ b/glances/plugins/glances_gpu.py @@ -210,13 +210,13 @@ class Plugin(GlancesPlugin): try: return pynvml.nvmlDeviceGetName(device_handle) except pynvml.NVMlError: - return "NVIDIA GPU" + return "NVIDIA" def get_mem(self, device_handle): """Get GPU device memory consumption in percent""" try: memory_info = pynvml.nvmlDeviceGetMemoryInfo(device_handle) - return memory_info.used * 100 / memory_info.total + return memory_info.used * 100.0 / memory_info.total except pynvml.NVMLError: return None