-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
[XPU][CI] enhance xpu test support #20652
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
Changes from all commits
aa9e94d
1eba73d
cb0b3dc
6dba0f3
d833eed
200dba9
a84337e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ def __init__( | |
| self.cascade_attn_enabled = False | ||
|
|
||
| def _init_device_properties(self) -> None: | ||
| pass | ||
| self.num_sms = None | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On top of this change, may I suggest an improvement to move these customization to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually these function was in gpu_model_runner.py originally and move to different device model_runner for cleaner readness. So I think we could follow this design. |
||
|
|
||
| def _sync_device(self) -> None: | ||
| torch.xpu.synchronize() | ||
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.
Consider using
torch.devicedirectly instead of string formatting for device creation. This can improve code readability and reduce the risk of errors.