Call ipex hijacks in model management

This commit is contained in:
Kel Phillipson 2024-08-16 11:53:49 -07:00
parent 3586895584
commit 8da165ec22

View File

@ -77,6 +77,10 @@ try:
except: except:
xpu_available = xpu_available or (hasattr(torch, "xpu") and torch.xpu.is_available()) xpu_available = xpu_available or (hasattr(torch, "xpu") and torch.xpu.is_available())
if xpu_available:
from ipex_hijacks import hijacks
hijacks.ipex_hijacks()
try: try:
if torch.backends.mps.is_available(): if torch.backends.mps.is_available():
cpu_state = CPUState.MPS cpu_state = CPUState.MPS