state-spaces / mamba

Mamba SSM architecture
Apache License 2.0
13.34k stars 1.13k forks source link

Import Error #169

Open BLUE811420 opened 9 months ago

BLUE811420 commented 9 months ago

ImportError: /home/ysn/anaconda3/envs/Mamba/lib/python3.8/site-packages/causal_conv1d_cuda.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c107WarningC1ENS_7variantIJNS0_11UserWarningENS0_18DeprecationWarningEEEERKNS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb what is the reason? please for the answer

sabeaussan commented 9 months ago

It seems related to CUDA and causal_conv_1d, what is the output of nvidia-smi ? And what is you're pytorch version and causal_conv_1d version ?

BLUE811420 commented 9 months ago

yep,i solve it ,the causal_conv_1d version error,thank you

---- Replied Message ---- | From | @.> | | Date | 02/09/2024 15:38 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) |

It seems related to CUDA and causal_conv_1d, what is the output of nvidia-smi ? And what is you're pytorch version and causal_conv_1d version ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

sabeaussan commented 9 months ago

Nice, I guess you should close the issue then.

AshleyLuo001 commented 9 months ago

yep,i solve it ,the causal_conv_1d version error,thank you ---- Replied Message ---- | From | @.> | | Date | 02/09/2024 15:38 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | It seems related to CUDA and causal_conv_1d, what is the output of nvidia-smi ? And what is you're pytorch version and causal_conv_1d version ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

How did you match the causal_conv_1d version ,please.

BLUE811420 commented 9 months ago

both 1.1.1and cuda 11.8+torch2.1

---- Replied Message ---- | From | @.> | | Date | 02/10/2024 20:02 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) |

yep,i solve it ,the causal_conv_1d version error,thank you … ---- Replied Message ---- | From | @.> | | Date | 02/09/2024 15:38 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | It seems related to CUDA and causal_conv_1d, what is the output of nvidia-smi ? And what is you're pytorch version and causal_conv_1d version ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

How did you match the causal_conv_1d version ,please.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

AshleyLuo001 commented 9 months ago

both 1.1.1and cuda 11.8+torch2.1 ---- Replied Message ---- | From | @.> | | Date | 02/10/2024 20:02 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | yep,i solve it ,the causal_conv_1d version error,thank you … ---- Replied Message ---- | From | @.> | | Date | 02/09/2024 15:38 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | It seems related to CUDA and causal_conv_1d, what is the output of nvidia-smi ? And what is you're pytorch version and causal_conv_1d version ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> How did you match the causal_conv_1d version ,please. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

thank you! I get it!

zhoukexin-62 commented 9 months ago

both 1.1.1and cuda 11.8+torch2.1 ---- Replied Message ---- | From | @.> | | Date | 02/10/2024 20:02 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | yep,i solve it ,the causal_conv_1d version error,thank you … ---- Replied Message ---- | From | @.> | | Date | 02/09/2024 15:38 | | To | state-spaces/mamba @.> | | Cc | BLUE811420 @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | It seems related to CUDA and causal_conv_1d, what is the output of nvidia-smi ? And what is you're pytorch version and causal_conv_1d version ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> How did you match the causal_conv_1d version ,please. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

image i check the version,but still got problem in test。 selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c107WarningC1ENS_7variantIJNS0_11UserWarningENS0_18DeprecationWarningEEEERKNS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb

how can i do?

BLUE811420 commented 9 months ago

i think mamba_ssm abi should be false

zhoukexin-62 commented 9 months ago

i think mamba_ssm abi should be false

how can i do to slove it?

BLUE811420 commented 9 months ago

try download mamba_ssm-1.0.1+cu118torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl, but im not sure it could be work

zhoukexin-62 commented 9 months ago

i try it before,still can't work. so the mamba_ssm version should be same as the init.py file?and the causal_conv1d version should be same as the mamba_ssm?thx for u reply.

zhoukexin-62 commented 9 months ago

i try it before,still can't work. so the mamba_ssm version should be same as the init.py file?and the causal_conv1d version should be same as the mamba_ssm?thx for u reply.

BLUE811420 commented 9 months ago

this is my version image

BLUE811420 commented 9 months ago

i think u are Chinese? we can have a wechat

BLUE811420 commented 9 months ago

make it

BLUE811420 commented 9 months ago

my python version is 3.8,abi need false i think

---- Replied Message ---- | From | @.> | | Date | 03/02/2024 00:31 | | To | state-spaces/mamba @.> | | Cc | Xiao @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) |

