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

selective_scan_cuda error #265

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wang935415150
Copy link

I'm using the m1 chip version of MacOS and python3.10 pytorch2.2.1 natively tried to use mamba_ssm.ops.selective_scan_interface native, so I tried to skip here, the truth is that it works, and it can also call model.to ("mps") so I made this modification attempt

…be used. After modification, it does not affect the normal use and operation
@radarFudan
Copy link

This is an interesting discovery. Just curious: is there a significant speedup from mps over cpu?

@tridao
Copy link
Collaborator

tridao commented Mar 24, 2024

You can put the import in the try except, but I wouldn't call the selective_scan_ref function in selective_scan_fn if selective_scan_cuda is not found. Instead it should error.
We don't want people to silently get much slower performance if they forgot to install the CUDA extension, or the installation was not correct.

@wang935415150
Copy link
Author

This is an interesting discovery. Just curious: is there a significant speedup from mps over cpu?

Hello, my English is not very good, so I took the translation tool and replied: You can check out this official document, in fact he has some improvements.
https://pytorch.org/blog/introducing-accelerated-pytorch-training-on-mac/

@albertfgu albertfgu force-pushed the main branch 2 times, most recently from 6d45666 to 41d30ce Compare June 3, 2024 12:56
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.

3 participants