FBCNN icon indicating copy to clipboard operation
FBCNN copied to clipboard

Make examples work with Metal Performance Shaders

Open vickash opened this issue 2 months ago • 0 comments

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

vickash avatar Apr 19 '24 17:04 vickash