Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XPU] API align with new intel pytorch extension release #6395

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions op_builder/xpu/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def cxx_args(self):

def load(self):
try:
import intel_extension_for_pytorch.deepspeed
return intel_extension_for_pytorch.deepspeed.transformer_inference.transformer_inference
import intel_extension_for_pytorch
if hasattr(intel_extension_for_pytorch, "deepspeed"):
return intel_extension_for_pytorch.deepspeed.transformer_inference.transformer_inference
else:
return intel_extension_for_pytorch.xpu.deepspeed
except ImportError:
raise ImportError("Please install intel-extension-for-pytorch >= 2.1.30 to include DeepSpeed kernels.")
Loading