Repository navigation
[docs] add xpu device check - #34684
[docs] add xpu device check #34684
Conversation
stevhliu
left a comment
There was a problem hiding this comment.
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. |
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
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! |
|
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 <59462357+stevhliu@users.noreply.github.com> * update more places with accelerate API --------- Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
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_backendAPI 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.