mamba icon indicating copy to clipboard operation
mamba copied to clipboard

selective_scan_cuda

Open gnorZgnoD opened this issue 1 year ago • 30 comments
trafficstars

image Hi, author, where can i find the module named 'selective_scan_cuda'?

gnorZgnoD avatar Jan 09 '24 09:01 gnorZgnoD

Did you follow the installation instruction in the README? It's here and should be installed if you do pip install mamba-ssm: https://github.com/state-spaces/mamba/tree/main/csrc/selective_scan

tridao avatar Jan 09 '24 09:01 tridao

Sorry, but when i followed the installation, i failed to successfully install mamba-ssm, i met the following issue: 3ffc6c27f9559f1f8751ea5b31a92f9 I tried both pip install and conda install, and i also tried to pip install . from this repository, all of them couldn't work.

gnorZgnoD avatar Jan 09 '24 11:01 gnorZgnoD

Can you try downloading that wheel URL manually to check if the networking works?

tridao avatar Jan 09 '24 17:01 tridao

I run into the same problem,

Kingxudong avatar Jan 26 '24 09:01 Kingxudong

抱歉,但是当我进行安装时,我无法成功安装mamba-ssm,我遇到了以下问题:3ffc6c27f9559f1f8751ea5b31a92f9我尝试了pip install和conda install,并且还尝试了pip install。从这个存储库中,所有这些都无法工作。 This is because the cuda version is too low and requires cuda 11.6 and above.

Kingxudong avatar Jan 26 '24 10:01 Kingxudong

抱歉,但是当我进行安装时,我无法成功安装mamba-ssm,我遇到了以下问题:3ffc6c27f9559f1f8751ea5b31a92f9我尝试了pip install和conda install,并且还尝试了pip install。从这个存储库中,所有这些都无法工作。 This is because the cuda version is too low and requires cuda 11.6 and above.

I solved the issue by following operations:

  1. I downloaded the mamba_ssm.whl file from https://github.com/state-spaces/mamba/releases, then i pip install the whl file in my working environment.
  2. I updated my torch version to 2.0.0, and my torchaudio version to 2.0.1, and i used the cudatooklit11.8. image

gnorZgnoD avatar Jan 27 '24 02:01 gnorZgnoD

Did you follow the installation instruction in the README? It's here and should be installed if you do pip install mamba-ssm: https://github.com/state-spaces/mamba/tree/main/csrc/selective_scan

I have done pip install mamba-ssm successfully , but I still have this problem. image image

2tianyao1 avatar Feb 23 '24 07:02 2tianyao1

9e1c58029079cb3f70d8fb7be63ed91 Hello author, how should I solve this error? I downloaded the 1.1.4 version of the whl package and installed it.

LanXingXuan avatar Feb 29 '24 07:02 LanXingXuan

9e1c58029079cb3f70d8fb7be63ed91 Hello author, how should I solve this error? I downloaded the 1.1.4 version of the whl package and installed it.

I have the same problem. Is there any solution

bingo-G avatar Feb 29 '24 13:02 bingo-G

9e1c58029079cb3f70d8fb7be63ed91 Hello author, how should I solve this error? I downloaded the 1.1.4 version of the whl package and installed it.

I fixed the problem, you can't download the latest whl file, you can just recompile it with the previous whl file, Such as mamba_ssm - 1.1.3. Post1 + cu118torch2. 1 cxx11abifalse - cp310 - cp310 - linux_x86_64. WHL

bingo-G avatar Feb 29 '24 13:02 bingo-G

FWIW, i also had the same problem and was able to solve it by pip install mamba-ssm. Earlier, I tried with pip install .

hsm207 avatar Mar 09 '24 13:03 hsm207

9e1c58029079cb3f70d8fb7be63ed91 Hello author, how should I solve this error? I downloaded the 1.1.4 version of the whl package and installed it.

hi, I met the same issue. Have you solved yet?

JefferyChen453 avatar Mar 11 '24 11:03 JefferyChen453

and mine here is: image

