Merge branch 'master' into dev
This commit is contained in:
commit
4e9de7df41
|
|
@ -1,5 +1,4 @@
|
||||||
import torch.cuda
|
import torch
|
||||||
import torch.backends
|
|
||||||
|
|
||||||
def torch_gc(DEVICE):
|
def torch_gc(DEVICE):
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
|
|
@ -8,7 +7,6 @@ def torch_gc(DEVICE):
|
||||||
torch.cuda.ipc_collect()
|
torch.cuda.ipc_collect()
|
||||||
elif torch.backends.mps.is_available():
|
elif torch.backends.mps.is_available():
|
||||||
try:
|
try:
|
||||||
import torch.mps
|
|
||||||
torch.mps.empty_cache()
|
torch.mps.empty_cache()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue