Skip to content

Commit

Permalink
revert ipex import (#1803)
Browse files Browse the repository at this point in the history
Signed-off-by: yiliu30 <[email protected]>
  • Loading branch information
yiliu30 authored May 17, 2024
1 parent 4f893ca commit ca9f8eb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions neural_compressor/torch/utils/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ def is_hpex_available():
return _hpex_available


def is_ipex_available():
try:
import intel_extension_for_pytorch as ipex
try:
import intel_extension_for_pytorch as ipex

_ipex_available = True
except:
_ipex_available = False


_ipex_available = True
except:
_ipex_available = False
def is_ipex_available():
return _ipex_available


def get_ipex_version():
if is_ipex_available():
import intel_extension_for_pytorch as ipex

try:
ipex_version = ipex.__version__.split("+")[0]
except ValueError as e: # pragma: no cover
Expand Down

0 comments on commit ca9f8eb

Please sign in to comment.