From f0f9d45eac6e4001d49f05c73fb8725ee1b2e387 Mon Sep 17 00:00:00 2001 From: Qiyuan Gong Date: Thu, 28 Dec 2023 15:23:58 +0800 Subject: [PATCH] [LLM] IPEX import support bigdl-core-xe-21 (#9769) Add support for bigdl-core-xe-21. --- python/llm/src/bigdl/llm/utils/ipex_importer.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python/llm/src/bigdl/llm/utils/ipex_importer.py b/python/llm/src/bigdl/llm/utils/ipex_importer.py index aae33188..bf5f6ff0 100644 --- a/python/llm/src/bigdl/llm/utils/ipex_importer.py +++ b/python/llm/src/bigdl/llm/utils/ipex_importer.py @@ -35,10 +35,19 @@ class IPEXImporter: """ # Check if xpu version installed try: + # Check if bigdl-core-xe is installed distribution('bigdl-core-xe') return True except PackageNotFoundError: - return False + # bigdl-core-xe not found + # Check if bigdl-core-xe-21 is installed + try: + distribution('bigdl-core-xe-21') + return True + except PackageNotFoundError: + # bigdl-core-xe not found + return False + return False def import_ipex(self): """