-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
[docs] add xpu device check #34684
[docs] add xpu device check #34684
Conversation
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.
Thanks for the suggestion!
I think using get_backend
may be the easiest option for users, and this will also include other devices such as mps
.
thanks! code update. Is this okay for you? Then I can change to other places as well. |
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.
Very nice, thank you! 👍
Co-authored-by: Steven Liu <[email protected]>
I only made one change: I removed GPU from the comment because GPU is a general term including CUDA, XPU, NPU. And I made the same change at other places as well. Pls have a review, thx a lot! |
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.
Fantastic, works for me!
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. |
* add XPU path * use accelerate API * Update docs/source/en/tasks/semantic_segmentation.md Co-authored-by: Steven Liu <[email protected]> * update more places with accelerate API --------- Co-authored-by: Steven Liu <[email protected]>
* add XPU path * use accelerate API * Update docs/source/en/tasks/semantic_segmentation.md Co-authored-by: Steven Liu <[email protected]> * update more places with accelerate API --------- Co-authored-by: Steven Liu <[email protected]>
* add XPU path * use accelerate API * Update docs/source/en/tasks/semantic_segmentation.md Co-authored-by: Steven Liu <[email protected]> * update more places with accelerate API --------- Co-authored-by: Steven Liu <[email protected]>
* add XPU path * use accelerate API * Update docs/source/en/tasks/semantic_segmentation.md Co-authored-by: Steven Liu <[email protected]> * update more places with accelerate API --------- Co-authored-by: Steven Liu <[email protected]>
What does this PR do?
There are many places in the task guides that only check the cuda device availability. This PR adds xpu besides cuda, but I am not sure whether my current change is the best one, because there are other ways to add xpu as, e.g.
get_backend
API to get the underlying deviceJust let me what is your favorite, @stevhliu Once agreed by you, I can submit further commits to replicate the change in other places.