Update utils.py

get_gpu_memory should return after the loop is over
This commit is contained in:
halfss 2023-05-23 14:24:00 +08:00 committed by GitHub
parent e847a3fc7a
commit a1b4c92f6b

View File

@ -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