我是3.10,你看看你的whl是不是下载abiFalse版本,一般用False安装就能用了。cuda、torch、python版本自己对下。

------------------ 原始邮件 ------------------ 发件人: "state-spaces/mamba" @.>; 发送时间: 2024年3月1日(星期五) 下午3:54 @.>; @.**@.>; 主题: Re: [state-spaces/mamba] Import Error (Issue #169)

I use your version, but it doesn't work. I wonder if your python version is 3.8?Thanks!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

CCECfgd commented 9 months ago

i think u are Chinese? we can have a wechat

你好,我也存在环境方面的困扰,我们是否能通过微信交流下,十分感谢!

zhoukexin-62 commented 9 months ago

i think u are Chinese? we can have a wechat

你好,我也存在环境方面的困扰,我们是否能通过微信交流下,十分感谢!

给个ID

jorenretel commented 8 months ago

For anyone else landing here. The conclusion of this thread was not completely clear to me. I had basically the same problem with

selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol

In my case, I discovered that I had some incompatible pip cache laying around. A simple:

pip uninstall mamba-ssm
pip install mamba-ssm --no-cache-dir

fixes the issue though.

aaronshenhao commented 8 months ago

For anyone else landing here. The conclusion of this thread was not completely clear to me. I had basically the same problem with

selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol

In my case, I discovered that I had some incompatible pip cache laying around. A simple:

pip uninstall mamba-ssm
pip install mamba-ssm --no-cache-dir

fixes the issue though.

This worked for me! I was encountering the error in the official Colab notebook.

zx1292982431 commented 7 months ago

For anyone else landing here. The conclusion of this thread was not completely clear to me. I had basically the same problem with

selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol

In my case, I discovered that I had some incompatible pip cache laying around. A simple:

pip uninstall mamba-ssm
pip install mamba-ssm --no-cache-dir

fixes the issue though.

Thank you! It's worked for me! Have a nice day!😘

MohitIntel commented 7 months ago

Still see this issue on nvcr.io/nvidia/pytorch:23.11-py3 The above suggested --no-cache-dir did not work for me :(. Here is my pip list: `Package Version Editable project location


absl-py 2.0.0 accelerate 0.27.2 aiohttp 3.8.6 aiosignal 1.3.1 annotated-types 0.6.0 apex 0.1 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 asttokens 2.4.1 astunparse 1.6.3 async-timeout 4.0.3 attrs 23.1.0 audioread 3.0.1 beautifulsoup4 4.12.2 bleach 6.1.0 blis 0.7.11 cachetools 5.3.2 catalogue 2.0.10 causal-conv1d 1.2.0.post2 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.1 click 8.1.7 cloudpathlib 0.16.0 cloudpickle 3.0.0 cmake 3.27.7 coloredlogs 15.0.1 comm 0.2.0 confection 0.1.3 contourpy 1.2.0 cubinlinker 0.3.0+2.g711d153 cuda-python 12.3.0rc4+8.ge6f99b5 cudf 23.10.0 cugraph 23.10.0 cugraph-dgl 23.10.0 cugraph-service-client 23.10.0 cugraph-service-server 23.10.0 cuml 23.10.0 cupy-cuda12x 12.2.0 cycler 0.12.1 cymem 2.0.8 Cython 3.0.5 dask 2023.9.2 dask-cuda 23.10.0 dask-cudf 23.10.0 datasets 2.18.0 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 diffusers 0.26.3 dill 0.3.8 distributed 2023.9.2 dm-tree 0.1.8 einops 0.7.0 exceptiongroup 1.1.3 execnet 2.0.2 executing 2.0.1 expecttest 0.1.3 fastjsonschema 2.19.0 fastrlock 0.8.2 filelock 3.13.1 flash-attn 2.0.4 fonttools 4.45.0 frozenlist 1.4.0 fsspec 2023.10.0 gast 0.5.4 google-auth 2.23.4 google-auth-oauthlib 0.4.6 graphsurgeon 0.4.6 grpcio 1.59.3 huggingface-hub 0.22.2 humanfriendly 10.0 hypothesis 5.35.1 idna 3.4 importlib-metadata 6.8.0 iniconfig 2.0.0 intel-openmp 2021.4.0 ipykernel 6.26.0 ipython 8.17.2 ipython-genutils 0.2.0 jedi 0.19.1 Jinja2 3.1.2 joblib 1.3.2 json5 0.9.14 jsonschema 4.20.0 jsonschema-specifications 2023.11.1 jupyter_client 8.6.0 jupyter_core 5.5.0 jupyter-tensorboard 0.2.0 jupyterlab 2.3.2 jupyterlab-pygments 0.2.2 jupyterlab-server 1.2.0 jupytext 1.15.2 kiwisolver 1.4.5 langcodes 3.3.0 lazy_loader 0.3 librosa 0.10.1 llvmlite 0.40.1 locket 1.0.0 mamba-ssm 1.2.0 Markdown 3.5.1 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.8.2 matplotlib-inline 0.1.6 mdit-py-plugins 0.4.0 mdurl 0.1.2 mistune 3.0.2 mkl 2021.1.1 mkl-devel 2021.1.1 mkl-include 2021.1.1 mock 5.1.0 mpmath 1.3.0 msgpack 1.0.7 multidict 6.0.4 multiprocess 0.70.16 murmurhash 1.0.10 nbclient 0.9.0 nbconvert 7.11.0 nbformat 5.9.2 nest-asyncio 1.5.8 networkx 2.6.3 ninja 1.11.1.1 notebook 6.4.10 numba 0.57.1+1.gc2aae5dd0 numpy 1.24.4 nvfuser 0.0.21+gitunknown nvidia-dali-cuda120 1.31.0 nvidia-pyindex 1.0.9 nvtx 0.2.5 oauthlib 3.2.2 onnx 1.14.1 opencv 4.7.0 optimum 1.18.1 optimum-habana 1.11.0 /root/mdeopujari/optimum-habana-fork optree 0.10.0 packaging 23.2 pandas 1.5.3 pandocfilters 1.5.0 parso 0.8.3 partd 1.4.1 pexpect 4.8.0 Pillow 9.2.0 pip 23.3.1 platformdirs 4.0.0 pluggy 1.3.0 ply 3.11 polygraphy 0.49.1 pooch 1.8.0 preshed 3.0.9 prettytable 3.9.0 prometheus-client 0.18.0 prompt-toolkit 3.0.41 protobuf 4.24.4 psutil 5.9.4 ptxcompiler 0.8.1+2.g4c26c4c ptyprocess 0.7.0 pure-eval 0.2.2 pyarrow 12.0.1 pyarrow-hotfix 0.6 pyasn1 0.5.1 pyasn1-modules 0.3.0 pybind11 2.11.1 pybind11-global 2.11.1 pycocotools 2.0+nv0.8.0 pycparser 2.21 pydantic 2.5.1 pydantic_core 2.14.3 Pygments 2.17.1 pylibcugraph 23.10.0 pylibcugraphops 23.10.0 pylibraft 23.10.0 pynvml 11.4.1 pyparsing 3.1.1 pytest 7.4.3 pytest-flakefinder 1.1.0 pytest-rerunfailures 12.0 pytest-shard 0.1.2 pytest-xdist 3.4.0 python-dateutil 2.8.2 python-hostlist 1.23.0 pytorch-quantization 2.1.2 pytz 2023.3.post1 PyYAML 6.0.1 pyzmq 25.1.1 raft-dask 23.10.0 referencing 0.31.0 regex 2023.10.3 requests 2.31.0 requests-oauthlib 1.3.1 rmm 23.10.0 rpds-py 0.13.1 rsa 4.9 safetensors 0.4.2 scikit-learn 1.2.0 scipy 1.11.3 Send2Trash 1.8.2 sentencepiece 0.2.0 setuptools 68.2.2 six 1.16.0 smart-open 6.4.0 sortedcontainers 2.4.0 soundfile 0.12.1 soupsieve 2.5 soxr 0.3.7 spacy 3.7.2 spacy-legacy 3.0.12 spacy-loggers 1.0.5 sphinx-glpi-theme 0.4.1 srsly 2.4.8 stack-data 0.6.3 sympy 1.12 tabulate 0.9.0 tbb 2021.11.0 tblib 3.0.0 tensorboard 2.9.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorrt 8.6.1 terminado 0.18.0 thinc 8.2.1 threadpoolctl 3.2.0 thriftpy2 0.4.17 tinycss2 1.2.1 tokenizers 0.15.2 toml 0.10.2 tomli 2.0.1 toolz 0.12.0 torch 2.2.0a0+6a974be torch-tensorrt 2.2.0a0 torchdata 0.7.0a0 torchtext 0.16.0a0 torchvision 0.17.0a0 tornado 6.3.3 tqdm 4.66.1 traitlets 5.9.0 transformer-engine 1.0.0+66d91d5 transformers 4.39.0 treelite 3.9.1 treelite-runtime 3.9.1 triton 2.1.0+6e4932c typer 0.9.0 types-dataclasses 0.6.6 typing_extensions 4.8.0 ucx-py 0.34.0 uff 0.6.9 urllib3 1.26.18 wasabi 1.1.2 wcwidth 0.2.10 weasel 0.3.4 webencodings 0.5.1 Werkzeug 3.0.1 wheel 0.41.3 xdoctest 1.0.2 xgboost 1.7.6 xxhash 3.4.1 yarl 1.9.2 zict 3.0.0 zipp 3.17.0`

Kevin-naticl commented 7 months ago

I have the same problem. Is it a problem of the match of version of causal-conv1d and mamba? I installed these versions: D:\Downloads\causal_conv1d-1.2.0.post2+cu118torch1.12cxx11abiTRUE-cp37-cp37m-linux_x86_64.whl D:\Downloads\mamba_ssm-1.2.0.post1+cu118torch1.12cxx11abiTRUE-cp37-cp37m-linux_x86_64.whl

It still have the problem: from mamba_ssm import mamba File "/home/work_nfs10/bykang/Test/mamba_ssm/init.py", line 3, in from mamba_ssm.ops.selective_scan_interface import selective_scan_fn, mamba_inner_fn File "/home/work_nfs10/bykang/Test/mamba_ssm/ops/selective_scan_interface.py", line 16, in import selective_scan_cuda ImportError: /home/work_nfs7/bykang/bykang_env/envs/stcm/lib/python3.7/site-packages/selective_scan_cuda.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

Kevin-naticl commented 7 months ago

And my pytorch is torch1.13+cu117

uxhao-o commented 7 months ago

I have been successfully run. Environment follows: cuda 11.8 python 3.10.13 pytorch 2.1.1 causal_conv1d 1.1.1 mamba-ssm 1.2.0.post1

pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
pip install causal_conv1d==1.1.1
pip install mamba-ssm==1.2.0.post1
xifen523 commented 7 months ago

thx, it is work

JeffreyzzZ0 commented 6 months ago

my python version is 3.8,abi need false i think ---- Replied Message ---- | From | @.> | | Date | 03/02/2024 00:31 | | To | state-spaces/mamba @.> | | Cc | Xiao @.>, Author @.> | | Subject | Re: [state-spaces/mamba] Import Error (Issue #169) | 我是3.10,你看看你的whl是不是下载abiFalse版本,一般用False安装就能用了。cuda、torch、python版本自己对下。 ------------------ 原始邮件 ------------------ 发件人: "state-spaces/mamba" @.>; 发送时间: 2024年3月1日(星期五) 下午3:54 @.>; @.**@.>; 主题: Re: [state-spaces/mamba] Import Error (Issue #169) I use your version, but it doesn't work. I wonder if your python version is 3.8?Thanks! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

Hey bro, Can I have your wechat? I have trouble in installing the environment

askrbayern commented 6 months ago

Thank you guys! I solved my problem. I believe the problem is (py)torch version, and mamba/conv1d don't support 2.3.0 yet.(check Dao's response in Issue #217)

My problem: undefined symbol for both mamba-ssm and causal_conv1d

My previous environment: CUDA 12.1, torch/pytorch 2.3.0

My solution: reinstall (py)torch with version 2.2

============== Solutions that have been proposed in this post that doesnt work in my case:

Solutions proposed in Issue #217 that doesnt work in my case:

Yumo216 commented 6 months ago

Thank you guys! I solved my problem. I believe the problem is (py)torch version, and mamba/conv1d don't support 2.3.0 yet.(check Dao's response in Issue #217)

My problem: undefined symbol for both mamba-ssm and causal_conv1d

My previous environment: CUDA 12.1, torch/pytorch 2.3.0

My solution: reinstall (py)torch with version 2.2

  • pip uninstall torch torchvision torchaudio mamba-ssm causal_conv1d
  • conda uninstall pytorch if you have pytorch version 2.3.0
  • pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121
  • conda install pytorch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 pytorch-cuda=12.1 -c pytorch -c nvidia find your code for installing other versions of pytorch here
  • pip install causal_conv1d
  • pip install mamba-ssm or pip install mamba-ssm=1.2.0.post1, both work

============== Solutions that have been proposed in this post that doesnt work in my case:

  • pip install mamba-ssm --no-cache-dir (Doesnt make no difference for me)
  • pip install causal_conv1d==1.1.1 (Cannot install, so I just installed version 1.2.0)

Solutions proposed in Issue #217 that doesnt work in my case:

  • pip install https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.2.0.post2/causal_conv1d-1.2.0.post2+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
  • pip install https://github.com/state-spaces/mamba/releases/download/v1.2.0.post1/mamba_ssm-1.2.0.post1+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

You are a real hero. You saved my life!

elttaes commented 6 months ago

Thank you guys! I solved my problem. I believe the problem is (py)torch version, and mamba/conv1d don't support 2.3.0 yet.(check Dao's response in Issue #217)

My problem: undefined symbol for both mamba-ssm and causal_conv1d

My previous environment: CUDA 12.1, torch/pytorch 2.3.0

My solution: reinstall (py)torch with version 2.2

  • pip uninstall torch torchvision torchaudio mamba-ssm causal_conv1d
  • conda uninstall pytorch if you have pytorch version 2.3.0
  • pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121
  • conda install pytorch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 pytorch-cuda=12.1 -c pytorch -c nvidia find your code for installing other versions of pytorch here
  • pip install causal_conv1d
  • pip install mamba-ssm or pip install mamba-ssm=1.2.0.post1, both work

============== Solutions that have been proposed in this post that doesnt work in my case:

  • pip install mamba-ssm --no-cache-dir (Doesnt make no difference for me)
  • pip install causal_conv1d==1.1.1 (Cannot install, so I just installed version 1.2.0)

Solutions proposed in Issue #217 that doesnt work in my case:

  • pip install https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.2.0.post2/causal_conv1d-1.2.0.post2+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
  • pip install https://github.com/state-spaces/mamba/releases/download/v1.2.0.post1/mamba_ssm-1.2.0.post1+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

I have no choice but to directly copy my past conda environment, and after trying many methods, I have no idea where the problem lies. You are a real hero!!!

MUsixG commented 6 months ago

For anyone else landing here. The conclusion of this thread was not completely clear to me. I had basically the same problem with

selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol

In my case, I discovered that I had some incompatible pip cache laying around. A simple:

pip uninstall mamba-ssm
pip install mamba-ssm --no-cache-dir

fixes the issue though.

Tranks! It works for me. Have a nice day!

Joeland4 commented 3 months ago

I have been successfully run. Environment follows: cuda 11.8 python 3.10.13 pytorch 2.1.1 causal_conv1d 1.1.1 mamba-ssm 1.2.0.post1

pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
pip install causal_conv1d==1.1.1
pip install mamba-ssm==1.2.0.post1

very nice!

inari233 commented 2 weeks ago

Thank you guys! I solved my problem. I believe the problem is (py)torch version, and mamba/conv1d don't support 2.3.0 yet.(check Dao's response in Issue #217)

My problem: undefined symbol for both mamba-ssm and causal_conv1d

My previous environment: CUDA 12.1, torch/pytorch 2.3.0

My solution: reinstall (py)torch with version 2.2

  • pip uninstall torch torchvision torchaudio mamba-ssm causal_conv1d
  • conda uninstall pytorch if you have pytorch version 2.3.0
  • pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121
  • conda install pytorch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 pytorch-cuda=12.1 -c pytorch -c nvidia find your code for installing other versions of pytorch here
  • pip install causal_conv1d
  • pip install mamba-ssm or pip install mamba-ssm=1.2.0.post1, both work

============== Solutions that have been proposed in this post that doesnt work in my case:

  • pip install mamba-ssm --no-cache-dir (Doesnt make no difference for me)
  • pip install causal_conv1d==1.1.1 (Cannot install, so I just installed version 1.2.0)

Solutions proposed in Issue #217 that doesnt work in my case:

  • pip install https://github.com/Dao-AILab/causal-conv1d/releases/download/v1.2.0.post2/causal_conv1d-1.2.0.post2+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
  • pip install https://github.com/state-spaces/mamba/releases/download/v1.2.0.post1/mamba_ssm-1.2.0.post1+cu118torch2.3cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

thank you so much! I solved my problem!

GitHub-TXZ commented 2 weeks ago

I have been successfully run. Environment follows: cuda 11.8 python 3.10.13 pytorch 2.1.1 causal_conv1d 1.1.1 mamba-ssm 1.2.0.post1

pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
pip install causal_conv1d==1.1.1
pip install mamba-ssm==1.2.0.post1

worked for me, thanks a lot.