From cb6bdece39751eaef975287609b8bab603f116e5 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 18 Mar 2021 10:07:20 +0200 Subject: [PATCH] Fix cuda version from driver does not return minor version --- clearml_agent/helper/gpu/gpustat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clearml_agent/helper/gpu/gpustat.py b/clearml_agent/helper/gpu/gpustat.py index b55f20b..12017f4 100644 --- a/clearml_agent/helper/gpu/gpustat.py +++ b/clearml_agent/helper/gpu/gpustat.py @@ -421,4 +421,8 @@ def get_driver_cuda_version(): except BaseException: return None + # for some reason we get CUDA version 11020 instead of 11200, so this is the fix + if cuda_version and len(cuda_version) >= 4 and cuda_version[2] == '0' and cuda_version[3] != '0': + return cuda_version[:2]+cuda_version[3] + return cuda_version[:3] if cuda_version else None