mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-17 09:08:11 +08:00
tiny fix
Former-commit-id: 267703f1db20e5b39c2e80a37e028d908af7ffb1
This commit is contained in:
parent
025670b4f6
commit
fc6091e118
@ -29,7 +29,7 @@ from utils import (
|
||||
|
||||
|
||||
def torch_gc():
|
||||
if not torch.cuda.is_available():
|
||||
if torch.cuda.is_available():
|
||||
num_gpus = torch.cuda.device_count()
|
||||
for device_id in range(num_gpus):
|
||||
with torch.cuda.device(device_id):
|
||||
|
Loading…
x
Reference in New Issue
Block a user