haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Feature request: Enable support for GPU acceleration on Apple M-Silicon using MPS

Open t0r0id opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. The MPS backend support is part of the PyTorch 1.12 official release. This will enable GPU acceleration on Apple M-Silicon powered devices.

initialize_device_settings supports only 'cuda' device initialisation.

Describe the solution you'd like Replace use_cuda flag with use_gpu flag and select appropriate device, 'mps' or 'cuda'.

Describe alternatives you've considered No

Additional context PyTorch documentation for MPS

t0r0id avatar Jan 02 '23 14:01 t0r0id

Hey @t0r0id we already support mps, what seems to be an issue?

vblagoje avatar Jan 04 '23 19:01 vblagoje

I just realised, we can pass devices parameter. My bad!

t0r0id avatar Jan 05 '23 10:01 t0r0id

@t0r0id please continue contributing, your efforts are very much appreciated.

vblagoje avatar Jan 07 '23 11:01 vblagoje