mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-09 20:28:07 +00:00
Update utils.py (#82)
get_gpu_memory should return after the loop is over
This commit is contained in:
commit
528c0e78f6
@ -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