junmeng6025 avatar Mar 18 '24 16:03 junmeng6025

Did you follow the installation instruction in the README? It's here and should be installed if you do pip install mamba-ssm: https://github.com/state-spaces/mamba/tree/main/csrc/selective_scan

I have done pip install mamba-ssm successfully , but I still have this problem. image image

Have you solved this problem?I meet the same question,can you tell me how to solve it please

Weishangbin avatar Mar 28 '24 03:03 Weishangbin

image I have done pip install mamba-ssm successfully, but selective_scan download is not successful

WHX0259 avatar Mar 31 '24 03:03 WHX0259

9e1c58029079cb3f70d8fb7be63ed91 Hello author, how should I solve this error? I downloaded the 1.1.4 version of the whl package and installed it.

I have the same question, have you be done this.

yidamyth avatar Apr 28 '24 01:04 yidamyth

9e1c58029079cb3f70d8fb7be63ed91 Hello author, how should I solve this error? I downloaded the 1.1.4 version of the whl package and installed it.

I fixed the problem, you can't download the latest whl file, you can just recompile it with the previous whl file, Such as mamba_ssm - 1.1.3. Post1 + cu118torch2. 1 cxx11abifalse - cp310 - cp310 - linux_x86_64. WHL

I have the same question, i have pip install mamba_ssm but also meet this.

yidamyth avatar Apr 28 '24 01:04 yidamyth

ImportError: /home/yida/miniconda3/envs/mambair/lib/python3.9/site-packages/selective_scan_cuda.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

image

yidamyth avatar Apr 28 '24 02:04 yidamyth

image I have the same question,have you finish this problem?

ncp-nice avatar Apr 28 '24 15:04 ncp-nice

I have fixed the environment again, now it's okay. You can take a look at the following article. I'm using vision mamba. You can try installing it using a whl file, maybe you don't need to reinstall the environment. Pay attention to matching the versions of PyTorch and Python, etc.

wget https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.1.3.post1/causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
wget https://github.com/state-spaces/mamba/releases/download/v1.1.1/mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

pip install causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 
pip install mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 

https://blog.csdn.net/weixin_45667052/article/details/136311600

WHX0259 avatar Apr 29 '24 03:04 WHX0259

I have fixed the environment again, now it's okay. You can take a look at the following article. I'm using vision mamba. You can try installing it using a whl file, maybe you don't need to reinstall the environment. Pay attention to matching the versions of PyTorch and Python, etc.

wget https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.1.3.post1/causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
wget https://github.com/state-spaces/mamba/releases/download/v1.1.1/mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

pip install causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 
pip install mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 

https://blog.csdn.net/weixin_45667052/article/details/136311600

Thanks very much, I have down this question by your answer. Can success follow this link. The key is 'cp -rf mamba-1p1p1/mamba_ssm /home/yida/miniconda3/envs/mamba/lib/python3.10/site-packages'.

yidamyth avatar Apr 29 '24 06:04 yidamyth

Hi,

I figured out the problem with import mamba_ssm prompting import error:

I found out that it was the problem with using the newest torch.__version__=2.3.

I tested with cuda versions 12.2, 11.8; python 3.9, 3.10; torch 2.1, 2.2, 2.3. Only torch 2.3 is not able to import mamba_ssm. torch 2.1 and 2.2 worked well.

Pictures are shown below.

Hope you can find this useful! :)

Screenshot 2024-05-22 at 14 54 50 Screenshot 2024-05-22 at 14 55 04

zixianwang2022 avatar May 22 '24 22:05 zixianwang2022

v1.2.1 now includes wheels for pytorch 2.3 so it should hopefully fix this issue

tridao avatar May 27 '24 01:05 tridao

v1.2.1 now includes wheels for pytorch 2.3 so it should hopefully fix this issue

Thank you.

yidamyth avatar May 27 '24 01:05 yidamyth

@tridao the problem exist for v2.0.3 for pytorch 2.3

ghaddarAbs avatar Jun 04 '24 01:06 ghaddarAbs

