From a1b4c92f6bdeb5e5939c5bbed8b6103ec4e397eb Mon Sep 17 00:00:00 2001 From: halfss Date: Tue, 23 May 2023 14:24:00 +0800 Subject: [PATCH] Update utils.py get_gpu_memory should return after the loop is over --- pilot/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilot/utils.py b/pilot/utils.py index 0179d12c2..607b83251 100644 --- a/pilot/utils.py +++ b/pilot/utils.py @@ -33,7 +33,7 @@ def get_gpu_memory(max_gpus=None): allocated_memory = torch.cuda.memory_allocated() / (1024 ** 3) available_memory = total_memory - allocated_memory gpu_memory.append(available_memory) - return gpu_memory + return gpu_memory