IPEX enable empty_cache fix for WSL on PyTorch

This commit is contained in:
Disty0
2024-12-17 22:43:30 +03:00
parent 900cda298e
commit fc63de6958
+1 -1
View File
@@ -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