我重新修复了一下环境,现在没问题了。你可以看看下面的文章。我用的是 Vision Mamba。你可以尝试使用 whl 文件安装,也许不需要重新安装环境。注意匹配 PyTorch 和 Python 的版本等。

wget https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.1.3.post1/causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
wget https://github.com/state-spaces/mamba/releases/download/v1.1.1/mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

pip install causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 
pip install mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 

https://blog.csdn.net/weixin_45667052/article/details/136311600

非常感谢,我通过你的回答解决了这个问题。可以成功点击此链接。密钥是“cp -rf mamba-1p1p1/mamba_ssm /home/yida/miniconda3/envs/mamba/lib/python3.10/site-packages”。

我重新修复了环境,现在没问题了。你可以看看下面的文章。我用的是 Vision Mamba。你可以尝试使用 whl 文件安装,也许不需要重新安装环境。注意匹配 PyTorch 和 Python 的版本等。

wget https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.1.3.post1/causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
wget https://github.com/state-spaces/mamba/releases/download/v1.1.1/mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

pip install causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 
pip install mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 

https://blog.csdn.net/weixin_45667052/article/details/136311600

非常感谢,我通过你的回答解决了这个问题。可以成功点击此链接。密钥是“cp -rf mamba-1p1p1/mamba_ssm /home/yida/miniconda3/envs/mamba/lib/python3.10/site-packages”。 您好,我已经成功安装以上版本的causal-conv1d和mamba-ssm,但是依旧报错ImportError xxxx causal_conv1d_cuda.cpython-xxx-linux-gnu.so undefined symbol的错误,我将对应版本的源码已替换到site-packages后,依旧报同样的错误,不知道是不是我的操作有问题,如:我下载源码mamba-1.1.1,做cp -rf mamba-1.1.1/mamba_ssm ./***/site-packages .还请您抽空解惑下,非常感谢

SEMLLYCAT avatar Jun 05 '24 09:06 SEMLLYCAT

我重新修复了环境,现在没问题了。你可以看看下面的文章。我用的是 Vision Mamba。你可以尝试使用 whl 文件安装,也许不需要重新安装环境。注意匹配 PyTorch 和 Python 的版本等。

wget https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.1.3.post1/causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
wget https://github.com/state-spaces/mamba/releases/download/v1.1.1/mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

pip install causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 
pip install mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 

https://blog.csdn.net/weixin_45667052/article/details/136311600

非常感谢,我通过你的回答解决了这个问题。可以成功点击此链接。密钥是“cp -rf mamba-1p1p1/mamba_ssm /home/yida/miniconda3/envs/mamba/lib/python3.10/site-packages”。

我重新修复了环境,现在没问题了。你可以看看下面的文章。我正在使用的是 Vision Mamba。你可以尝试使用 whl 文件安装,也许不需要重新安装环境。注意匹配 PyTorch 和 Python 的版本等。

wget https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.1.3.post1/causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
wget https://github.com/state-spaces/mamba/releases/download/v1.1.1/mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

pip install causal_conv1d-1.1.3.post1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 
pip install mamba_ssm-1.1.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl 

https://blog.csdn.net/weixin_45667052/article/details/136311600

非常感谢,我通过你的回答解决了这个问题。可以成功点击此链接。密钥是“cp -rf mamba-1p1p1/mamba_ssm /home/yida/miniconda3/envs/mamba/lib/python3.10/site-packages”。 您好,我已经成功安装了以上版本causal-conv1d和mamba-ssm,但是依旧报错ImportError xxxx causal_conv1d_cuda.cpython-xxx-linux-gnu.so undefined symbol错误,我将对应版本的源码已替换到site-packages后,依旧报同样的错误,不知道是不是我的操作有问题,如:我下载源码mamba-1.1.1,做cp -rf mamba-1.1.1/mamba_ssm ./***/site-packages 。还请您抽空解惑下,非常感谢 causal-conv1d和mamba-ssm,我做了同样的操作

SEMLLYCAT avatar Jun 05 '24 09:06 SEMLLYCAT