fairseq
fairseq copied to clipboard
Add support for Mac m1/m2 chips in MMS for TTS example
What does this PR do?
Adds support for m1/m2 chips for MMS TTS example
PR review
Anyone in the community is free to review the PR once the tests have passed. If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
🙃
Hi @yrik!
Thank you for your pull request and welcome to our community.
Action Required
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
Thanks @yrik ! Could you also add a few extra lines for non-m1/m2 CPU support like the following?
if torch.cuda.is_available():
torch_device = torch.device("cuda")
elif torch.backends.mps.is_available() and torch.backends.mps.is_built():
torch_device = torch.device("mps")
else:
torch_device = torch.device("cpu")
CPU inference is added now. See this PR. The m1/m2 chip inference was not added to accomodate non-mac pytorch versions.