-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Fix MPS compatibility in get_1d_sincos_pos_embed_from_grid #12432 #12449
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
Fix MPS compatibility in get_1d_sincos_pos_embed_from_grid #12432 #12449
Conversation
@bot /style |
Style fix is beginning .... View the workflow run here. |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
it looks good, it mirrors how i was going to approach it. i have health issues this week and might take time to return a response, but i am following along. thank you for your contribution. |
@bghira Thank you for review quickly last week, kindly review as it Look good to you ,Workflows awaiting approval. |
@bot /style |
Style bot fixed some files and pushed the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Aishwarya0811 👍🏽
What does this PR do?
Fix MPS compatibility in get_1d_sincos_pos_embed_from_grid
Add dtype parameter with auto-detection for MPS devices. MPS doesn't support
float64, so the function now automatically uses float32 on MPS while maintaining
float64 on CUDA/CPU for backward compatibility. Users can also explicitly
override the dtype if needed.
Fixes #12432
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@bghira
@DN6