mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-10 20:52:33 +00:00
Update utils.py
get_gpu_memory should return after the loop is over
This commit is contained in:
parent
e847a3fc7a
commit
a1b4c92f6b
@ -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
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user