-
Notifications
You must be signed in to change notification settings - Fork 39
support xpu in tuning and inference #481
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
Conversation
|
||
# Find the backend and determine the device type from BackendInfos | ||
backend = self.find_backend(target_backend) | ||
if backend is None: | ||
raise ValueError("Backend not found, please set it to 'auto' to have a try ") | ||
raise ValueError("Backend is not found, please set it to 'auto' to have a try ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set it to 'auto' and try again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel that this sentence should not add 'is', Backend not found.
@@ -385,29 +392,29 @@ def detect_device(self, target_backend, orig_backend): | |||
return "cuda" | |||
elif "hpu" in target_backend: | |||
return "hpu" | |||
elif "xpu" in target_backend: | |||
return "xpu" | |||
elif "cpu" in target_backend: | |||
return "cpu" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
for device_type in ["cuda", "hpu", "xpu", "cpu"]:
if device_type in target_backend:
return device_type
merged first, all the issue will be fixed in the next pr |
TODO: issue=xpu could not be automatically used when not using auto backend