Disable IPEX attention if the GPU supports 64 bit

This commit is contained in:
Disty0
2023-12-05 19:40:16 +03:00
parent bce9a081db
commit 3d70137d31
4 changed files with 24 additions and 19 deletions

View File

@@ -165,12 +165,13 @@ def ipex_init(): # pylint: disable=too-many-statements
torch.cuda.get_device_id_list_per_card = torch.xpu.get_device_id_list_per_card
ipex_hijacks()
attention_init()
try:
from .diffusers import ipex_diffusers
ipex_diffusers()
except Exception: # pylint: disable=broad-exception-caught
pass
if not torch.xpu.has_fp64_dtype():
attention_init()
try:
from .diffusers import ipex_diffusers
ipex_diffusers()
except Exception: # pylint: disable=broad-exception-caught
pass
except Exception as e:
return False, e
return True, None