mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
IPEX enable empty_cache fix for WSL on PyTorch
This commit is contained in:
@@ -122,7 +122,7 @@ def ipex_init(): # pylint: disable=too-many-statements
|
||||
torch.cuda.traceback = torch.xpu.traceback
|
||||
|
||||
# Memory:
|
||||
if legacy and 'linux' in sys.platform and "WSL2" in os.popen("uname -a").read():
|
||||
if 'linux' in sys.platform and "WSL2" in os.popen("uname -a").read():
|
||||
torch.xpu.empty_cache = lambda: None
|
||||
torch.cuda.empty_cache = torch.xpu.empty_cache
|
||||
|
||||
|
||||
Reference in New Issue
Block a user