feat: Add Intel XPU (GPU) support#131
Open
Daankrol wants to merge 2 commits into
Open
Conversation
- Add --accelerator CLI argument (auto, gpu, xpu, cpu, cuda) - Add XPUAccelerator, SingleXPUStrategy, and XPUMixedPrecision for PyTorch Lightning - Replace hardcoded 'cuda' with dynamic get_autocast_device_type() - Update tensor device handling across layers, losses, and modules - Add Intel GPU installation instructions to README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat: Add Intel XPU (GPU) Support
Hi @HannesStark ! 👋
First of all, I want to say thank you for creating and sharing BoltzGen. It's a fantastic tool for generative modeling of biomolecular structures, and the codebase is really well-structured and a pleasure to work with!
What this PR does
This PR adds full support for Intel XPU (GPU) devices, enabling BoltzGen to run on Intel GPUs (Arc, Data Center Max Series, etc.) via PyTorch's XPU backend while maintaining full CUDA compatibility.
Features & Changes
New CLI functionality:
--acceleratorargument with choices:auto,gpu,xpu,cpu,cudaPyTorch Lightning XPU Integration:
XPUAcceleratorclass for PyTorch LightningSingleXPUStrategyfor single-device XPU training/inferenceXPUMixedPrecisionplugin for proper mixed precision handling on XPU devicesModel & Module Updates:
'cuda'autocast device type with dynamicget_autocast_device_type()_get_device()helper that checks for XPU availability in addition to CUDADocumentation: