Skip to content
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

[BUG FIX][FEATURE] Rework backend & device selection logic #568

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lgleim
Copy link

@lgleim lgleim commented Jan 14, 2025

Fixes #274 - Vulkan backend on non-cuda GPUs
Resolves #567 - Adds Pytorch 2.5+ Intel XPU support

Merges the logic of get_gpu_device() and get_cpu_device() to handle device selection in a single place.

If a specific backend is requested, this request is honored.

The vulkan backend will use intel's pytorch xps device if available, reducing cross-device data transfer.

The gpu backend will

  • default to cuda when available,
  • resolve to mps on macOS
  • or fallback to vulkan.

Fixes Vulkan on non-cuda GPUs & adds Pytorch 2.5+ Intel XPU support
Fixes Genesis-Embodied-AI#274

Merges the logic of get_gpu_device() and get_cpu_device() to handle
device selection in a single place.

If a specific backend is requested, this request is honored.

The vulkan backend will use intel's pytorch xps device if available,
reducing cross-device data transfer.

The `gpu` backend will
- default to `cuda` when available,
- resolve to `mps` on macOS
- or fallback to `vulkan`.
genesis/utils/misc.py Outdated Show resolved Hide resolved
Switched from match / case to if / else syntax
@lgleim lgleim requested a review from bxtbold January 16, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Pytorch 2.5+ Intel XPU support 不支持vulkan
2 participants