wurenkai / UltraLight-VM-UNet

[arXiv] The official code for "UltraLight VM-UNet: Parallel Vision Mamba Significantly Reduces Parameters for Skin Lesion Segmentation".
224 stars 31 forks source link

undefined symbol: _ZN3c104cuda20CUDACachingAllocator9allocatorE #13

Open Lm0611 opened 6 months ago

Lm0611 commented 6 months ago

ImportError: /public/home/ncu_418000230030/anaconda3/envs/Uvmunet/lib/python3.8/site-packages/causal_conv1d_cuda.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104cuda20CUDACachingAllocator9allocatorE

请问这个问题怎么解决

wurenkai commented 6 months ago

Hi, according to your reported error message, this should be a problem when calling the causal_conv1d. You need to keep cuda version greater than 11.7, or follow the steps below to install your environment to run (Cuda version 11.7):

conda create -n vmunet python=3.8
conda activate vmunet
pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
pip install packaging
pip install timm==0.4.12
pip install pytest chardet yacs termcolor
pip install submitit tensorboardX
pip install triton==2.0.0
pip install causal_conv1d==1.0.0  # causal_conv1d-1.0.0+cu118torch1.13cxx11abiFALSE-cp38-cp38-linux_x86_64.whl
pip install mamba_ssm==1.0.1  # mmamba_ssm-1.0.1+cu118torch1.13cxx11abiFALSE-cp38-cp38-linux_x86_64.whl
pip install scikit-learn matplotlib thop h5py SimpleITK scikit-image medpy yacs
Lm0611 commented 6 months ago

conda create -n vmunet python=3.8 conda activate vmunet pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117 pip install packaging pip install timm==0.4.12 pip install pytest chardet yacs termcolor pip install submitit tensorboardX pip install triton==2.0.0 pip install causal_conv1d==1.0.0 # causal_conv1d-1.0.0+cu118torch1.13cxx11abiFALSE-cp38-cp38-linux_x86_64.whl pip install mamba_ssm==1.0.1 # mmamba_ssm-1.0.1+cu118torch1.13cxx11abiFALSE-cp38-cp38-linux_x86_64.whl pip install scikit-learn matplotlib thop h5py SimpleITK scikit-image medpy yacs 我就是按照这个步骤一个个执行下来的,然后发生了下面的错误:ImportError: /public/home/ncu_418000230030/anaconda3/envs/Uvmunet/lib/python3.8/site-packages/causal_conv1d_cuda.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104cuda20CUDACachingAllocator9allocatorE 不知道该怎么解决。。。

wurenkai commented 6 months ago

My understanding would be a Cuda version mismatch. Our pytorch installation for this one is based on Cuda 11.7. Make sure your Cuda version is 11.7 first, otherwise you will need to install some other more advanced version when installing pytorch. You can check this by typing the following code to output the Cuda version.

nvcc -V

Did the installation process go well?