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

remove .pin_memory() in obj_pos of SAM2Base to resolve and error in MPS #495

Merged

Conversation

ronghanghu
Copy link
Contributor

In this PR, we remove .pin_memory() in obj_pos of SAM2Base to resolve and error in MPS. Investigations show that .pin_memory() causes an error of Attempted to set the storage of a tensor on device "cpu" to a storage on different device "mps:0", as originally reported in #487.

(close #487)

…r in MPS

In this PR, we remove `.pin_memory()` in `obj_pos` of `SAM2Base` to resolve and error in MPS. Investigations show that `.pin_memory()` causes an error of `Attempted to set the storage of a tensor on device "cpu" to a storage on different device "mps:0"`, as originally reported in facebookresearch#487.

(close facebookresearch#487)
@ronghanghu ronghanghu merged commit 2b90b9f into facebookresearch:main Dec 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempted to set the storage of a tensor on device "cpu" to a storage on different device "mps:0"
3 participants