-
Notifications
You must be signed in to change notification settings - Fork 198
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 mps support. #75
Add mps support. #75
Conversation
Cool! guess we can do the same here
|
Great catch, @luca-medeiros! I’ve also added some additional information regarding this PR. MPS users will encounter warnings like the following:
As of version 2.4.1, upsample_bicubic2d.out is not supported on the MPS backend. However, support has been added to the nightly builds, so native support of this function should be available soon. Additionally, autocast support for MPS is on the way, though there is no planned merge yet. Once available, it should improve performance even further. MPS Coverage tracking issue on pytorch: pytorch/pytorch#77764 P.S. I have tested with nightly builds the warning is gone as expected.
|
@iamnotagentleman Nice, didn't know about that. Appreciate the explanation and PR! |
@luca-medeiros, I believe we can proceed for now. Other operations besides "upsample_bicubic2d" are still accelerated by MPS, and SAM-2 has received optimizations for the MPS infrastructure, so overall performance should still improve. I haven’t encountered any bugs so far. Also, before this PR, every action was running on the CPU, but now only "upsample_bicubic2d" will remain on the CPU. |
Describe your changes and approach used
Added MPS support for better performance on apple silicon.
Added init.py in models/ to make it a Python package.
TEST MACHINE