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

Can I use mambavision on cpu? #43

Open
kurbobo opened this issue Sep 28, 2024 · 1 comment
Open

Can I use mambavision on cpu? #43

kurbobo opened this issue Sep 28, 2024 · 1 comment

Comments

@kurbobo
Copy link

kurbobo commented Sep 28, 2024

I have problems with run on cpu

File mamba_ssm/ops/selective_scan_interface.py:42, in SelectiveScanFn.forward(ctx, u, delta, A, B, C, D, z, delta_bias, delta_softplus, return_last_state)
     40     C = rearrange(C, "b dstate l -> b 1 dstate l")
     41     ctx.squeeze_C = True
---> 42 out, x, *rest = selective_scan_cuda.fwd(u, delta, A, B, C, D, z, delta_bias, delta_softplus)
     43 ctx.delta_softplus = delta_softplus
     44 ctx.has_z = z is not None

RuntimeError: Expected u.is_cuda() to be true, but got false.  (Could this error message be improved?  If so, please report an enhancement request to PyTorch.)

Is there any way to fix it?

@ahatamiz
Copy link
Collaborator

Hi @kurbobo

The selective_scan operation in Mamba is implemented for CUDA. There's a related issue here, but I don't believe CPU inference is yet fully supported.

Hope this helps !

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

No branches or pull requests

2 participants