Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardozcm committed Oct 29, 2024
1 parent 466c4e2 commit 6173db9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/llm/src/ipex_llm/transformers/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from typing import List
from transformers.dynamic_module_utils import get_imports
from transformers.utils import is_torch_sdpa_available
from ipex_llm.utils.ipex_importer import IPEXImporter


def patch_flash_attn_import(filename: str) -> List[str]:
Expand All @@ -29,8 +30,7 @@ def patch_flash_attn_import(filename: str) -> List[str]:


def patch_sdpa_available() -> bool:
import torch
if "cxx" in torch.__version__:
if IPEXImporter.is_xpu_version_installed():
return False
else:
return is_torch_sdpa_available()

0 comments on commit 6173db9

Please sign in to comment.