This commit is contained in:
Qing
2023-12-16 13:34:56 +08:00
parent cbe6577890
commit 24e95daac1
16 changed files with 381 additions and 323 deletions

View File

@@ -1,3 +1,4 @@
import gc
import math
import random
from typing import Any
@@ -913,6 +914,7 @@ def torch_gc():
if torch.cuda.is_available():
torch.cuda.empty_cache()
torch.cuda.ipc_collect()
gc.collect()
def set_seed(seed: int):