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

Make examples work with Metal Performance Shaders #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vickash
Copy link

@vickash vickash commented Apr 19, 2024

This works fine with Metal Performance Shaders, but the included examples/tests fallback to the CPU as soon as CUDA isn't available. This PR makes them prioritize CUDA, then MPS, then CPU fallback.

Note: Not tested on Apple Silicon or macOS 13+.

Test environment:

GPU:           Radeon RX 6000 8GB
OS:            macOS 12.7.4 (Metal 2)
Python:        3.11.8
torch:         2.2.2
torchvision:   0.17.2
opencv-python: 4.9.0.80
numpy:         1.26.4

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.

1 participant