I have added intel gpu(xpu) support and updated the documentation #353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have added intel(xpu) support by starting with the intel/intel-extension-for-pytorch:2.8.10-xpu image. Then added the required dependencies to the
pyproject.tomlfile(i have never used poetry before so you might need to do some cleanup there). Some minor code tweaks were necessary, mainly adding an option forxpunext tocuda. For clearing cache I addedtorch.xpu.memory.empty_cache(). I recommend you replace the cache clearing withtorch.accelerator.memory.empty_cache()if you ever move on to torch version 2.9.0 or above. I also tried to updated the documentation to reflect the added intel support, I have only tested the container with a Intel arc B580 so i don't know if cuda still works. Also i would also like ask to make the uploaded container tagslatestfor cpu latestlatest-cudafor nvidia andlatest-intelfor intel. That is how i changed it in the docs.