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

add automatic MPS device support #27

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Conversation

balintlaczko
Copy link
Contributor

@balintlaczko balintlaczko commented Mar 13, 2024

Add automatic GPU acceleration for arm-based Apple computers using the MPS device. It should behave the same way as automatic CUDA discovery on Nvidia GPUs.

If "cuda" device is not available, then query torch.backends.mps.is_available(), and only fall back to cpu if none of them are there.

Had to disable this for the CLAP models now, because:
The operator 'aten::upsample_bicubic2d.out' is not currently implemented for the MPS device.
It works with the rest.

Also moved the "Audio is mono..." warning in get_embeddings when using Encodec under a self.verbose check, otherwise it ends up being very verbose in practice even if self.verbose==False. :)) Hope that's okay.

@gudgud96 gudgud96 merged commit 1fd603a into gudgud96:main Mar 18, 2024
1 check passed
@gudgud96
Copy link
Owner

Thanks for your contribution!

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.

2 participants