Skip to content

Commit

Permalink
Move IPEX import earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
notsyncing committed Feb 6, 2024
1 parent 2ed67e0 commit 4f8c2cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions xinference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
__version__ = _version.get_versions()["version"]


try:
import intel_extension_for_pytorch # noqa: F401
except:
pass


def _install():
from xoscar.backends.router import Router

Expand Down
5 changes: 0 additions & 5 deletions xinference/device_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
import torch
from typing_extensions import Literal, Union

try:
import intel_extension_for_pytorch # noqa: F401
except:
pass


DeviceType = Literal["cuda", "mps", "xpu", "cpu"]

Expand Down

0 comments on commit 4f8c2cb

Please sign in to comment.