-
Notifications
You must be signed in to change notification settings - Fork 2.2k
enable activation offloading on XPU #3444
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
Signed-off-by: Matrix Yao <matrix.yao@intel.com>
) | ||
# NOTE: xpu doesn't have `default_stream` API, use `current_stream` instead | ||
self.s0 = ( | ||
torch.xpu.current_stream() if self.accelerator_type == "xpu" else torch.cuda.default_stream() |
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.
@gujinghui, pls help review this logic. Since xpu doesn't have default_stream
, so i am using current_stream
to WA.
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.
LGTM. As long as the workload has no specific assumption on cuda default stream, the current stream is good enough to replace it for functionality.
@kashif , pls help review, thx. |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
seems the ci failures are not brought by my PR @kashif |
Signed-off-by: Matrix Yao <matrix.yao@intel.com> Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com>
No description provided.