Control sys.modules ipex duplicate check with BIGDL_CHECK_DUPLICATE_IMPORT (#11453)
* Control sys.modules ipex duplicate check with BIGDL_CHECK_DUPLICATE_IMPORT。
This commit is contained in:
parent
c6e5ad668d
commit
4e4ecd5095
1 changed files with 4 additions and 3 deletions
|
|
@ -124,6 +124,7 @@ class IPEXImporter:
|
|||
"""
|
||||
if self.is_xpu_version_installed():
|
||||
# Check if user import ipex manually
|
||||
if BIGDL_CHECK_DUPLICATE_IMPORT:
|
||||
if 'ipex' in sys.modules or 'intel_extension_for_pytorch' in sys.modules:
|
||||
log4Error.invalidInputError(False,
|
||||
ipex_duplicate_import_error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue